Permalink
Browse files

Improved SignEditListener#willEditMagicSign

  • Loading branch information...
1 parent 1bc7e63 commit a150013b26608b595938dffc385b1ec9ea1a07da @Philipp15b committed Apr 16, 2012
Showing with 4 additions and 6 deletions.
  1. +4 −6 src/main/java/de/philworld/bukkit/magicsigns/signedit/SignEditListener.java
@@ -109,15 +109,13 @@ public void onSignChange(SignChangeEvent event) {
* @return
*/
public boolean willEditMagicSign(PlayerInteractEvent event) {
+ if (signEdit.getEditMode(event.getPlayer()) == EditMode.NONE)
+ return false;
if (isSign(event.getClickedBlock().getType())
&& event.getItem() != null && isSign(event.getItem().getType())) {
- if (signEdit.getEditMode(event.getPlayer()) == EditMode.NONE)
- return false;
- else
- return true;
- } else {
- return false;
+ return true;
}
+ return false;
}
private boolean isSign(Material material) {

0 comments on commit a150013

Please sign in to comment.