mirror of
https://github.com/IntellectualSites/PlotSquared.git
synced 2025-06-25 02:04:44 +02:00
default tab completion + plot chat for merged plots
This commit is contained in:
@ -394,6 +394,28 @@ public abstract class Command {
|
||||
return cmd;
|
||||
}
|
||||
|
||||
public Command getCommand(Class clazz) {
|
||||
for (Command cmd : allCommands) {
|
||||
if (cmd.getClass() == clazz) {
|
||||
return cmd;
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
public Command getCommandById(String id) {
|
||||
Command exact = staticCommands.get(id);
|
||||
if (exact != null) {
|
||||
return exact;
|
||||
}
|
||||
for (Command cmd : allCommands) {
|
||||
if (cmd.getId().equals(id)) {
|
||||
return cmd;
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
public boolean canExecute(PlotPlayer player, boolean message) {
|
||||
if (!required.allows(player)) {
|
||||
if (message) {
|
||||
|
Reference in New Issue
Block a user