SteamWar/BauSystem
Archiviert
13
0

Sign edit only with Empty hand

Dieser Commit ist enthalten in:
Chaoscaot 2021-02-05 18:45:35 +01:00
Ursprung 9b70227f74
Commit f8871d6a8e

Datei anzeigen

@ -32,6 +32,7 @@ import de.steamwar.core.VersionedRunnable;
import org.bukkit.Bukkit; import org.bukkit.Bukkit;
import org.bukkit.ChatColor; import org.bukkit.ChatColor;
import com.comphenix.protocol.ProtocolLibrary; import com.comphenix.protocol.ProtocolLibrary;
import org.bukkit.Material;
import org.bukkit.block.Block; import org.bukkit.block.Block;
import org.bukkit.block.Sign; import org.bukkit.block.Sign;
import org.bukkit.entity.Player; import org.bukkit.entity.Player;
@ -115,7 +116,9 @@ public class RegionListener implements Listener {
public void editSign(PlayerInteractEvent event) { public void editSign(PlayerInteractEvent event) {
if(event.getAction() != Action.RIGHT_CLICK_BLOCK || if(event.getAction() != Action.RIGHT_CLICK_BLOCK ||
!event.getClickedBlock().getType().name().contains("SIGN") || !event.getClickedBlock().getType().name().contains("SIGN") ||
!event.getPlayer().isSneaking()) !event.getPlayer().isSneaking() ||
event.getItem() == null ||
event.getItem().getType() != Material.AIR)
return; return;
Player player = event.getPlayer(); Player player = event.getPlayer();