From 0edf7338b22b08b4ca2478debe3105d9e13bf0fb Mon Sep 17 00:00:00 2001 From: libraryaddict Date: Mon, 19 Jun 2017 22:01:53 +1200 Subject: [PATCH] Fix Rabbit Type --- .../utilities/ReflectionFlagWatchers.java | 35 ++++++++----------- 1 file changed, 14 insertions(+), 21 deletions(-) diff --git a/src/me/libraryaddict/disguise/utilities/ReflectionFlagWatchers.java b/src/me/libraryaddict/disguise/utilities/ReflectionFlagWatchers.java index 0406ca7b..295fbe74 100644 --- a/src/me/libraryaddict/disguise/utilities/ReflectionFlagWatchers.java +++ b/src/me/libraryaddict/disguise/utilities/ReflectionFlagWatchers.java @@ -1,30 +1,23 @@ package me.libraryaddict.disguise.utilities; -import java.lang.reflect.Method; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.Collections; -import java.util.Comparator; -import java.util.Iterator; - -import com.mysql.fabric.xmlrpc.base.Param; +import com.comphenix.protocol.wrappers.BlockPosition; +import com.mojang.authlib.GameProfile; +import me.libraryaddict.disguise.disguisetypes.*; +import me.libraryaddict.disguise.utilities.DisguiseParser.DisguisePerm; 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.*; +import org.bukkit.entity.Horse; +import org.bukkit.entity.Llama; +import org.bukkit.entity.Ocelot; +import org.bukkit.entity.Villager; import org.bukkit.inventory.ItemStack; import org.bukkit.potion.PotionEffectType; -import com.comphenix.protocol.wrappers.BlockPosition; -import com.mojang.authlib.GameProfile; - -import me.libraryaddict.disguise.disguisetypes.AnimalColor; -import me.libraryaddict.disguise.disguisetypes.Disguise; -import me.libraryaddict.disguise.disguisetypes.DisguiseType; -import me.libraryaddict.disguise.disguisetypes.FlagWatcher; -import me.libraryaddict.disguise.utilities.DisguiseParser.DisguisePerm; +import java.lang.reflect.Method; +import java.util.*; public class ReflectionFlagWatchers { public static class ParamInfo { @@ -151,7 +144,7 @@ public class ReflectionFlagWatchers { "View all the professions you can set on a villager"); new ParamInfo(BlockFace.class, Arrays.copyOf(BlockFace.values(), 5), "Direction", "View the five directions usable on player setSleeping disguise"); - new ParamInfo(Rabbit.Type.class, "Rabbit Type", "View the kinds of rabbits you can turn into"); + new ParamInfo(RabbitType.class, "Rabbit Type", "View the kinds of rabbits you can turn into"); new ParamInfo(TreeSpecies.class, "Tree Species", "View the different types of tree species"); try { @@ -181,8 +174,8 @@ public class ReflectionFlagWatchers { materials) { @Override public String[] getEnums(String tabComplete) { - String beginning = tabComplete.substring(0, - tabComplete.contains(",") ? tabComplete.lastIndexOf(",") + 1 : 0); + String beginning = tabComplete + .substring(0, tabComplete.contains(",") ? tabComplete.lastIndexOf(",") + 1 : 0); String end = tabComplete.substring(tabComplete.contains(",") ? tabComplete.lastIndexOf(",") + 1 : 0); ArrayList toReturn = new ArrayList<>(); @@ -222,7 +215,7 @@ public class ReflectionFlagWatchers { } public static Method[] getDisguiseWatcherMethods(Class watcherClass) { - ArrayList methods = new ArrayList(Arrays.asList(watcherClass.getMethods())); + ArrayList methods = new ArrayList<>(Arrays.asList(watcherClass.getMethods())); Iterator itel = methods.iterator();