Remove unnecessary serializations

This commit is contained in:
samczsun 2016-06-10 22:03:12 -04:00
parent 9933345a7b
commit 5564b07a36
No known key found for this signature in database
GPG Key ID: B0AFDBD87206805D
2 changed files with 0 additions and 32 deletions

View File

@ -71,21 +71,6 @@ public class ItemListener implements Listener, Runnable
}
}
/**
* Handle updated CustomItem stats and lore upon player
* switching items.
*
* @param event
*/
@EventHandler
public void onItemHeldChanged(PlayerItemHeldEvent event)
{
Player player = event.getPlayer();
PlayerGear gear = getGear(player);
gear.onItemHeldChanged(event);
}
/**
* Handle the trigger of custom gear related effects and abilities.
*

View File

@ -56,7 +56,6 @@ public class PlayerGear
if (legendary.OriginalOwner == null)
{
legendary.OriginalOwner = getPlayer().getUniqueId().toString();
getPlayer().setItemInHand(legendary.toItemStack());
}
}
}
@ -109,22 +108,6 @@ public class PlayerGear
forEachGear(item -> item.onAttacked(event));
}
/**
* Update appropriate gear status and item lores.
*
* @param event - the triggering item held change event.
*/
public void onItemHeldChanged(PlayerItemHeldEvent event)
{
ItemStack item = getPlayer().getItemInHand();
CustomItem weapon = getWeapon();
if (weapon != null)
{
weapon.update(item); // Update held-item's stats.
}
}
private void forEachGear(Consumer<CustomItem> itemConsumer)
{
CustomItem weapon = getWeapon();