Protect: Get block owners on right click block only

This commit is contained in:
ementalo 2011-06-11 08:37:05 +01:00
parent d01e2e0a3b
commit b974410dd9
1 changed files with 2 additions and 1 deletions

View File

@ -7,6 +7,7 @@ import org.bukkit.event.player.PlayerListener;
import org.bukkit.inventory.ItemStack;
import com.earth2me.essentials.User;
import com.earth2me.essentials.Util;
import org.bukkit.event.block.Action;
public class EssentialsProtectPlayerListener extends PlayerListener
@ -45,7 +46,7 @@ public class EssentialsProtectPlayerListener extends PlayerListener
return;
}
if (user.isAuthorized("essentials.protect.admin"))
if (user.isAuthorized("essentials.protect.admin") && event.getAction() == Action.RIGHT_CLICK_BLOCK)
{
final StringBuilder stringBuilder = new StringBuilder();
boolean first = true;