2018-04-09 05:13:41 +02:00
|
|
|
package com.massivecraft.factions.cmd;
|
|
|
|
|
|
|
|
import com.massivecraft.factions.struct.Permission;
|
|
|
|
import com.massivecraft.factions.zcore.util.TL;
|
|
|
|
|
2018-07-12 18:11:07 +02:00
|
|
|
public class CmdInspect extends FCommand {
|
2019-09-15 11:15:33 +02:00
|
|
|
public CmdInspect() {
|
|
|
|
super();
|
|
|
|
this.aliases.add("inspect");
|
|
|
|
this.aliases.add("ins");
|
|
|
|
|
|
|
|
this.requirements = new CommandRequirements.Builder(Permission.INSPECT)
|
|
|
|
.playerOnly()
|
|
|
|
.memberOnly()
|
|
|
|
.build();
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
public void perform(CommandContext context) {
|
|
|
|
if (context.fPlayer.isInspectMode()) {
|
|
|
|
context.fPlayer.setInspectMode(false);
|
|
|
|
context.msg(TL.COMMAND_INSPECT_DISABLED_MSG);
|
|
|
|
} else {
|
|
|
|
context.fPlayer.setInspectMode(true);
|
|
|
|
context.msg(TL.COMMAND_INSPECT_ENABLED);
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
@Override
|
|
|
|
public TL getUsageTranslation() {
|
|
|
|
return TL.COMMAND_INSPECT_DESCRIPTION;
|
|
|
|
}
|
2018-04-09 05:13:41 +02:00
|
|
|
}
|
2019-09-14 21:13:01 +02:00
|
|
|
|