mirror of
https://github.com/EssentialsX/Essentials.git
synced 2025-03-13 12:56:56 +08:00
Protect: Get block owners on right click block only
This commit is contained in:
parent
d01e2e0a3b
commit
b974410dd9
@ -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…
x
Reference in New Issue
Block a user