Added acacia and dark oak tree types (#2001) @montlikadani

* Update Commandbigtree.java

* Update Commandbigtree.java

* Update Commandtree.java
This commit is contained in:
montlikadani 2018-10-28 19:41:46 +01:00 committed by md678685
parent a7fcafb245
commit a2a95ed840
2 changed files with 7 additions and 1 deletions

View File

@ -27,6 +27,8 @@ public class Commandbigtree extends EssentialsCommand {
tree = TreeType.BIG_TREE; tree = TreeType.BIG_TREE;
} else if (args.length > 0 && args[0].equalsIgnoreCase("jungle")) { } else if (args.length > 0 && args[0].equalsIgnoreCase("jungle")) {
tree = TreeType.JUNGLE; tree = TreeType.JUNGLE;
} else if (args.length > 0 && args[0].equalsIgnoreCase("darkoak")) {
tree = TreeType.DARK_OAK;
} else { } else {
throw new NotEnoughArgumentsException(); throw new NotEnoughArgumentsException();
} }
@ -44,7 +46,7 @@ public class Commandbigtree extends EssentialsCommand {
@Override @Override
protected List<String> getTabCompleteOptions(Server server, User user, String commandLabel, String[] args) { protected List<String> getTabCompleteOptions(Server server, User user, String commandLabel, String[] args) {
if (args.length == 1) { if (args.length == 1) {
return Lists.newArrayList("redwood", "tree", "jungle"); return Lists.newArrayList("redwood", "tree", "jungle", "darkoak");
} else { } else {
return Collections.emptyList(); return Collections.emptyList();
} }

View File

@ -32,6 +32,10 @@ public class Commandtree extends EssentialsCommand {
} }
if (args[0].equalsIgnoreCase("jungle")) { if (args[0].equalsIgnoreCase("jungle")) {
tree = TreeType.SMALL_JUNGLE; tree = TreeType.SMALL_JUNGLE;
} else if (args[0].equalsIgnoreCase("acacia")) {
tree = TreeType.ACACIA;
} else if (args[0].equalsIgnoreCase("birch")) {
tree = TreeType.BIRCH;
} }
if (tree == null) { if (tree == null) {
throw new NotEnoughArgumentsException(); throw new NotEnoughArgumentsException();