mirror of
https://github.com/EarthMC/QuickShop-Reremake.git
synced 2026-11-24 17:39:52 -05:00
add wallsign check
Former-commit-id: d7d457fdf7ba047ac5b54063e261220334a8857f
This commit is contained in:
1 parent
f9f575626b
commit
5f19d92c6e
1 file changed
+3
-1
@@ -9,6 +9,7 @@ import org.bukkit.Location;
|
||||
import org.bukkit.Material;
|
||||
import org.bukkit.block.Block;
|
||||
import org.bukkit.block.Sign;
|
||||
import org.bukkit.block.data.type.WallSign;
|
||||
import org.bukkit.entity.Player;
|
||||
import org.bukkit.event.EventHandler;
|
||||
import org.bukkit.event.EventPriority;
|
||||
@@ -60,11 +61,12 @@ public class PlayerListener implements Listener {
|
||||
Block b = e.getClickedBlock();
|
||||
if (!Util.canBeShop(b) && b.getType() != Material.WALL_SIGN)
|
||||
return;
|
||||
if(b instanceof Sign) {
|
||||
if(b.getState() instanceof Sign || b instanceof WallSign) {
|
||||
Sign sign = (Sign)b;
|
||||
if(sign.getLine(0).equals(plugin.getConfig().getString("lockette.private"))||sign.getLine(0).equals(plugin.getConfig().getString("lockette.more_users"))){
|
||||
//Ignore break lockette sign
|
||||
plugin.getLogger().info("Skipped a dead-lock shop sign.(Lockette)");
|
||||
b.breakNaturally();
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user