mirror of
https://github.com/TotalFreedomMC/TF-EssentialsX.git
synced 2025-02-14 05:01:28 +00:00
Protect: Get block owners on right click block only
This commit is contained in:
parent
d01e2e0a3b
commit
b974410dd9
1 changed files with 2 additions and 1 deletions
|
@ -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;
|
||||
|
|
Loading…
Reference in a new issue