Skip to content

Commit

Permalink
Enable resetbiomes changing with /biome settings command.
Browse files Browse the repository at this point in the history
  • Loading branch information
BONNe committed Dec 31, 2018
1 parent 1defd6e commit ed108e9
Showing 1 changed file with 24 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ else if (args.size() < 2)
}
else
{
switch (args.get(0))
switch (args.get(0).toLowerCase())
{
case MENU:
if (args.get(1).equalsIgnoreCase("true"))
Expand Down Expand Up @@ -110,7 +110,24 @@ else if (args.get(1).equalsIgnoreCase("square"))
args.get(1));
return false;
}

case RESET_BIOME:
if (args.get(1).equalsIgnoreCase("true"))
{
this.addon.getConfig().set(RESET_BIOME, true);
break;
}
else if (args.get(1).equalsIgnoreCase("false"))
{
this.addon.getConfig().set(RESET_BIOME, false);
break;
}
else
{
user.sendMessage("biomes.messages.errors.incorrect-boolean",
"[boolean]",
args.get(1));
return false;
}
case TIMEOUT:
try
{
Expand Down Expand Up @@ -155,6 +172,7 @@ public Optional<List<String>> tabComplete(User user, String alias, List<String>
returnList.add(MENU);
returnList.add(TYPE);
returnList.add(SIZE);
returnList.add(RESET_BIOME);
returnList.add(TIMEOUT);

break;
Expand All @@ -164,6 +182,7 @@ public Optional<List<String>> tabComplete(User user, String alias, List<String>
switch (args.get(3))
{
case MENU:
case RESET_BIOME:
returnList.add("<boolean>");
break;
case TYPE:
Expand All @@ -172,10 +191,8 @@ public Optional<List<String>> tabComplete(User user, String alias, List<String>
returnList.add("square");
break;
case SIZE:
returnList.add("[0-200]");
break;
case TIMEOUT:
returnList.add("[0-9999999999]");
returnList.add("<number>");
break;
}

Expand All @@ -202,4 +219,6 @@ public Optional<List<String>> tabComplete(User user, String alias, List<String>
private static final String SIZE = "defaultsize";

private static final String TIMEOUT = "timeout";

private static final String RESET_BIOME = "resetbiomes";
}

0 comments on commit ed108e9

Please sign in to comment.