mirror of
https://github.com/EarthMC/QuickShop-Reremake.git
synced 2026-11-24 17:39:52 -05:00
final fix
Former-commit-id: 00e59fa0a0b8b85c2f9aca43ead4f75c32ae2a2a
This commit is contained in:
1 parent
851f25de7e
commit
f59bd25039
4 files changed
+7
-16
No files matched your search
@@ -64,11 +64,11 @@ public class BlockListener implements Listener {
|
||||
@EventHandler(priority = EventPriority.HIGHEST, ignoreCancelled = true)
|
||||
public void onBreak(BlockBreakEvent e) {
|
||||
Block b = e.getBlock();
|
||||
if(b instanceof Sign) {
|
||||
Sign sign = (Sign)b;
|
||||
if(b.getState() instanceof Sign) {
|
||||
Sign sign = (Sign)b.getState();
|
||||
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)");
|
||||
plugin.getLogger().info("Skipped a dead-lock shop sign.(Lockette or other sign-lock plugin)");
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -83,11 +83,11 @@ public class LockListener implements Listener {
|
||||
@EventHandler(priority = EventPriority.LOW, ignoreCancelled = true)
|
||||
public void onBreak(BlockBreakEvent e) {
|
||||
Block b = e.getBlock();
|
||||
if(b instanceof Sign) {
|
||||
Sign sign = (Sign)b;
|
||||
if(b.getState() instanceof Sign) {
|
||||
Sign sign = (Sign)b.getState();
|
||||
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)");
|
||||
plugin.getLogger().info("Skipped a dead-lock shop sign.(Lockette or other sign-lock plugin)");
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -61,15 +61,6 @@ public class PlayerListener implements Listener {
|
||||
Block b = e.getClickedBlock();
|
||||
if (!Util.canBeShop(b) && b.getType() != Material.WALL_SIGN)
|
||||
return;
|
||||
if(b.getState() instanceof Sign) {
|
||||
Sign sign = (Sign)b.getState();
|
||||
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;
|
||||
}
|
||||
}
|
||||
Player p = e.getPlayer();
|
||||
if (plugin.sneak && !p.isSneaking()) {
|
||||
// Sneak only
|
||||
|
||||
Reference in new issue
Block a user