Showing Dropping Anvil Something (Ignore)

This commit is contained in:
Driftay
2019-09-15 05:19:06 -04:00
parent 2feaed0aad
commit 7f988031ca
285 changed files with 28757 additions and 28757 deletions

View File

@@ -9,42 +9,42 @@ import com.massivecraft.factions.zcore.util.TL;
public class CmdOpen extends FCommand {
public CmdOpen() {
super();
this.aliases.add("open");
this.optionalArgs.put("yes/no", "flip");
public CmdOpen() {
super();
this.aliases.add("open");
this.optionalArgs.put("yes/no", "flip");
this.requirements = new CommandRequirements.Builder(Permission.OPEN)
.withRole(Role.COLEADER)
.playerOnly()
.memberOnly()
.build();
}
this.requirements = new CommandRequirements.Builder(Permission.OPEN)
.withRole(Role.COLEADER)
.playerOnly()
.memberOnly()
.build();
}
@Override
public void perform(CommandContext context) {
// if economy is enabled, they're not on the bypass list, and this command has a cost set, make 'em pay
if (!context.payForCommand(Conf.econCostOpen, TL.COMMAND_OPEN_TOOPEN, TL.COMMAND_OPEN_FOROPEN)) {
return;
}
@Override
public void perform(CommandContext context) {
// if economy is enabled, they're not on the bypass list, and this command has a cost set, make 'em pay
if (!context.payForCommand(Conf.econCostOpen, TL.COMMAND_OPEN_TOOPEN, TL.COMMAND_OPEN_FOROPEN)) {
return;
}
context.faction.setOpen(context.argAsBool(0, !context.faction.getOpen()));
context.faction.setOpen(context.argAsBool(0, !context.faction.getOpen()));
String open = context.faction.getOpen() ? TL.COMMAND_OPEN_OPEN.toString() : TL.COMMAND_OPEN_CLOSED.toString();
String open = context.faction.getOpen() ? TL.COMMAND_OPEN_OPEN.toString() : TL.COMMAND_OPEN_CLOSED.toString();
// Inform
for (FPlayer fplayer : FPlayers.getInstance().getOnlinePlayers()) {
if (fplayer.getFactionId().equals(context.faction.getId())) {
fplayer.msg(TL.COMMAND_OPEN_CHANGES, context.fPlayer.getName(), open);
continue;
}
fplayer.msg(TL.COMMAND_OPEN_CHANGED, context.faction.getTag(fplayer.getFaction()), open);
}
}
// Inform
for (FPlayer fplayer : FPlayers.getInstance().getOnlinePlayers()) {
if (fplayer.getFactionId().equals(context.faction.getId())) {
fplayer.msg(TL.COMMAND_OPEN_CHANGES, context.fPlayer.getName(), open);
continue;
}
fplayer.msg(TL.COMMAND_OPEN_CHANGED, context.faction.getTag(fplayer.getFaction()), open);
}
}
@Override
public TL getUsageTranslation() {
return TL.COMMAND_OPEN_DESCRIPTION;
}
@Override
public TL getUsageTranslation() {
return TL.COMMAND_OPEN_DESCRIPTION;
}
}