This repository has been archived by the owner on Aug 9, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
10 changed files
with
95 additions
and
45 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
43 changes: 43 additions & 0 deletions
43
src/main/java/com/samifying/plugin/modules/commands/HelpCommand.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
package com.samifying.plugin.modules.commands; | ||
|
||
import com.samifying.plugin.MainPlugin; | ||
import net.dv8tion.jda.api.EmbedBuilder; | ||
import net.dv8tion.jda.api.entities.Member; | ||
import net.dv8tion.jda.api.entities.TextChannel; | ||
import net.dv8tion.jda.api.utils.MarkdownUtil; | ||
|
||
import java.awt.*; | ||
|
||
public class HelpCommand extends GuildCommand { | ||
|
||
public HelpCommand(boolean guildSpecific, boolean staffOnly) { | ||
super(guildSpecific, staffOnly); | ||
} | ||
|
||
@Override | ||
public void execute(MainPlugin plugin, Member member, TextChannel channel, String[] args) { | ||
if (args.length == 1 && args[0].equals("admin")) { | ||
channel.sendMessage(new EmbedBuilder() | ||
.setColor(Color.ORANGE) | ||
.setTitle(MarkdownUtil.bold("Available admin commands")) | ||
.addField("!config", "Configures various properties", false) | ||
.addField("!rcon", "Executes a command on the Minecraft server", false) | ||
.addField("!whois", "Retrieves data relating verified players", false) | ||
.build()).queue(); | ||
return; | ||
} | ||
channel.sendMessage(new EmbedBuilder() | ||
.setColor(Color.ORANGE) | ||
.setTitle(MarkdownUtil.bold("Available commands")) | ||
.addField("!balance", "Displays your balance", false) | ||
.addField("!botinvite", "Displays the bot invite link", false) | ||
.addField("!myid", "Displays your Discord id", false) | ||
.addField("!seed", "Displays current world seed", false) | ||
.addField("!spawn", "Displays current world's spawn location", false) | ||
.addField("!mcstatus/!online", "Displays current Minecraft server status", false) | ||
.addField("!tutorial", "Sends a link for the Minecraft server plugin tutorial playlist", false) | ||
.addField("!verify", "Links your Discord account to your Minecraft account", false) | ||
.addField("!moneyrpc", "Displays a link to the mod's download and tutorial page", false) | ||
.build()).queue(); | ||
} | ||
} |
19 changes: 19 additions & 0 deletions
19
src/main/java/com/samifying/plugin/modules/commands/MoneyRPCommand.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
package com.samifying.plugin.modules.commands; | ||
|
||
import com.samifying.plugin.MainPlugin; | ||
import net.dv8tion.jda.api.entities.Member; | ||
import net.dv8tion.jda.api.entities.TextChannel; | ||
|
||
public class MoneyRPCommand extends GuildCommand { | ||
|
||
public MoneyRPCommand(boolean guildSpecific, boolean staffOnly) { | ||
super(guildSpecific, staffOnly); | ||
} | ||
|
||
@Override | ||
public void execute(MainPlugin plugin, Member member, TextChannel channel, String[] args) { | ||
channel.sendMessageFormat("You can find instructions on how to install and download this Fabric mod here:%s **%s**", | ||
System.lineSeparator(), | ||
"https://github.com/SamiCraft/MoneyRPC").queue(); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters