protected final void validateTrade(final ISign sign, final int index, final IEssentials ess) throws SignException
	{
		final String line = sign.getLine(index).trim();
		if (line.isEmpty())
		{
			return;
		}
		final Trade trade = getTrade(sign, index, 0, ess);
		final Double money = trade.getMoney();
		if (money != null)
		{
			sign.setLine(index, FormatUtil.shortCurrency(money, ess));
		}
	}
Beispiel #2
0
	protected final void addAmount(final ISign sign, final int index, final Trade trade, final IEssentials ess) throws SignException
	{
		final Double money = trade.getMoney();
		if (money != null)
		{
			changeAmount(sign, index, money, ess);
		}
		final ItemStack item = trade.getItemStack();
		if (item != null)
		{
			changeAmount(sign, index, item.getAmount(), ess);
		}
		final Integer exp = trade.getExperience();
		if (exp != null)
		{
			changeAmount(sign, index, exp.intValue(), ess);
		}
	}