From 82db8d190b40055a57ca283987dd9cf96057a6ea Mon Sep 17 00:00:00 2001 From: libraryaddict Date: Fri, 24 Feb 2017 01:09:21 +1300 Subject: [PATCH] Added TreeSpecies to disguise parameter options --- src/me/libraryaddict/disguise/utilities/DisguiseParser.java | 4 ++++ .../disguise/utilities/ReflectionFlagWatchers.java | 2 ++ 2 files changed, 6 insertions(+) diff --git a/src/me/libraryaddict/disguise/utilities/DisguiseParser.java b/src/me/libraryaddict/disguise/utilities/DisguiseParser.java index f222041c..5159017d 100644 --- a/src/me/libraryaddict/disguise/utilities/DisguiseParser.java +++ b/src/me/libraryaddict/disguise/utilities/DisguiseParser.java @@ -836,6 +836,10 @@ public class DisguiseParser { // Parse to ocelot type value = callValueOf(param, valueString, methodName, "a ocelot type"); } + else if (param.getSimpleName().equals("TreeSpecies")) { + // Parse to ocelot type + value = callValueOf(param, valueString, methodName, "a tree species"); + } else if (param == PotionEffectType.class) { // Parse to potion effect try { diff --git a/src/me/libraryaddict/disguise/utilities/ReflectionFlagWatchers.java b/src/me/libraryaddict/disguise/utilities/ReflectionFlagWatchers.java index b157a936..ba23b7ba 100644 --- a/src/me/libraryaddict/disguise/utilities/ReflectionFlagWatchers.java +++ b/src/me/libraryaddict/disguise/utilities/ReflectionFlagWatchers.java @@ -10,6 +10,7 @@ import java.util.Iterator; import org.apache.commons.lang.StringUtils; import org.bukkit.Art; import org.bukkit.Material; +import org.bukkit.TreeSpecies; import org.bukkit.block.BlockFace; import org.bukkit.entity.Horse; import org.bukkit.entity.Llama; @@ -140,6 +141,7 @@ public class ReflectionFlagWatchers { paramList.add(new ParamInfo(BlockFace.class, Arrays.copyOf(BlockFace.values(), 5), "Direction", "View the five directions usable on player setSleeping disguise")); paramList.add(new ParamInfo(Rabbit.Type.class, "Rabbit Type", "View the kinds of rabbits you can turn into")); + paramList.add(new ParamInfo(TreeSpecies.class, "Tree Species", "View the different types of tree species")); ArrayList potionEnums = new ArrayList();