mirror of
https://github.com/EarthMC/QuickShop-Reremake.git
synced 2026-11-24 17:39:52 -05:00
Fix break shop and /qs reload, shop will reappear
Former-commit-id: abe26ee9069908737d7d0c116bb9c9d6e0be8279 [formerly 9b4b2b7faed54794216d3a612d15958f867c4fc6] Former-commit-id: 691807a3734450932dcf88f1afe4edb6cc10440f
This commit is contained in:
1 parent
09f689497f
commit
bd6eace8d5
1 file changed
+9
@@ -1,5 +1,7 @@
|
||||
package org.maxgamer.quickshop.Listeners;
|
||||
|
||||
import java.sql.SQLException;
|
||||
|
||||
import org.bukkit.ChatColor;
|
||||
import org.bukkit.GameMode;
|
||||
import org.bukkit.Location;
|
||||
@@ -25,6 +27,7 @@ import org.bukkit.event.entity.EntityExplodeEvent;
|
||||
import org.bukkit.event.inventory.InventoryMoveItemEvent;
|
||||
import org.bukkit.event.world.StructureGrowEvent;
|
||||
import org.maxgamer.quickshop.QuickShop;
|
||||
import org.maxgamer.quickshop.Database.DatabaseHelper;
|
||||
import org.maxgamer.quickshop.Shop.Info;
|
||||
import org.maxgamer.quickshop.Shop.Shop;
|
||||
import org.maxgamer.quickshop.Shop.ShopAction;
|
||||
@@ -87,6 +90,12 @@ public class BlockListener implements Listener {
|
||||
action.setAction(ShopAction.CANCELLED);
|
||||
}
|
||||
shop.delete();
|
||||
try {
|
||||
DatabaseHelper.removeShop(plugin.getDB(), shop.getLocation().getBlockX(), shop.getLocation().getBlockY(), shop.getLocation().getBlockZ(), shop.getLocation().getWorld().getName());
|
||||
} catch (SQLException e1) {
|
||||
// TODO Auto-generated catch block
|
||||
e1.printStackTrace();
|
||||
}
|
||||
p.sendMessage(MsgUtil.getMessage("success-removed-shop"));
|
||||
} else if (b.getType() == Material.WALL_SIGN) {
|
||||
if(b instanceof Sign) {
|
||||
|
||||
Reference in new issue
Block a user