removeShopItem() now fails silently.

This commit is contained in:
sigonasr2 2016-07-29 20:37:17 -05:00
parent d22b1c305f
commit 11b8302a87
3 changed files with 32 additions and 28 deletions

Binary file not shown.

View File

@ -2828,7 +2828,7 @@ public class GenericFunctions {
return false;
}
} else
if (GenericFunctions.isBankSign(s)) {
if (GenericFunctions.isBankSign(s) && !p.isOp()) {
return false;
} else {
return true;

View File

@ -718,10 +718,13 @@ public class WorldShop {
}
public static void removeShopItem(Sign s) {
if (isWorldShopSign(s)) {
removeShopItem(s, TwosideKeeper.TwosideShops.LoadWorldShopData(s));
}
}
public static void removeShopItem(Sign s, WorldShop shop) {
if (isWorldShopSign(s)) {
Collection<Entity> nearby = WorldShop.getBlockShopSignAttachedTo(s).getWorld().getNearbyEntities(WorldShop.getBlockShopSignAttachedTo(s).getLocation().add(0.5,0,0.5), 0.3, 1, 0.3);
for (int i=0;i<nearby.size();i++) {
Entity e = Iterables.get(nearby, i);
@ -752,6 +755,7 @@ public class WorldShop {
}
}
}
}
public static void spawnShopItem(PlayerInteractEvent ev, Location loc, WorldShop shop) {
//See if a drop entity is already here.