Kit sign cleanup

This commit is contained in:
KHobbits 2012-03-01 22:36:51 +00:00
parent 2e788802fe
commit b3d3928db8

View File

@ -17,7 +17,7 @@ public class SignKit extends EssentialsSign
protected boolean onSignCreate(final ISign sign, final User player, final String username, final IEssentials ess) throws SignException
{
validateTrade(sign, 3, ess);
final String kitName = sign.getLine(1).toLowerCase(Locale.ENGLISH);
if (kitName.isEmpty())
@ -56,10 +56,9 @@ public class SignKit extends EssentialsSign
charge.isAffordableFor(player);
try
{
final Object kit = ess.getSettings().getKit(kitName);
final Map<String, Object> els = (Map<String, Object>)kit;
final List<String> items = Kit.getItems(player, els);
Kit.expandItems(ess, player, items);
final Map<String, Object> kit = ess.getSettings().getKit(kitName);
final List<String> items = Kit.getItems(player, kit);
Kit.expandItems(ess, player, items);
charge.charge(player);
}
catch (Exception ex)