Better methods in MassiveCommandToggle
This commit is contained in:
parent
1f94c0c1cd
commit
21211b404f
@ -36,9 +36,9 @@ public abstract class MassiveCommandToggle extends MassiveCommand
|
|||||||
// ABSTRACT
|
// ABSTRACT
|
||||||
// -------------------------------------------- //
|
// -------------------------------------------- //
|
||||||
|
|
||||||
public abstract boolean get();
|
public abstract boolean getValue();
|
||||||
|
|
||||||
public abstract void set(boolean value);
|
public abstract void setValue(boolean value);
|
||||||
|
|
||||||
// -------------------------------------------- //
|
// -------------------------------------------- //
|
||||||
// GET NAME
|
// GET NAME
|
||||||
@ -58,7 +58,7 @@ public abstract class MassiveCommandToggle extends MassiveCommand
|
|||||||
public void perform() throws MassiveException
|
public void perform() throws MassiveException
|
||||||
{
|
{
|
||||||
// Args
|
// Args
|
||||||
boolean before = this.get();
|
boolean before = this.getValue();
|
||||||
boolean after = this.readArg( ! before);
|
boolean after = this.readArg( ! before);
|
||||||
String afterDesc = TypeBoolean.getOn().getVisual(after, sender);
|
String afterDesc = TypeBoolean.getOn().getVisual(after, sender);
|
||||||
|
|
||||||
@ -72,7 +72,7 @@ public abstract class MassiveCommandToggle extends MassiveCommand
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Apply
|
// Apply
|
||||||
set(after);
|
this.setValue(after);
|
||||||
|
|
||||||
// Inform
|
// Inform
|
||||||
String message = Txt.parse("<h>%s<i> is now <h>%s<i>.", this.getName(), afterDesc);
|
String message = Txt.parse("<h>%s<i> is now <h>%s<i>.", this.getName(), afterDesc);
|
||||||
|
Loading…
Reference in New Issue
Block a user