Updated to latest CompositeCommand API

This commit is contained in:
tastybento 2018-07-18 22:59:21 -07:00
parent dd344a59f3
commit 14f1d04ba1
17 changed files with 20 additions and 20 deletions

View File

@ -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);
}

View File

@ -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"));
}

View File

@ -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;

View File

@ -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;

View File

@ -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;
}

View File

@ -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;
}

View File

@ -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;
}

View File

@ -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;
}

View File

@ -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;
}

View File

@ -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");

View File

@ -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;
}

View File

@ -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;
}

View File

@ -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;
}

View File

@ -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;
}

View File

@ -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;
}

View File

@ -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;
}

View File

@ -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;
}