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;
|
debug = true;
|
||||||
if (loadEcon() == false)
|
if (loadEcon() == false)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
// Initialize Util
|
||||||
|
Util.initialize();
|
||||||
|
|
||||||
// Create the shop manager.
|
// Create the shop manager.
|
||||||
this.shopManager = new ShopManager(this);
|
this.shopManager = new ShopManager(this);
|
||||||
if (this.display) {
|
if (this.display) {
|
||||||
@ -250,6 +254,7 @@ public class QuickShop extends JavaPlugin {
|
|||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
getLogger().severe("Could not load shops.");
|
getLogger().severe("Could not load shops.");
|
||||||
}
|
}
|
||||||
|
|
||||||
getLogger().info("Loaded " + count + " shops.");
|
getLogger().info("Loaded " + count + " shops.");
|
||||||
MsgUtil.loadTransactionMessages();
|
MsgUtil.loadTransactionMessages();
|
||||||
MsgUtil.clean();
|
MsgUtil.clean();
|
||||||
|
@ -235,12 +235,7 @@ public class ShopManager {
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
PlayerInteractEvent pie = new PlayerInteractEvent(p, Action.RIGHT_CLICK_BLOCK, new ItemStack(Material.AIR), b, bf); // PIE
|
PlayerInteractEvent pie = new PlayerInteractEvent(p, Action.RIGHT_CLICK_BLOCK, new ItemStack(Material.AIR), b, bf); // PIE = PlayerInteractEvent - What else?
|
||||||
// =
|
|
||||||
// PlayerInteractEvent
|
|
||||||
// -
|
|
||||||
// What
|
|
||||||
// else?
|
|
||||||
Bukkit.getPluginManager().callEvent(pie);
|
Bukkit.getPluginManager().callEvent(pie);
|
||||||
pie.getPlayer().closeInventory(); // If the player has chat open, this
|
pie.getPlayer().closeInventory(); // If the player has chat open, this
|
||||||
// will close their chat.
|
// will close their chat.
|
||||||
|
@ -33,7 +33,13 @@ public class Util {
|
|||||||
private static HashSet<Material> shoppables = new HashSet<Material>();
|
private static HashSet<Material> shoppables = new HashSet<Material>();
|
||||||
private static HashSet<Material> transparent = new HashSet<Material>();
|
private static HashSet<Material> transparent = new HashSet<Material>();
|
||||||
private static QuickShop plugin;
|
private static QuickShop plugin;
|
||||||
static {
|
|
||||||
|
public static void initialize() {
|
||||||
|
tools.clear();
|
||||||
|
blacklist.clear();
|
||||||
|
shoppables.clear();
|
||||||
|
transparent.clear();
|
||||||
|
|
||||||
plugin = QuickShop.instance;
|
plugin = QuickShop.instance;
|
||||||
for (String s : plugin.getConfig().getStringList("shop-blocks")) {
|
for (String s : plugin.getConfig().getStringList("shop-blocks")) {
|
||||||
Material mat = Material.getMaterial(s.toUpperCase());
|
Material mat = Material.getMaterial(s.toUpperCase());
|
||||||
@ -110,7 +116,7 @@ public class Util {
|
|||||||
}
|
}
|
||||||
blacklist.add(mat);
|
blacklist.add(mat);
|
||||||
}
|
}
|
||||||
transparent.clear();
|
|
||||||
// ToDo: add extras to config file
|
// ToDo: add extras to config file
|
||||||
addTransparentBlock(Material.AIR);
|
addTransparentBlock(Material.AIR);
|
||||||
/* Misc */
|
/* Misc */
|
||||||
|
Loading…
Reference in New Issue
Block a user