1
mirror of https://github.com/StarWishsama/Slimefun4.git synced 2024-09-19 19:25:48 +00:00
This commit is contained in:
TheBusyBiscuit 2020-04-25 19:14:50 +02:00
parent f18cb33eef
commit 9eb9a98410
3 changed files with 8 additions and 5 deletions

View File

@ -19,6 +19,9 @@
## Release Candidate 12 (TBD) ## Release Candidate 12 (TBD)
#### Fixes
* Fixed #1824
## Release Candidate 11 (25 Apr 2020) ## Release Candidate 11 (25 Apr 2020)
#### Additions #### Additions

View File

@ -64,7 +64,7 @@ public class ExplosivePickaxe extends SimpleSlimefunItem<BlockBreakHandler> impl
} }
Block b = e.getBlock().getRelative(x, y, z); Block b = e.getBlock().getRelative(x, y, z);
breakBlock(e.getPlayer(), b, fortune, drops); breakBlock(e.getPlayer(), item, b, fortune, drops);
} }
} }
} }
@ -79,7 +79,7 @@ public class ExplosivePickaxe extends SimpleSlimefunItem<BlockBreakHandler> impl
}; };
} }
private void breakBlock(Player p, Block b, int fortune, List<ItemStack> drops) { private void breakBlock(Player p, ItemStack item, Block b, int fortune, List<ItemStack> drops) {
if (b.getType() != Material.AIR && !b.isLiquid() && !MaterialCollections.getAllUnbreakableBlocks().contains(b.getType()) && SlimefunPlugin.getProtectionManager().hasPermission(p, b.getLocation(), ProtectableAction.BREAK_BLOCK)) { if (b.getType() != Material.AIR && !b.isLiquid() && !MaterialCollections.getAllUnbreakableBlocks().contains(b.getType()) && SlimefunPlugin.getProtectionManager().hasPermission(p, b.getLocation(), ProtectableAction.BREAK_BLOCK)) {
SlimefunPlugin.getProtectionManager().logAction(p, b, ProtectableAction.BREAK_BLOCK); SlimefunPlugin.getProtectionManager().logAction(p, b, ProtectableAction.BREAK_BLOCK);

View File

@ -531,10 +531,10 @@ public class SlimefunItem implements Placeable {
if (item == null) return false; if (item == null) return false;
if (item.hasItemMeta()) { if (item.hasItemMeta()) {
Optional<String> itemID = SlimefunPlugin.getItemDataService().getItemData(item); Optional<String> itemId = SlimefunPlugin.getItemDataService().getItemData(item);
if (itemID.isPresent()) { if (itemId.isPresent()) {
return getID().equals(itemID.get()); return getID().equals(itemId.get());
} }
} }