mirror of
https://github.com/BentoBoxWorld/BentoBox.git
synced 2024-11-05 02:19:46 +01:00
Started /bsb range display
This commit is contained in:
parent
2e26c6a20c
commit
f8a7c1af48
@ -14,6 +14,7 @@ import us.tastybento.bskyblock.commands.admin.AdminSetRankCommand;
|
||||
import us.tastybento.bskyblock.commands.admin.AdminTeleportCommand;
|
||||
import us.tastybento.bskyblock.commands.admin.AdminUnregisterCommand;
|
||||
import us.tastybento.bskyblock.commands.admin.AdminVersionCommand;
|
||||
import us.tastybento.bskyblock.commands.admin.range.AdminRangeCommand;
|
||||
import us.tastybento.bskyblock.commands.admin.team.AdminTeamAddCommand;
|
||||
import us.tastybento.bskyblock.commands.admin.team.AdminTeamDisbandCommand;
|
||||
import us.tastybento.bskyblock.commands.admin.team.AdminTeamKickCommand;
|
||||
@ -51,10 +52,12 @@ public class AdminCommand extends CompositeCommand {
|
||||
// Register/unregister islands
|
||||
new AdminRegisterCommand(this);
|
||||
new AdminUnregisterCommand(this);
|
||||
// Range
|
||||
new AdminRangeCommand(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean execute(User user, List<String> args) {
|
||||
public boolean execute(User user, String label, List<String> args) {
|
||||
if (!args.isEmpty()) {
|
||||
user.sendMessage("general.errors.unknown-command", TextVariables.LABEL, getTopLabel());
|
||||
return false;
|
||||
|
@ -0,0 +1,31 @@
|
||||
package us.tastybento.bskyblock.commands.admin.range;
|
||||
|
||||
import us.tastybento.bskyblock.api.commands.CompositeCommand;
|
||||
import us.tastybento.bskyblock.api.user.User;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @author Poslovitch
|
||||
*/
|
||||
public class AdminRangeCommand extends CompositeCommand {
|
||||
|
||||
public AdminRangeCommand(CompositeCommand parent) {
|
||||
super (parent, "range");
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setup() {
|
||||
setPermission("admin.range");
|
||||
setParameters("commands.admin.range.parameters");
|
||||
setDescription("commands.admin.range.description");
|
||||
|
||||
new AdminRangeDisplayCommand(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean execute(User user, String label, List<String> args) {
|
||||
showHelp(this, user);
|
||||
return true;
|
||||
}
|
||||
}
|
@ -0,0 +1,34 @@
|
||||
package us.tastybento.bskyblock.commands.admin.range;
|
||||
|
||||
import us.tastybento.bskyblock.api.commands.CompositeCommand;
|
||||
import us.tastybento.bskyblock.api.user.User;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @author Poslovitch
|
||||
*/
|
||||
public class AdminRangeDisplayCommand extends CompositeCommand {
|
||||
|
||||
public AdminRangeDisplayCommand(CompositeCommand parent) {
|
||||
super(parent, "display", "show", "hide");
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setup() {
|
||||
setOnlyPlayer(true);
|
||||
setPermission("admin.range.display");
|
||||
setParameters("commands.admin.range.display.parameters");
|
||||
setDescription("commands.admin.range.display.description");
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean execute(User user, String label, List<String> args) {
|
||||
// Just to try out the things
|
||||
user.sendRawMessage(label);
|
||||
for (String a: args) {
|
||||
user.sendRawMessage(a);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue
Block a user