mirror of
https://github.com/Zrips/Jobs.git
synced 2025-01-23 16:41:25 +01:00
32 lines
977 B
Java
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;
|
||
|
}
|
||
|
}
|