blob: 28070681779b7bb55c6b98b9311599909fea7440 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
|
package de.cowtipper.cowlection.numerouscommands;
import net.minecraft.command.ICommand;
import net.minecraft.command.ICommandSender;
import java.util.List;
public class CommandInfo {
private final String name;
private final List<String> aliases;
private final String usage;
private boolean isListCommandsCommand;
public CommandInfo(ICommand cmd, ICommandSender sender) {
name = cmd.getCommandName();
aliases = cmd.getCommandAliases();
usage = cmd.getCommandUsage(sender);
isListCommandsCommand = false;
}
public String getName() {
return name;
}
public List<String> getAliases() {
return aliases;
}
public String getUsage() {
return (usage != null && !usage.replace("/", "").equalsIgnoreCase(name)) ? usage : null;
}
public boolean isListCommandsCommand() {
return isListCommandsCommand;
}
public void setIsListCommandsCommand() {
isListCommandsCommand = true;
}
}
|