blob: 6c03d8e54afb6bd44bf0fa00743210485aa1ea56 (
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
|
package io.dico.dicore.command.predef;
import io.dico.dicore.command.CommandException;
import io.dico.dicore.command.ExecutionContext;
import io.dico.dicore.command.IContextFilter;
import org.bukkit.command.CommandSender;
public class DefaultGroupCommand extends PredefinedCommand<DefaultGroupCommand> {
private static final DefaultGroupCommand instance = new DefaultGroupCommand(false);
public static DefaultGroupCommand getInstance() {
return instance;
}
private DefaultGroupCommand(boolean modifiable) {
addContextFilter(IContextFilter.INHERIT_PERMISSIONS);
this.modifiable = modifiable;
}
public DefaultGroupCommand() {
this(true);
}
@Override
protected DefaultGroupCommand newModifiableInstance() {
return new DefaultGroupCommand(true);
}
@Override
public String execute(CommandSender sender, ExecutionContext context) throws CommandException {
context.getAddress().getChatController().sendHelpMessage(sender, context, context.getAddress(), 1);
return null;
}
}
|