diff options
author | snowleo <schneeleo@gmail.com> | 2011-07-20 22:04:02 +0200 |
---|---|---|
committer | snowleo <schneeleo@gmail.com> | 2011-07-20 22:04:02 +0200 |
commit | fcda9f9d3b1d928c55a1059915f7500d80246d5d (patch) | |
tree | 16cecce984916ae49c2753cecfba65734eb23869 | |
parent | aa663c0c98b5677db0e0b34abff11b0f5f3d1529 (diff) | |
download | Essentials-fcda9f9d3b1d928c55a1059915f7500d80246d5d.tar Essentials-fcda9f9d3b1d928c55a1059915f7500d80246d5d.tar.gz Essentials-fcda9f9d3b1d928c55a1059915f7500d80246d5d.tar.lz Essentials-fcda9f9d3b1d928c55a1059915f7500d80246d5d.tar.xz Essentials-fcda9f9d3b1d928c55a1059915f7500d80246d5d.zip |
Prevent players to create correct signs with essentials.signs.color permission.
-rw-r--r-- | Essentials/src/com/earth2me/essentials/signs/SignBlockListener.java | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/Essentials/src/com/earth2me/essentials/signs/SignBlockListener.java b/Essentials/src/com/earth2me/essentials/signs/SignBlockListener.java index 7574b7691..e772a5108 100644 --- a/Essentials/src/com/earth2me/essentials/signs/SignBlockListener.java +++ b/Essentials/src/com/earth2me/essentials/signs/SignBlockListener.java @@ -88,6 +88,14 @@ public class SignBlockListener extends BlockListener { return; } + User user = ess.getUser(event.getPlayer()); + if (user.isAuthorized("essentials.signs.color")) + { + for (int i = 0; i < 4; i++) + { + event.setLine(i, event.getLine(i).replaceAll("&([0-9a-f])", "§$1")); + } + } for (Signs signs : Signs.values()) { final EssentialsSign sign = signs.getSign(); @@ -103,14 +111,6 @@ public class SignBlockListener extends BlockListener return; } } - User user = ess.getUser(event.getPlayer()); - if (user.isAuthorized("essentials.signs.color")) - { - for (int i = 0; i < 4; i++) - { - event.setLine(i, event.getLine(i).replaceAll("&([0-9a-f])", "§$1")); - } - } } @Override |