Vault now checks for hoppers & chests nearby even if you're holding multiple vaults.

This commit is contained in:
ProSavage 2018-07-26 13:22:16 -05:00
parent e6559a439a
commit d11a529704

View File

@ -122,7 +122,7 @@ public class FactionsBlockListener implements Listener {
public void onVaultPlace(BlockPlaceEvent e) {
if (e.getItemInHand().getType() == Material.CHEST) {
ItemStack vault = P.p.createItem(Material.CHEST, 1, (short) 0, P.p.color(P.p.getConfig().getString("fvault.Item.Name")), P.p.colorList(P.p.getConfig().getStringList("fvault.Item.Lore")));
if (e.getItemInHand().equals(vault)) {
if (e.getItemInHand().isSimilar(vault)) {
FPlayer fme = FPlayers.getInstance().getByPlayer(e.getPlayer());
if (fme.getFaction().getVault() != null) {
fme.msg(TL.COMMAND_GETVAULT_ALREADYSET);