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

Merge pull request #993 from huynhqtienvtag/master

Some small fixes
This commit is contained in:
TheBusyBiscuit 2019-08-04 16:34:24 +02:00 committed by GitHub
commit f098a52c3d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1536,6 +1536,7 @@ public class SlimefunSetup {
@Override
public boolean onBlockBreak(BlockBreakEvent e, ItemStack item, int fortune, List<ItemStack> drops) {
if (SlimefunManager.isItemSimiliar(item, SlimefunItems.AUTO_SMELT_PICKAXE, true)) {
if (BlockStorage.hasBlockInfo(e.getBlock())) return true;
if (e.getBlock().getType().equals(Material.PLAYER_HEAD)) return true;
int j = -1;
@ -2180,7 +2181,7 @@ public class SlimefunSetup {
for (int y = -1; y <= 1; y++) {
for (int z = -1; z <= 1; z++) {
Block b = e.getBlock().getRelative(x, y, z);
if (b.getType() != Material.AIR && !StringUtils.equals(b.getType().toString(), explosiveblacklist)) {
if (b.getType() != Material.AIR && !b.isLiquid() && !StringUtils.equals(b.getType().toString(), explosiveblacklist)) {
if (CSCoreLib.getLib().getProtectionManager().canBuild(e.getPlayer().getUniqueId(), b)) {
if (SlimefunStartup.instance.isCoreProtectInstalled()) SlimefunStartup.instance.getCoreProtectAPI().logRemoval(e.getPlayer().getName(), b.getLocation(), b.getType(), b.getBlockData());
b.getWorld().playEffect(b.getLocation(), Effect.STEP_SOUND, b.getType());