mirror of
https://github.com/TotalFreedomMC/TF-EssentialsX.git
synced 2025-08-04 11:36:24 +00:00
Only act on right click, otherwise signs can't be destroyed.
This commit is contained in:
parent
995f18bb0f
commit
60235d0da4
1 changed files with 5 additions and 0 deletions
|
@ -5,6 +5,7 @@ import org.bukkit.Material;
|
|||
import org.bukkit.block.Block;
|
||||
import org.bukkit.block.Sign;
|
||||
import org.bukkit.craftbukkit.block.CraftSign;
|
||||
import org.bukkit.event.block.Action;
|
||||
import org.bukkit.event.player.PlayerInteractEvent;
|
||||
import org.bukkit.event.player.PlayerListener;
|
||||
|
||||
|
@ -30,6 +31,10 @@ public class SignPlayerListener extends PlayerListener
|
|||
final int mat = block.getTypeId();
|
||||
if (mat == Material.SIGN_POST.getId() || mat == Material.WALL_SIGN.getId())
|
||||
{
|
||||
if (event.getAction() != Action.RIGHT_CLICK_BLOCK)
|
||||
{
|
||||
return;
|
||||
}
|
||||
final Sign csign = new CraftSign(block);
|
||||
for (Signs signs : Signs.values())
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue