mirror of
https://github.com/EssentialsX/Essentials.git
synced 2025-01-25 01:21:26 +01:00
Prevent disabled sign creation (if any of essentials signs are enabled)
This commit is contained in:
parent
ebb3a77430
commit
27365d1f1b
@ -90,8 +90,9 @@ public class SignBlockListener implements Listener
|
||||
event.setLine(i, event.getLine(i).replaceAll("&([0-9a-f])", "§$1"));
|
||||
}
|
||||
}
|
||||
for (EssentialsSign sign : ess.getSettings().enabledSigns())
|
||||
for (Signs signs : Signs.values())
|
||||
{
|
||||
final EssentialsSign sign = signs.getSign();
|
||||
if (event.getLine(0).equalsIgnoreCase(sign.getSuccessName()))
|
||||
{
|
||||
event.setCancelled(true);
|
||||
@ -128,8 +129,9 @@ public class SignBlockListener implements Listener
|
||||
{
|
||||
return;
|
||||
}
|
||||
for (EssentialsSign sign : ess.getSettings().enabledSigns())
|
||||
for (Signs signs : Signs.values())
|
||||
{
|
||||
final EssentialsSign sign = signs.getSign();
|
||||
if (sign.getBlocks().contains(block.getType())
|
||||
&& !sign.onBlockPlace(block, event.getPlayer(), ess))
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user