mirror of
https://github.com/TotalFreedomMC/TF-EssentialsX.git
synced 2024-08-19 18:01:59 +00:00
Only act on right click, otherwise signs can't be destroyed.
This commit is contained in:
parent
995f18bb0f
commit
60235d0da4
|
@ -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…
Reference in a new issue