1
mirror of https://github.com/StarWishsama/Slimefun4.git synced 2024-09-20 11:45:51 +00:00

Fix androids being unbreakable

This commit is contained in:
dNiym 2019-08-21 22:04:10 -04:00
parent cb702c078b
commit 778431c306

View File

@ -216,7 +216,7 @@ public abstract class ProgrammableAndroid extends SlimefunItem {
public boolean onBreak(Player p, Block b, SlimefunItem item, UnregisterReason reason) {
boolean allow = reason.equals(UnregisterReason.PLAYER_BREAK) && (BlockStorage.getLocationInfo(b.getLocation(), "owner").equals(p.getUniqueId().toString()) || p.hasPermission("slimefun.android.bypass"));
if (BlockStorage.hasBlockInfo(b)) return false;
if (!BlockStorage.hasBlockInfo(b)) return false;
if (allow) {
BlockMenu inv = BlockStorage.getInventory(b);