Added Spawner Lock Command, And Formatted Grace Differently
This commit is contained in:
@@ -0,0 +1,29 @@
|
||||
package com.massivecraft.factions.cmd;
|
||||
|
||||
import com.massivecraft.factions.Conf;
|
||||
import com.massivecraft.factions.FactionsPlugin;
|
||||
import com.massivecraft.factions.struct.Permission;
|
||||
import com.massivecraft.factions.zcore.util.TL;
|
||||
|
||||
public class CmdSpawnerLock extends FCommand {
|
||||
|
||||
public CmdSpawnerLock(){
|
||||
super();
|
||||
this.aliases.add("lockspawners");
|
||||
this.aliases.add("spawnerlock");
|
||||
|
||||
this.requirements = new CommandRequirements.Builder(Permission.LOCKSPAWNERS)
|
||||
.build();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void perform(CommandContext context){
|
||||
Conf.spawnerLock = !Conf.spawnerLock;
|
||||
context.msg(TL.COMMAND_SPAWNER_LOCK_TOGGLED, Conf.spawnerLock ? FactionsPlugin.getInstance().color("&aEnabled") : FactionsPlugin.getInstance().color("&4Disabled"));
|
||||
}
|
||||
|
||||
@Override
|
||||
public TL getUsageTranslation() {
|
||||
return TL.COMMAND_SPAWNER_LOCK_DESCRIPTION;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user