Skip to content

Commit

Permalink
Fixed custom name bug
Browse files Browse the repository at this point in the history
  • Loading branch information
dentych committed Sep 6, 2015
1 parent 030921f commit cf9c3d3
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/me/tychsen/enchantgui/EshopConfig.java
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

public class EshopConfig {
private static EshopConfig instance;
private JavaPlugin plugin;
private Main plugin;
private FileConfiguration config;

public EshopConfig() {
Expand Down
2 changes: 1 addition & 1 deletion src/me/tychsen/enchantgui/EshopEventManager.java
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ public EshopEventManager() {

/* Public methods */
public void handleInventoryClickEvent(InventoryClickEvent e) {
boolean correctEvent = e.getInventory().getName().toLowerCase().startsWith("enchantgui");
boolean correctEvent = e.getInventory().getName().toLowerCase().startsWith(EshopConfig.getInstance().getMenuName().toLowerCase());
Player p;

if (correctEvent && e.getWhoClicked() instanceof Player) {
Expand Down
2 changes: 1 addition & 1 deletion src/me/tychsen/enchantgui/EshopSystem.java
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ public void showEnchantPage(Player p, ItemStack item) {
playerNavigation.put(p.getName(), 1);

Inventory inv = p.getServer().createInventory(p, inventorySize,
"EnchantGUI");
config.getMenuName());

generateEnchantPage(p, inv, item);
p.openInventory(inv);
Expand Down

0 comments on commit cf9c3d3

Please sign in to comment.