Skip to content

Commit

Permalink
Fix oxygen command, fixes #1395
Browse files Browse the repository at this point in the history
  • Loading branch information
mcmonkey4eva committed Apr 14, 2016
1 parent 9e910bc commit 17aa720
Showing 1 changed file with 4 additions and 4 deletions.
Expand Up @@ -12,9 +12,9 @@

public class OxygenCommand extends AbstractCommand {

public enum Type {MAXIMUM, REMAINING}
public enum Type { MAXIMUM, REMAINING }

public enum Mode {SET, ADD, REMOVE}
public enum Mode { SET, ADD, REMOVE }

@Override
public void parseArgs(ScriptEntry scriptEntry) throws InvalidArgumentsException {
Expand Down Expand Up @@ -65,7 +65,7 @@ public void execute(ScriptEntry scriptEntry) throws CommandExecutionException {

switch (Type.valueOf(type.asString().toUpperCase())) {
case MAXIMUM:
switch (Mode.valueOf(type.asString().toUpperCase())) {
switch (Mode.valueOf(mode.asString().toUpperCase())) {
case SET:
player.setMaximumAir(amount.asInt());
break;
Expand All @@ -78,7 +78,7 @@ public void execute(ScriptEntry scriptEntry) throws CommandExecutionException {
}
return;
case REMAINING:
switch (Mode.valueOf(type.asString().toUpperCase())) {
switch (Mode.valueOf(mode.asString().toUpperCase())) {
case SET:
player.setRemainingAir(amount.asInt());
break;
Expand Down

0 comments on commit 17aa720

Please sign in to comment.