mirror of
https://e.coding.net/circlecloud/QuickShop.git
synced 2024-11-22 01:58:54 +00:00
Bugfix #8 - config reload for items blacklist and shoppables
This commit is contained in:
parent
f085a5dda3
commit
4b18f5b0ef
@ -119,6 +119,10 @@ public class QuickShop extends JavaPlugin {
|
||||
debug = true;
|
||||
if (loadEcon() == false)
|
||||
return;
|
||||
|
||||
// Initialize Util
|
||||
Util.initialize();
|
||||
|
||||
// Create the shop manager.
|
||||
this.shopManager = new ShopManager(this);
|
||||
if (this.display) {
|
||||
@ -250,6 +254,7 @@ public class QuickShop extends JavaPlugin {
|
||||
e.printStackTrace();
|
||||
getLogger().severe("Could not load shops.");
|
||||
}
|
||||
|
||||
getLogger().info("Loaded " + count + " shops.");
|
||||
MsgUtil.loadTransactionMessages();
|
||||
MsgUtil.clean();
|
||||
|
@ -235,12 +235,7 @@ public class ShopManager {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
PlayerInteractEvent pie = new PlayerInteractEvent(p, Action.RIGHT_CLICK_BLOCK, new ItemStack(Material.AIR), b, bf); // PIE
|
||||
// =
|
||||
// PlayerInteractEvent
|
||||
// -
|
||||
// What
|
||||
// else?
|
||||
PlayerInteractEvent pie = new PlayerInteractEvent(p, Action.RIGHT_CLICK_BLOCK, new ItemStack(Material.AIR), b, bf); // PIE = PlayerInteractEvent - What else?
|
||||
Bukkit.getPluginManager().callEvent(pie);
|
||||
pie.getPlayer().closeInventory(); // If the player has chat open, this
|
||||
// will close their chat.
|
||||
|
@ -33,7 +33,13 @@ public class Util {
|
||||
private static HashSet<Material> shoppables = new HashSet<Material>();
|
||||
private static HashSet<Material> transparent = new HashSet<Material>();
|
||||
private static QuickShop plugin;
|
||||
static {
|
||||
|
||||
public static void initialize() {
|
||||
tools.clear();
|
||||
blacklist.clear();
|
||||
shoppables.clear();
|
||||
transparent.clear();
|
||||
|
||||
plugin = QuickShop.instance;
|
||||
for (String s : plugin.getConfig().getStringList("shop-blocks")) {
|
||||
Material mat = Material.getMaterial(s.toUpperCase());
|
||||
@ -110,7 +116,7 @@ public class Util {
|
||||
}
|
||||
blacklist.add(mat);
|
||||
}
|
||||
transparent.clear();
|
||||
|
||||
// ToDo: add extras to config file
|
||||
addTransparentBlock(Material.AIR);
|
||||
/* Misc */
|
||||
|
Loading…
Reference in New Issue
Block a user