Skip to content

Commit

Permalink
Added permission check for placing of signs.
Browse files Browse the repository at this point in the history
Yep.
  • Loading branch information
501st-alpha1 committed Nov 11, 2012
1 parent cc5b179 commit ee27e45
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 1 deletion.
Binary file modified com/scott_weldon/xp_to_emerald/XPtoEmeraldListener.class
Binary file not shown.
4 changes: 4 additions & 0 deletions com/scott_weldon/xp_to_emerald/XPtoEmeraldListener.java
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,10 @@ public void onSignPlace(SignChangeEvent e) {
if (!lines[0].equalsIgnoreCase("[xptoemerald]")) {
return;
}
if (!p.hasPermission("xptoemerald.admin")) {
p.sendMessage("You don't have permission for that!");
return;
}
if (!lines[1].equalsIgnoreCase("xte") && !lines[1].equalsIgnoreCase("etx")) {
p.sendMessage("Invalid conversion type! (Second line of sign.)");
sign.breakNaturally();
Expand Down
2 changes: 1 addition & 1 deletion plugin.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: XP to Emerald
main: com.scott_weldon.xp_to_emerald.XPtoEmerald
version: 0.5.0
version: 0.5.1
commands:
xptoemerald:
description: Convert some XP to Emeralds.
Expand Down

0 comments on commit ee27e45

Please sign in to comment.