Fixes POM, and moves things around

This commit is contained in:
2022-08-05 00:34:54 +02:00
parent e3ef78f8f8
commit bb0be8a3f0
613 changed files with 27424 additions and 26469 deletions

View File

@@ -0,0 +1,49 @@
package com.massivecraft.factions.cmd;
import com.massivecraft.massivecore.MassiveException;
import com.massivecraft.massivecore.command.requirement.RequirementIsPlayer;
import com.massivecraft.massivecore.command.type.primitive.TypeBooleanOn;
import com.massivecraft.massivecore.util.Txt;
public class CmdFactionsSeeChunk extends FactionsCommand {
// -------------------------------------------- //
// CONSTRUCT
// -------------------------------------------- //
public CmdFactionsSeeChunk() {
// Aliases
this.addAliases("sc");
// Parameters
this.addParameter(TypeBooleanOn.get(), "active", "toggle");
// Requirements
this.addRequirements(RequirementIsPlayer.get());
}
// -------------------------------------------- //
// OVERRIDE
// -------------------------------------------- //
@Override
public void perform() throws MassiveException {
// Args
boolean old = msender.isSeeingChunk();
boolean targetDefault = !old;
boolean target = this.readArg(targetDefault);
String targetDesc = Txt.parse(target ? "<g>ON" : "<b>OFF");
// NoChange
if (target == old) {
msg("<i>See Chunk is already %s<i>.", targetDesc);
return;
}
// Apply
msender.setSeeingChunk(target);
// Inform
msg("<i>See Chunk is now %s<i>.", targetDesc);
}
}