mirror of
https://github.com/EssentialsX/Essentials.git
synced 2025-01-12 11:21:28 +01:00
Restore [free] and [disposal] signs back to their intended behaviour
This commit is contained in:
parent
c09329e5be
commit
5b930cdc3b
@ -14,10 +14,7 @@ public class SignDisposal extends EssentialsSign
|
|||||||
@Override
|
@Override
|
||||||
protected boolean onSignInteract(final ISign sign, final User player, final String username, final IEssentials ess)
|
protected boolean onSignInteract(final ISign sign, final User player, final String username, final IEssentials ess)
|
||||||
{
|
{
|
||||||
player.sendMessage("Bukkit broke this sign :(");
|
player.getBase().openInventory(ess.getServer().createInventory(player, 36));
|
||||||
//TODO: wait for a fix in bukkit
|
|
||||||
//Problem: Items can be duplicated
|
|
||||||
//player.getBase().openInventory(ess.getServer().createInventory(player, 36));
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -35,14 +35,9 @@ public class SignFree extends EssentialsSign
|
|||||||
}
|
}
|
||||||
|
|
||||||
item.setAmount(item.getType().getMaxStackSize());
|
item.setAmount(item.getType().getMaxStackSize());
|
||||||
InventoryWorkaround.addItem(player.getInventory(), true, item);
|
Inventory i = ess.getServer().createInventory(player, InventoryType.CHEST);
|
||||||
player.sendMessage("Item added to your inventory.");
|
i.addItem(item);
|
||||||
player.updateInventory();
|
player.openInventory(i);
|
||||||
//TODO: wait for a fix in bukkit
|
|
||||||
//Problem: Items can be duplicated
|
|
||||||
//Inventory i = ess.getServer().createInventory(player, InventoryType.CHEST);
|
|
||||||
//i.addItem(item);
|
|
||||||
//player.openInventory(i);
|
|
||||||
Trade.log("Sign", "Free", "Interact", username, null, username, new Trade(item, ess), sign.getBlock().getLocation(), ess);
|
Trade.log("Sign", "Free", "Interact", username, null, username, new Trade(item, ess), sign.getBlock().getLocation(), ess);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user