1
0
mirror of https://github.com/Zrips/Jobs.git synced 2025-01-08 01:08:23 +01:00
Jobs/com/gamingmesh/jobs/commands/list/resetlimit.java
2017-02-04 16:53:39 +02:00

32 lines
977 B
Java

package com.gamingmesh.jobs.commands.list;
import org.bukkit.command.CommandSender;
import com.gamingmesh.jobs.Jobs;
import com.gamingmesh.jobs.commands.Cmd;
import com.gamingmesh.jobs.commands.JobCommand;
import com.gamingmesh.jobs.container.JobsPlayer;
public class resetlimit implements Cmd {
@Override
@JobCommand(700)
public boolean perform(Jobs plugin, final CommandSender sender, final String[] args) {
if (args.length != 1) {
Jobs.getCommandManager().sendUsage(sender, "resetlimit");
return true;
}
JobsPlayer jPlayer = Jobs.getPlayerManager().getJobsPlayer(args[0]);
if (jPlayer == null) {
sender.sendMessage(Jobs.getLanguage().getMessage("general.error.noinfoByPlayer", "%playername%", args[0]));
return true;
}
jPlayer.resetPaymentLimit();
sender.sendMessage(Jobs.getLanguage().getMessage("command.resetlimit.output.reseted", "%playername%", jPlayer.getUserName()));
return true;
}
}