mirror of
https://github.com/essentials/Essentials.git
synced 2025-08-18 04:21:31 +02:00
Fix unbreakable blocks
This commit is contained in:
@@ -272,13 +272,16 @@ public class EssentialsProtectBlockListener extends BlockListener
|
|||||||
storage.unprotectBlock(against);
|
storage.unprotectBlock(against);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return;
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|
||||||
final boolean isProtected = storage.isProtected(block, user.getName());
|
final boolean isProtected = storage.isProtected(block, user.getName());
|
||||||
if (!isProtected)
|
if (isProtected)
|
||||||
|
{
|
||||||
|
event.setCancelled(true);
|
||||||
|
}
|
||||||
|
else
|
||||||
{
|
{
|
||||||
if (type == Material.WALL_SIGN || type == Material.SIGN_POST || type == Material.RAILS)
|
if (type == Material.WALL_SIGN || type == Material.SIGN_POST || type == Material.RAILS)
|
||||||
{
|
{
|
||||||
@@ -306,8 +309,6 @@ public class EssentialsProtectBlockListener extends BlockListener
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
event.setCancelled(true);
|
|
||||||
return;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user