mirror of
https://github.com/EarthMC/QuickShop-Reremake.git
synced 2026-11-24 17:39:52 -05:00
fix last commit
Former-commit-id: e620570259becd9ef3ecb9d578f5fafe33569a0d
This commit is contained in:
1 parent
db0cee6758
commit
ded9c7ca24
2 files changed
+17
-7
No files matched your search
@@ -84,6 +84,14 @@ public class BlockListener implements Listener {
|
||||
shop.delete();
|
||||
p.sendMessage(MsgUtil.getMessage("success-removed-shop"));
|
||||
} else if (b.getType() == Material.WALL_SIGN) {
|
||||
if(b instanceof Sign) {
|
||||
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)");
|
||||
return;
|
||||
}
|
||||
}
|
||||
Shop shop = getShopNextTo(b.getLocation());
|
||||
if (shop == null)
|
||||
return;
|
||||
@@ -97,13 +105,6 @@ public class BlockListener implements Listener {
|
||||
if (e.isCancelled()) {
|
||||
return;
|
||||
}
|
||||
if(b instanceof Sign) {
|
||||
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
|
||||
return;
|
||||
}
|
||||
}
|
||||
e.setCancelled(true);
|
||||
// Cancel the event so that the sign does not
|
||||
// drop.. TODO: Find a better way.
|
||||
|
||||
@@ -2,6 +2,7 @@ package org.maxgamer.quickshop.Listeners;
|
||||
|
||||
import org.bukkit.Material;
|
||||
import org.bukkit.block.Block;
|
||||
import org.bukkit.block.Sign;
|
||||
import org.bukkit.entity.Player;
|
||||
import org.bukkit.event.EventHandler;
|
||||
import org.bukkit.event.EventPriority;
|
||||
@@ -95,6 +96,14 @@ public class LockListener implements Listener {
|
||||
return;
|
||||
}
|
||||
} else if (b.getType() == Material.WALL_SIGN) {
|
||||
if(b instanceof Sign) {
|
||||
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)");
|
||||
return;
|
||||
}
|
||||
}
|
||||
b = Util.getAttached(b);
|
||||
if (b == null)
|
||||
return;
|
||||
|
||||
Reference in new issue
Block a user