use of com.mraof.minestuck.util.Echeladder in project Minestuck by mraof.
the class CommandSetRung method execute.
@Override
public void execute(MinecraftServer server, ICommandSender sender, String[] args) throws CommandException {
if (args.length < 2)
throw new WrongUsageException(this.getUsage(sender));
PlayerIdentifier target = IdentifierHandler.getForCommand(server, sender, args[0]);
int rung = parseInt(args[1], 0, Echeladder.RUNG_COUNT - 1);
double progress = 0;
if (args.length >= 3)
progress = parseDouble(args[2], 0, 1);
Echeladder echeladder = MinestuckPlayerData.getData(target).echeladder;
echeladder.setByCommand(rung, progress);
notifyCommandListener(sender, this, "commands.setRung.success", target.getUsername(), rung, progress * 100);
}
Aggregations