diff options
| author | ThatGravyBoat <thatgravyboat@gmail.com> | 2021-10-03 21:13:15 -0230 |
|---|---|---|
| committer | ThatGravyBoat <thatgravyboat@gmail.com> | 2021-10-03 21:13:15 -0230 |
| commit | aea2087a9cc6ec153d22e5064ee49f264aff4d75 (patch) | |
| tree | 162bd961ed558ef644285d47be100ab78eef538b /src/main/java/io/github/moulberry/notenoughupdates/commands/ClientCommandBase.java | |
| parent | cdc452e0e0aed1c25e9f3044a7d68b3d4f41cdb1 (diff) | |
| download | notenoughupdates-aea2087a9cc6ec153d22e5064ee49f264aff4d75.tar.gz notenoughupdates-aea2087a9cc6ec153d22e5064ee49f264aff4d75.tar.bz2 notenoughupdates-aea2087a9cc6ec153d22e5064ee49f264aff4d75.zip | |
Updated /neustats to have a dump subcommand.
Moved the stats command to its own class.
Added HastebinUploader and DiscordMarkdownBuilder
Added ClientCommandBase
Diffstat (limited to 'src/main/java/io/github/moulberry/notenoughupdates/commands/ClientCommandBase.java')
| -rw-r--r-- | src/main/java/io/github/moulberry/notenoughupdates/commands/ClientCommandBase.java | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/src/main/java/io/github/moulberry/notenoughupdates/commands/ClientCommandBase.java b/src/main/java/io/github/moulberry/notenoughupdates/commands/ClientCommandBase.java new file mode 100644 index 00000000..47174f32 --- /dev/null +++ b/src/main/java/io/github/moulberry/notenoughupdates/commands/ClientCommandBase.java @@ -0,0 +1,28 @@ +package io.github.moulberry.notenoughupdates.commands; + +import net.minecraft.command.CommandBase; +import net.minecraft.command.ICommandSender; + +public abstract class ClientCommandBase extends CommandBase { + + private final String name; + + protected ClientCommandBase(String name) { + this.name = name; + } + + @Override + public String getCommandName() { + return name; + } + + @Override + public String getCommandUsage(ICommandSender sender) { + return "/"+name; + } + + @Override + public boolean canCommandSenderUseCommand(ICommandSender sender) { + return true; + } +} |
