mirror of
https://github.com/BentoBoxWorld/Challenges.git
synced 2024-11-22 18:46:39 +01:00
Updated to latest CompositeCommand API
This commit is contained in:
parent
dd344a59f3
commit
14f1d04ba1
@ -17,12 +17,12 @@ public class ChallengesCommand extends CompositeCommand {
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean execute(User user, List<String> args) {
|
||||
public boolean execute(User user, String label, List<String> args) {
|
||||
// Open up the challenges GUI
|
||||
if (user.isPlayer()) {
|
||||
new ChallengesPanels(addon, user, args.isEmpty() ? "" : args.get(0), getWorld(), getPermissionPrefix(), getTopLabel());
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
@ -32,7 +32,7 @@ public class ChallengesCommand extends CompositeCommand {
|
||||
this.setPermission(CHALLENGE_COMMAND);
|
||||
this.setParameters(CHALLENGE_COMMAND + ".parameters");
|
||||
this.setDescription(CHALLENGE_COMMAND + ".description");
|
||||
this.setOnlyPlayer(true);
|
||||
this.setOnlyPlayer(true);
|
||||
}
|
||||
|
||||
|
||||
|
@ -24,7 +24,7 @@ public class ChallengesAdminImportCommand extends CompositeCommand {
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean execute(User user, List<String> args) {
|
||||
public boolean execute(User user, String label, List<String> args) {
|
||||
return addon.getImportManager().importChallenges(user, getWorld(), !args.isEmpty() && args.get(0).equalsIgnoreCase("overwrite"));
|
||||
}
|
||||
|
||||
|
@ -34,7 +34,7 @@ public class CreateChallenge extends CompositeCommand {
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean execute(User user, List<String> args) {
|
||||
public boolean execute(User user, String label, List<String> args) {
|
||||
if (args.isEmpty()) {
|
||||
user.sendRawMessage("not enough args");
|
||||
return false;
|
||||
|
@ -51,7 +51,7 @@ public class CreateSurrounding extends CompositeCommand implements Listener {
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean execute(User user, List<String> args) {
|
||||
public boolean execute(User user, String label, List<String> args) {
|
||||
if (args.isEmpty()) {
|
||||
user.sendMessage("challenges.admin.error.no-name");
|
||||
return false;
|
||||
|
@ -57,7 +57,7 @@ public class MakeLevel extends CompositeCommand {
|
||||
* @see us.tastybento.bskyblock.api.commands.BSBCommand#execute(us.tastybento.bskyblock.api.commands.User, java.util.List)
|
||||
*/
|
||||
@Override
|
||||
public boolean execute(User user, List<String> args) {
|
||||
public boolean execute(User user, String label, List<String> args) {
|
||||
// TODO Auto-generated method stub
|
||||
return false;
|
||||
}
|
||||
|
@ -57,7 +57,7 @@ public class SetDeployed extends CompositeCommand {
|
||||
* @see us.tastybento.bskyblock.api.commands.BSBCommand#execute(us.tastybento.bskyblock.api.commands.User, java.util.List)
|
||||
*/
|
||||
@Override
|
||||
public boolean execute(User user, List<String> args) {
|
||||
public boolean execute(User user, String label, List<String> args) {
|
||||
// TODO Auto-generated method stub
|
||||
return false;
|
||||
}
|
||||
|
@ -57,7 +57,7 @@ public class SetDescription extends CompositeCommand {
|
||||
* @see us.tastybento.bskyblock.api.commands.BSBCommand#execute(us.tastybento.bskyblock.api.commands.User, java.util.List)
|
||||
*/
|
||||
@Override
|
||||
public boolean execute(User user, List<String> args) {
|
||||
public boolean execute(User user, String label, List<String> args) {
|
||||
// TODO Auto-generated method stub
|
||||
return false;
|
||||
}
|
||||
|
@ -57,7 +57,7 @@ public class SetExp extends CompositeCommand {
|
||||
* @see us.tastybento.bskyblock.api.commands.BSBCommand#execute(us.tastybento.bskyblock.api.commands.User, java.util.List)
|
||||
*/
|
||||
@Override
|
||||
public boolean execute(User user, List<String> args) {
|
||||
public boolean execute(User user, String label, List<String> args) {
|
||||
// TODO Auto-generated method stub
|
||||
return false;
|
||||
}
|
||||
|
@ -57,7 +57,7 @@ public class SetFriendlyName extends CompositeCommand {
|
||||
* @see us.tastybento.bskyblock.api.commands.BSBCommand#execute(us.tastybento.bskyblock.api.commands.User, java.util.List)
|
||||
*/
|
||||
@Override
|
||||
public boolean execute(User user, List<String> args) {
|
||||
public boolean execute(User user, String label, List<String> args) {
|
||||
// TODO Auto-generated method stub
|
||||
return false;
|
||||
}
|
||||
|
@ -1,5 +1,5 @@
|
||||
/**
|
||||
*
|
||||
*
|
||||
*/
|
||||
package bskyblock.addon.challenges.commands.admin;
|
||||
|
||||
@ -43,7 +43,7 @@ public class SetIcon extends CompositeCommand {
|
||||
* @see us.tastybento.bskyblock.api.commands.BSBCommand#execute(us.tastybento.bskyblock.api.commands.User, java.util.List)
|
||||
*/
|
||||
@Override
|
||||
public boolean execute(User user, List<String> args) {
|
||||
public boolean execute(User user, String label, List<String> args) {
|
||||
ItemStack icon = user.getInventory().getItemInMainHand();
|
||||
if (args.isEmpty() || icon == null) {
|
||||
user.sendMessage("challenges.admin.seticon.description");
|
||||
|
@ -57,7 +57,7 @@ public class SetLevel extends CompositeCommand {
|
||||
* @see us.tastybento.bskyblock.api.commands.BSBCommand#execute(us.tastybento.bskyblock.api.commands.User, java.util.List)
|
||||
*/
|
||||
@Override
|
||||
public boolean execute(User user, List<String> args) {
|
||||
public boolean execute(User user, String label, List<String> args) {
|
||||
// TODO Auto-generated method stub
|
||||
return false;
|
||||
}
|
||||
|
@ -57,7 +57,7 @@ public class SetMaxTimes extends CompositeCommand {
|
||||
* @see us.tastybento.bskyblock.api.commands.BSBCommand#execute(us.tastybento.bskyblock.api.commands.User, java.util.List)
|
||||
*/
|
||||
@Override
|
||||
public boolean execute(User user, List<String> args) {
|
||||
public boolean execute(User user, String label, List<String> args) {
|
||||
// TODO Auto-generated method stub
|
||||
return false;
|
||||
}
|
||||
|
@ -57,7 +57,7 @@ public class SetPerm extends CompositeCommand {
|
||||
* @see us.tastybento.bskyblock.api.commands.BSBCommand#execute(us.tastybento.bskyblock.api.commands.User, java.util.List)
|
||||
*/
|
||||
@Override
|
||||
public boolean execute(User user, List<String> args) {
|
||||
public boolean execute(User user, String label, List<String> args) {
|
||||
// TODO Auto-generated method stub
|
||||
return false;
|
||||
}
|
||||
|
@ -57,7 +57,7 @@ public class SetRepeatable extends CompositeCommand {
|
||||
* @see us.tastybento.bskyblock.api.commands.BSBCommand#execute(us.tastybento.bskyblock.api.commands.User, java.util.List)
|
||||
*/
|
||||
@Override
|
||||
public boolean execute(User user, List<String> args) {
|
||||
public boolean execute(User user, String label, List<String> args) {
|
||||
// TODO Auto-generated method stub
|
||||
return false;
|
||||
}
|
||||
|
@ -57,7 +57,7 @@ public class SetReward extends CompositeCommand {
|
||||
* @see us.tastybento.bskyblock.api.commands.BSBCommand#execute(us.tastybento.bskyblock.api.commands.User, java.util.List)
|
||||
*/
|
||||
@Override
|
||||
public boolean execute(User user, List<String> args) {
|
||||
public boolean execute(User user, String label, List<String> args) {
|
||||
// TODO Auto-generated method stub
|
||||
return false;
|
||||
}
|
||||
|
@ -57,7 +57,7 @@ public class SetType extends CompositeCommand {
|
||||
* @see us.tastybento.bskyblock.api.commands.BSBCommand#execute(us.tastybento.bskyblock.api.commands.User, java.util.List)
|
||||
*/
|
||||
@Override
|
||||
public boolean execute(User user, List<String> args) {
|
||||
public boolean execute(User user, String label, List<String> args) {
|
||||
// TODO Auto-generated method stub
|
||||
return false;
|
||||
}
|
||||
|
@ -57,7 +57,7 @@ public class TakeItems extends CompositeCommand {
|
||||
* @see us.tastybento.bskyblock.api.commands.BSBCommand#execute(us.tastybento.bskyblock.api.commands.User, java.util.List)
|
||||
*/
|
||||
@Override
|
||||
public boolean execute(User user, List<String> args) {
|
||||
public boolean execute(User user, String label, List<String> args) {
|
||||
// TODO Auto-generated method stub
|
||||
return false;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user