Some help improvements - color yellow if method is specific

This commit is contained in:
riking 2014-06-04 14:35:53 -07:00
parent 5a288c586e
commit 2ec2cbfb1c

View File

@ -5,6 +5,8 @@ import java.util.ArrayList;
import java.util.Collections; import java.util.Collections;
import me.libraryaddict.disguise.disguisetypes.AnimalColor; import me.libraryaddict.disguise.disguisetypes.AnimalColor;
import me.libraryaddict.disguise.disguisetypes.DisguiseType; import me.libraryaddict.disguise.disguisetypes.DisguiseType;
import me.libraryaddict.disguise.disguisetypes.FlagWatcher;
import me.libraryaddict.disguise.disguisetypes.watchers.LivingWatcher;
import me.libraryaddict.disguise.utilities.BaseDisguiseCommand; import me.libraryaddict.disguise.utilities.BaseDisguiseCommand;
import org.apache.commons.lang.StringUtils; import org.apache.commons.lang.StringUtils;
@ -161,13 +163,13 @@ public class DisguiseHelpCommand extends BaseDisguiseCommand {
} else if (int.class == c) { } else if (int.class == c) {
valueType = "Number"; valueType = "Number";
} else if (float.class == c || double.class == c) { } else if (float.class == c || double.class == c) {
valueType = "Number.0"; valueType = "Decimal";
} else if (AnimalColor.class == c) { } else if (AnimalColor.class == c) {
valueType = "Color"; valueType = "Color";
} else if (ItemStack.class == c) { } else if (ItemStack.class == c) {
valueType = "Item ID with optional :Durability"; valueType = "Item (id:damage)";
} else if (ItemStack[].class == c) { } else if (ItemStack[].class == c) {
valueType = "Item ID,ID,ID,ID with optional :Durability"; valueType = "4 items (id:damage,id,...)";
} else if (c.getSimpleName().equals("Style")) { } else if (c.getSimpleName().equals("Style")) {
valueType = "Horse Style"; valueType = "Horse Style";
} else if (c.getSimpleName().equals("Color")) { } else if (c.getSimpleName().equals("Color")) {
@ -177,10 +179,17 @@ public class DisguiseHelpCommand extends BaseDisguiseCommand {
} else if (c.getSimpleName().equals("Profession")) { } else if (c.getSimpleName().equals("Profession")) {
valueType = "Villager Profession"; valueType = "Villager Profession";
} else if (PotionEffectType.class == c) { } else if (PotionEffectType.class == c) {
valueType = "Potioneffect"; valueType = "Potion effect";
} }
if (valueType != null) { if (valueType != null) {
methods.add(ChatColor.RED + method.getName() + ChatColor.DARK_RED + "(" + ChatColor.GREEN ChatColor methodColor = ChatColor.YELLOW;
Class<?> declaring = method.getDeclaringClass();
if (declaring == LivingWatcher.class) {
methodColor = ChatColor.AQUA;
} else if (declaring == FlagWatcher.class) {
methodColor = ChatColor.GRAY;
}
methods.add(methodColor + method.getName() + ChatColor.DARK_RED + "(" + ChatColor.GREEN
+ valueType + ChatColor.DARK_RED + ")"); + valueType + ChatColor.DARK_RED + ")");
} }
} }