removeShopItem() now fails silently.
This commit is contained in:
parent
d22b1c305f
commit
11b8302a87
Binary file not shown.
@ -2828,7 +2828,7 @@ public class GenericFunctions {
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
} else
|
} else
|
||||||
if (GenericFunctions.isBankSign(s)) {
|
if (GenericFunctions.isBankSign(s) && !p.isOp()) {
|
||||||
return false;
|
return false;
|
||||||
} else {
|
} else {
|
||||||
return true;
|
return true;
|
||||||
|
@ -718,10 +718,13 @@ public class WorldShop {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public static void removeShopItem(Sign s) {
|
public static void removeShopItem(Sign s) {
|
||||||
|
if (isWorldShopSign(s)) {
|
||||||
removeShopItem(s, TwosideKeeper.TwosideShops.LoadWorldShopData(s));
|
removeShopItem(s, TwosideKeeper.TwosideShops.LoadWorldShopData(s));
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
public static void removeShopItem(Sign s, WorldShop shop) {
|
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);
|
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++) {
|
for (int i=0;i<nearby.size();i++) {
|
||||||
Entity e = Iterables.get(nearby, i);
|
Entity e = Iterables.get(nearby, i);
|
||||||
@ -752,6 +755,7 @@ public class WorldShop {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
public static void spawnShopItem(PlayerInteractEvent ev, Location loc, WorldShop shop) {
|
public static void spawnShopItem(PlayerInteractEvent ev, Location loc, WorldShop shop) {
|
||||||
//See if a drop entity is already here.
|
//See if a drop entity is already here.
|
||||||
|
Loading…
x
Reference in New Issue
Block a user