From 696f952c4e544b7bd62b56a8d0bd9b95dca63be8 Mon Sep 17 00:00:00 2001 From: libraryaddict Date: Mon, 14 Jul 2014 12:22:06 +1200 Subject: [PATCH] Change getValue to use generics so I don't have to cast --- .../libraryaddict/disguise/disguisetypes/FlagWatcher.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/me/libraryaddict/disguise/disguisetypes/FlagWatcher.java b/src/me/libraryaddict/disguise/disguisetypes/FlagWatcher.java index 1cc2c388..3ead0442 100644 --- a/src/me/libraryaddict/disguise/disguisetypes/FlagWatcher.java +++ b/src/me/libraryaddict/disguise/disguisetypes/FlagWatcher.java @@ -177,10 +177,10 @@ public class FlagWatcher { return getItemStack(slot.getSlot()); } - protected Object getValue(int no, Object backup) { + protected T getValue(int no, Object backup) { if (entityValues.containsKey(no)) - return entityValues.get(no); - return backup; + return (T) entityValues.get(no); + return (T) backup; } public List getWatchableObjects() {