Saber-Factions/src/main/java/com/massivecraft/factions/cmd/CmdSetBanner.java

40 lines
771 B
Java
Raw Normal View History

package com.massivecraft.factions.cmd;
import com.massivecraft.factions.struct.Permission;
import com.massivecraft.factions.zcore.util.TL;
public class CmdSetBanner extends FCommand {
public CmdSetBanner() {
super();
aliases.add("setbanner");
permission = Permission.BANNER.node;
senderMustBePlayer = true;
senderMustBeMember = false;
senderMustBeModerator = false;
senderMustBeAdmin = true;
2018-12-21 22:46:10 +01:00
}
public void perform() {
if (!me.getItemInHand().getType().toString().contains("BANNER")) {
fme.msg(TL.COMMAND_SETBANNER_NOTBANNER);
return;
}
fme.getFaction().setBannerPattern(me.getItemInHand());
fme.msg(TL.COMMAND_SETBANNER_SUCCESS);
}
@Override
public TL getUsageTranslation() {
return TL.COMMAND_SETBANNER_DESCRIPTION;
}
}