Inventory Menu Error

Discussion in 'Plugin Development' started by TheBlack100, Apr 7, 2014.

Thread Status:
Not open for further replies.
  1. Offline

    TheBlack100

    Hello I have a bug in my plugin is an error in the inventory menu of the error is
    HTML:
    [16:46:55 ERROR]: Could not pass event InventoryClickEvent to Hub v1.0
    org.bukkit.event.EventException
            at org.bukkit.plugin.java.JavaPluginLoader$1.execute(JavaPluginLoader.ja
    va:320) ~[craftbukkit.jar:git-Bukkit-1.7.2-R0.3-b3020jnks]
            at org.bukkit.plugin.RegisteredListener.callEvent(RegisteredListener.jav
    a:62) ~[craftbukkit.jar:git-Bukkit-1.7.2-R0.3-b3020jnks]
            at org.bukkit.plugin.SimplePluginManager.fireEvent(SimplePluginManager.j
    ava:486) [craftbukkit.jar:git-Bukkit-1.7.2-R0.3-b3020jnks]
            at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.j
    ava:471) [craftbukkit.jar:git-Bukkit-1.7.2-R0.3-b3020jnks]
            at net.minecraft.server.v1_7_R1.PlayerConnection.a(PlayerConnection.java
    :1361) [craftbukkit.jar:git-Bukkit-1.7.2-R0.3-b3020jnks]
            at net.minecraft.server.v1_7_R1.PacketPlayInWindowClick.a(SourceFile:32)
    [craftbukkit.jar:git-Bukkit-1.7.2-R0.3-b3020jnks]
            at net.minecraft.server.v1_7_R1.PacketPlayInWindowClick.handle(SourceFil
    e:10) [craftbukkit.jar:git-Bukkit-1.7.2-R0.3-b3020jnks]
            at net.minecraft.server.v1_7_R1.NetworkManager.a(NetworkManager.java:146
    ) [craftbukkit.jar:git-Bukkit-1.7.2-R0.3-b3020jnks]
            at net.minecraft.server.v1_7_R1.ServerConnection.c(SourceFile:134) [craf
    tbukkit.jar:git-Bukkit-1.7.2-R0.3-b3020jnks]
            at net.minecraft.server.v1_7_R1.MinecraftServer.u(MinecraftServer.java:6
    55) [craftbukkit.jar:git-Bukkit-1.7.2-R0.3-b3020jnks]
            at net.minecraft.server.v1_7_R1.DedicatedServer.u(DedicatedServer.java:2
    50) [craftbukkit.jar:git-Bukkit-1.7.2-R0.3-b3020jnks]
            at net.minecraft.server.v1_7_R1.MinecraftServer.t(MinecraftServer.java:5
    45) [craftbukkit.jar:git-Bukkit-1.7.2-R0.3-b3020jnks]
            at net.minecraft.server.v1_7_R1.MinecraftServer.run(MinecraftServer.java
    :457) [craftbukkit.jar:git-Bukkit-1.7.2-R0.3-b3020jnks]
            at net.minecraft.server.v1_7_R1.ThreadServerApplication.run(SourceFile:6
    17) [craftbukkit.jar:git-Bukkit-1.7.2-R0.3-b3020jnks]
    Caused by: java.lang.NullPointerException
            at me.rick.hub.ItemsFuncions.HatsMain.onInventoryClick(HatsMain.java:64)
    ~[?:?]
            at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.7.0
    _45]
            at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) ~[?:1.7.0
    _45]
            at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) ~[?:1
    .7.0_45]
            at java.lang.reflect.Method.invoke(Unknown Source) ~[?:1.7.0_45]
            at org.bukkit.plugin.java.JavaPluginLoader$1.execute(JavaPluginLoader.ja
    va:318) ~[craftbukkit.jar:git-Bukkit-1.7.2-R0.3-b3020jnks]
            ... 13 more
    The code I used in the menu is

    Code:java
    1. public static Inventory HatsMenu;
    2.  
    3. static {
    4.  
    5. HatsMenu = Bukkit.getServer().createInventory(null, 9, ChatColor.BLACK + "Hats Menu");
    6.  
    7. ItemStack Blocos = new ItemStack(Material.STONE);
    8. ItemMeta BlocosItemMeta = Blocos.getItemMeta();
    9. BlocosItemMeta.setDisplayName(ChatColor.AQUA + "Blocks");
    10. Blocos.setItemMeta(BlocosItemMeta);
    11.  
    12. ItemStack skull = new ItemStack(Material.SKULL_ITEM, 1, (short)SkullType.PLAYER.ordinal());
    13.  
    14. SkullMeta meta = (SkullMeta)skull.getItemMeta();
    15. meta.setOwner("thebiglebowski33");
    16. meta.setDisplayName(ChatColor.DARK_RED + "Youtubers");
    17. skull.setItemMeta(meta);
    18.  
    19. ItemStack SairDoMenu = new ItemStack(Material.REDSTONE_TORCH_ON);
    20. ItemMeta SairDoMenuMeta = SairDoMenu.getItemMeta();
    21. SairDoMenuMeta.setDisplayName(ChatColor.RED + "Quit");
    22. SairDoMenu.setItemMeta(SairDoMenuMeta);
    23.  
    24. ItemStack Air = new ItemStack(Material.AIR);
    25.  
    26. HatsMenu.setItem(0, Blocos);
    27. HatsMenu.setItem(1, skull);
    28.  
    29. }
    30. @EventHandler
    31. public void onInventoryClick(InventoryClickEvent e){
    32.  
    33. Player p = (Player) e.getWhoClicked();
    34. if(!e.getInventory().getName().equalsIgnoreCase(HatsMenu.getName())) return;
    35. if (e.getCurrentItem().getItemMeta() != null) {
    36. if(e.getCurrentItem().getType() == Material.STONE){
    37. e.setCancelled(true);
    38. p.openInventory(HatsBlocos.hat);
    39. }
    40. }
    41. }
    42. }
     
  2. Offline

    chikenlitle99

    Code:java
    1. HatsMain.onInventoryClick(HatsMain.java:64)


    The error is in the "HatsMain" class on line 64, which is in that line?
     
  3. Offline

    JBoss925

    Please post all your code in HatsMain so we can see line 64. Also please check out this to learn how to read stack traces. It is very simple.
     
  4. Offline

    TheBlack100



    Code:java
    1. import me.rick.hub.Hub;
    2.  
    3. import org.bukkit.Bukkit;
    4. import org.bukkit.ChatColor;
    5. import org.bukkit.Material;
    6. import org.bukkit.SkullType;
    7. import org.bukkit.Sound;
    8. import org.bukkit.entity.HumanEntity;
    9. import org.bukkit.entity.Player;
    10. import org.bukkit.event.EventHandler;
    11. import org.bukkit.event.Listener;
    12. import org.bukkit.event.inventory.InventoryClickEvent;
    13. import org.bukkit.inventory.Inventory;
    14. import org.bukkit.inventory.ItemStack;
    15. import org.bukkit.inventory.PlayerInventory;
    16. import org.bukkit.inventory.meta.ItemMeta;
    17. import org.bukkit.inventory.meta.SkullMeta;
    18. import org.bukkit.plugin.Plugin;
    19.  
    20. public class HatsMain implements Listener {
    21.  
    22. private Hub pl;
    23.  
    24. public HatsMain(Hub pl)
    25. {
    26. this.pl = pl;
    27. }
    28. public Inventory HatsMenu;
    29.  
    30. public void Menu(Plugin p) {
    31.  
    32. HatsMenu = Bukkit.getServer().createInventory(null, 9, ChatColor.BLACK + "Hats Menu");
    33.  
    34. ItemStack Blocos = new ItemStack(Material.STONE);
    35. ItemMeta BlocosItemMeta = Blocos.getItemMeta();
    36. BlocosItemMeta.setDisplayName(ChatColor.AQUA + "Blocks");
    37. Blocos.setItemMeta(BlocosItemMeta);
    38.  
    39. ItemStack skull = new ItemStack(Material.SKULL_ITEM, 1, (short)SkullType.PLAYER.ordinal());
    40.  
    41. SkullMeta meta = (SkullMeta)skull.getItemMeta();
    42. meta.setOwner("thebiglebowski33");
    43. meta.setDisplayName(ChatColor.DARK_RED + "Youtubers");
    44. skull.setItemMeta(meta);
    45.  
    46. ItemStack SairDoMenu = new ItemStack(Material.REDSTONE_TORCH_ON);
    47. ItemMeta SairDoMenuMeta = SairDoMenu.getItemMeta();
    48. SairDoMenuMeta.setDisplayName(ChatColor.RED + "Quit");
    49. SairDoMenu.setItemMeta(SairDoMenuMeta);
    50.  
    51. ItemStack Air = new ItemStack(Material.AIR);
    52.  
    53. HatsMenu.setItem(0, Blocos);
    54. HatsMenu.setItem(1, skull);
    55.  
    56. }
    57. public void show(Player p) {
    58. p.openInventory(HatsMenu);
    59. }
    60. @EventHandler
    61. public void onInventoryClick(InventoryClickEvent e){
    62.  
    63. Player p = (Player) e.getWhoClicked();
    64. if(!e.getInventory().getName().equalsIgnoreCase(HatsMenu.getName())) return;
    65. if (e.getCurrentItem().getItemMeta() != null) {
    66. if(e.getCurrentItem().getType() == Material.STONE){
    67. e.setCancelled(true);
    68. p.openInventory(HatsBlocos.hat);
    69. }
    70. }
    71. }
    72. }
     
  5. Offline

    Garris0n

    1. Your method and variable names do not follow Java naming conventions. Fix that.
    2. Where are you calling this code?
     
  6. Offline

    Minnymin3

    Check that the inventory name is not null
     
  7. Offline

    TheBlack100

    What would be the correct code?
     
  8. Offline

    Garris0n

  9. Offline

    TheBlack100

    I just need to resolve this error it happens when I click off the inventory menu it open
    HTML:
    [12:15:37 ERROR]: Could not pass event InventoryClickEvent to Hub v1.0
    org.bukkit.event.EventException
            at org.bukkit.plugin.java.JavaPluginLoader$1.execute(JavaPluginLoader.ja
    va:320) ~[craftbukkit.jar:git-Bukkit-1.7.2-R0.3-b3020jnks]
            at org.bukkit.plugin.RegisteredListener.callEvent(RegisteredListener.jav
    a:62) ~[craftbukkit.jar:git-Bukkit-1.7.2-R0.3-b3020jnks]
            at org.bukkit.plugin.SimplePluginManager.fireEvent(SimplePluginManager.j
    ava:486) [craftbukkit.jar:git-Bukkit-1.7.2-R0.3-b3020jnks]
            at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.j
    ava:471) [craftbukkit.jar:git-Bukkit-1.7.2-R0.3-b3020jnks]
            at net.minecraft.server.v1_7_R1.PlayerConnection.a(PlayerConnection.java
    :1361) [craftbukkit.jar:git-Bukkit-1.7.2-R0.3-b3020jnks]
            at net.minecraft.server.v1_7_R1.PacketPlayInWindowClick.a(SourceFile:32)
    [craftbukkit.jar:git-Bukkit-1.7.2-R0.3-b3020jnks]
            at net.minecraft.server.v1_7_R1.PacketPlayInWindowClick.handle(SourceFil
    e:10) [craftbukkit.jar:git-Bukkit-1.7.2-R0.3-b3020jnks]
            at net.minecraft.server.v1_7_R1.NetworkManager.a(NetworkManager.java:146
    ) [craftbukkit.jar:git-Bukkit-1.7.2-R0.3-b3020jnks]
            at net.minecraft.server.v1_7_R1.ServerConnection.c(SourceFile:134) [craf
    tbukkit.jar:git-Bukkit-1.7.2-R0.3-b3020jnks]
            at net.minecraft.server.v1_7_R1.MinecraftServer.u(MinecraftServer.java:6
    55) [craftbukkit.jar:git-Bukkit-1.7.2-R0.3-b3020jnks]
            at net.minecraft.server.v1_7_R1.DedicatedServer.u(DedicatedServer.java:2
    50) [craftbukkit.jar:git-Bukkit-1.7.2-R0.3-b3020jnks]
            at net.minecraft.server.v1_7_R1.MinecraftServer.t(MinecraftServer.java:5
    45) [craftbukkit.jar:git-Bukkit-1.7.2-R0.3-b3020jnks]
            at net.minecraft.server.v1_7_R1.MinecraftServer.run(MinecraftServer.java
    :457) [craftbukkit.jar:git-Bukkit-1.7.2-R0.3-b3020jnks]
            at net.minecraft.server.v1_7_R1.ThreadServerApplication.run(SourceFile:6
    17) [craftbukkit.jar:git-Bukkit-1.7.2-R0.3-b3020jnks]
    Caused by: java.lang.NullPointerException
            at me.rick.hub.Hub.onInventoryClick(Hub.java:88) ~[?:?]
            at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.7.0
    _45]
            at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) ~[?:1.7.0
    _45]
            at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) ~[?:1
    .7.0_45]
            at java.lang.reflect.Method.invoke(Unknown Source) ~[?:1.7.0_45]
            at org.bukkit.plugin.java.JavaPluginLoader$1.execute(JavaPluginLoader.ja
    va:318) ~[craftbukkit.jar:git-Bukkit-1.7.2-R0.3-b3020jnks]
            ... 13 more
     
  10. Offline

    TheBlack100

    Help please
     
  11. Offline

    chikenlitle99

    @TheBlack100
    Chnage this:
    Code:java
    1. if(!e.getInventory().getName().equalsIgnoreCase(HatsMenu.getName())) return;
    2. if (e.getCurrentItem().getItemMeta() != null) {


    For this:
    Code:java
    1. if (!e.getInventory().getName().equalsIgnoreCase(HatsMenu.getName())) return;
    2. if (e.getCurrentItem() == null) return;
    3. if (e.getCurrentItem().getItemMeta() == null) return;
     
  12. Offline

    TheBlack100

    Gave the following error
    HTML:
    [12:16:25 ERROR]: Could not pass event InventoryClickEvent to Hub v1.0
    org.bukkit.event.EventException
            at org.bukkit.plugin.java.JavaPluginLoader$1.execute(JavaPluginLoader.ja
    va:320) ~[craftbukkit.jar:git-Bukkit-1.7.2-R0.3-b3020jnks]
            at org.bukkit.plugin.RegisteredListener.callEvent(RegisteredListener.jav
    a:62) ~[craftbukkit.jar:git-Bukkit-1.7.2-R0.3-b3020jnks]
            at org.bukkit.plugin.SimplePluginManager.fireEvent(SimplePluginManager.j
    ava:486) [craftbukkit.jar:git-Bukkit-1.7.2-R0.3-b3020jnks]
            at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.j
    ava:471) [craftbukkit.jar:git-Bukkit-1.7.2-R0.3-b3020jnks]
            at net.minecraft.server.v1_7_R1.PlayerConnection.a(PlayerConnection.java
    :1361) [craftbukkit.jar:git-Bukkit-1.7.2-R0.3-b3020jnks]
            at net.minecraft.server.v1_7_R1.PacketPlayInWindowClick.a(SourceFile:32)
    [craftbukkit.jar:git-Bukkit-1.7.2-R0.3-b3020jnks]
            at net.minecraft.server.v1_7_R1.PacketPlayInWindowClick.handle(SourceFil
    e:10) [craftbukkit.jar:git-Bukkit-1.7.2-R0.3-b3020jnks]
            at net.minecraft.server.v1_7_R1.NetworkManager.a(NetworkManager.java:146
    ) [craftbukkit.jar:git-Bukkit-1.7.2-R0.3-b3020jnks]
            at net.minecraft.server.v1_7_R1.ServerConnection.c(SourceFile:134) [craf
    tbukkit.jar:git-Bukkit-1.7.2-R0.3-b3020jnks]
            at net.minecraft.server.v1_7_R1.MinecraftServer.u(MinecraftServer.java:6
    55) [craftbukkit.jar:git-Bukkit-1.7.2-R0.3-b3020jnks]
            at net.minecraft.server.v1_7_R1.DedicatedServer.u(DedicatedServer.java:2
    50) [craftbukkit.jar:git-Bukkit-1.7.2-R0.3-b3020jnks]
            at net.minecraft.server.v1_7_R1.MinecraftServer.t(MinecraftServer.java:5
    45) [craftbukkit.jar:git-Bukkit-1.7.2-R0.3-b3020jnks]
            at net.minecraft.server.v1_7_R1.MinecraftServer.run(MinecraftServer.java
    :457) [craftbukkit.jar:git-Bukkit-1.7.2-R0.3-b3020jnks]
            at net.minecraft.server.v1_7_R1.ThreadServerApplication.run(SourceFile:6
    17) [craftbukkit.jar:git-Bukkit-1.7.2-R0.3-b3020jnks]
    Caused by: java.lang.NullPointerException
            at me.rick.hub.Hub.onInventoryClick(Hub.java:89) ~[?:?]
            at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.7.0
    _45]
            at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) ~[?:1.7.0
    _45]
            at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) ~[?:1
    .7.0_45]
            at java.lang.reflect.Method.invoke(Unknown Source) ~[?:1.7.0_45]
            at org.bukkit.plugin.java.JavaPluginLoader$1.execute(JavaPluginLoader.ja
    va:318) ~[craftbukkit.jar:git-Bukkit-1.7.2-R0.3-b3020jnks]
            ... 13 more
    [12:16:25 ERROR]: Could not pass event InventoryClickEvent to Hub v1.0
    org.bukkit.event.EventException
            at org.bukkit.plugin.java.JavaPluginLoader$1.execute(JavaPluginLoader.ja
    va:320) ~[craftbukkit.jar:git-Bukkit-1.7.2-R0.3-b3020jnks]
            at org.bukkit.plugin.RegisteredListener.callEvent(RegisteredListener.jav
    a:62) ~[craftbukkit.jar:git-Bukkit-1.7.2-R0.3-b3020jnks]
            at org.bukkit.plugin.SimplePluginManager.fireEvent(SimplePluginManager.j
    ava:486) [craftbukkit.jar:git-Bukkit-1.7.2-R0.3-b3020jnks]
            at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.j
    ava:471) [craftbukkit.jar:git-Bukkit-1.7.2-R0.3-b3020jnks]
            at net.minecraft.server.v1_7_R1.PlayerConnection.a(PlayerConnection.java
    :1361) [craftbukkit.jar:git-Bukkit-1.7.2-R0.3-b3020jnks]
            at net.minecraft.server.v1_7_R1.PacketPlayInWindowClick.a(SourceFile:32)
    [craftbukkit.jar:git-Bukkit-1.7.2-R0.3-b3020jnks]
            at net.minecraft.server.v1_7_R1.PacketPlayInWindowClick.handle(SourceFil
    e:10) [craftbukkit.jar:git-Bukkit-1.7.2-R0.3-b3020jnks]
            at net.minecraft.server.v1_7_R1.NetworkManager.a(NetworkManager.java:146
    ) [craftbukkit.jar:git-Bukkit-1.7.2-R0.3-b3020jnks]
            at net.minecraft.server.v1_7_R1.ServerConnection.c(SourceFile:134) [craf
    tbukkit.jar:git-Bukkit-1.7.2-R0.3-b3020jnks]
            at net.minecraft.server.v1_7_R1.MinecraftServer.u(MinecraftServer.java:6
    55) [craftbukkit.jar:git-Bukkit-1.7.2-R0.3-b3020jnks]
            at net.minecraft.server.v1_7_R1.DedicatedServer.u(DedicatedServer.java:2
    50) [craftbukkit.jar:git-Bukkit-1.7.2-R0.3-b3020jnks]
            at net.minecraft.server.v1_7_R1.MinecraftServer.t(MinecraftServer.java:5
    45) [craftbukkit.jar:git-Bukkit-1.7.2-R0.3-b3020jnks]
            at net.minecraft.server.v1_7_R1.MinecraftServer.run(MinecraftServer.java
    :457) [craftbukkit.jar:git-Bukkit-1.7.2-R0.3-b3020jnks]
            at net.minecraft.server.v1_7_R1.ThreadServerApplication.run(SourceFile:6
    17) [craftbukkit.jar:git-Bukkit-1.7.2-R0.3-b3020jnks]
    Caused by: java.lang.NullPointerException
            at me.rick.hub.Hub.onInventoryClick(Hub.java:89) ~[?:?]
            at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.7.0
    _45]
            at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) ~[?:1.7.0
    _45]
            at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) ~[?:1
    .7.0_45]
            at java.lang.reflect.Method.invoke(Unknown Source) ~[?:1.7.0_45]
            at org.bukkit.plugin.java.JavaPluginLoader$1.execute(JavaPluginLoader.ja
    va:318) ~[craftbukkit.jar:git-Bukkit-1.7.2-R0.3-b3020jnks]
            ... 13 more
    Code

    Code:java
    1. import me.rick.hub.Hub;
    2.  
    3. import org.bukkit.Bukkit;
    4. import org.bukkit.ChatColor;
    5. import org.bukkit.Material;
    6. import org.bukkit.SkullType;
    7. import org.bukkit.Sound;
    8. import org.bukkit.entity.HumanEntity;
    9. import org.bukkit.entity.Player;
    10. import org.bukkit.event.EventHandler;
    11. import org.bukkit.event.Listener;
    12. import org.bukkit.event.inventory.InventoryClickEvent;
    13. import org.bukkit.inventory.Inventory;
    14. import org.bukkit.inventory.ItemStack;
    15. import org.bukkit.inventory.PlayerInventory;
    16. import org.bukkit.inventory.meta.ItemMeta;
    17. import org.bukkit.inventory.meta.SkullMeta;
    18. import org.bukkit.plugin.Plugin;
    19.  
    20. public class HatsMain implements Listener {
    21.  
    22. private Hub pl;
    23.  
    24. public HatsMain(Hub pl)
    25. {
    26. this.pl = pl;
    27. }
    28. public static Inventory HatsMenu;
    29.  
    30. static {
    31.  
    32. HatsMenu = Bukkit.getServer().createInventory(null, 9, ChatColor.BLACK + "Hats Menu");
    33.  
    34. ItemStack Blocos = new ItemStack(Material.STONE);
    35. ItemMeta BlocosItemMeta = Blocos.getItemMeta();
    36. BlocosItemMeta.setDisplayName(ChatColor.AQUA + "Blocos");
    37. Blocos.setItemMeta(BlocosItemMeta);
    38.  
    39. ItemStack skull = new ItemStack(Material.SKULL_ITEM, 1, (short)SkullType.PLAYER.ordinal());
    40.  
    41. SkullMeta meta = (SkullMeta)skull.getItemMeta();
    42. meta.setOwner("thebiglebowski33");
    43. meta.setDisplayName(ChatColor.DARK_RED + "Youtubers");
    44. skull.setItemMeta(meta);
    45.  
    46. ItemStack SairDoMenu = new ItemStack(Material.REDSTONE_TORCH_ON);
    47. ItemMeta SairDoMenuMeta = SairDoMenu.getItemMeta();
    48. SairDoMenuMeta.setDisplayName(ChatColor.RED + "Quit");
    49. SairDoMenu.setItemMeta(SairDoMenuMeta);
    50.  
    51. ItemStack Air = new ItemStack(Material.AIR);
    52.  
    53. HatsMenu.setItem(0, Blocos);
    54. HatsMenu.setItem(1, skull);
    55.  
    56. }
    57. @EventHandler
    58. public void onInventoryClick(InventoryClickEvent e){
    59.  
    60. Player p = (Player) e.getWhoClicked();
    61. if (!e.getInventory().getName().equalsIgnoreCase(HatsMenu.getName())) return;
    62. if (e.getCurrentItem() == null) return;
    63. if (e.getCurrentItem().getItemMeta() == null) return;
    64. if(e.getCurrentItem().getType() == Material.STONE){
    65. e.setCancelled(true);
    66. p.openInventory(HatsBlocos.hat);
    67. }
    68. }
    69. }


    Fixed for now

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited by a moderator: Jun 7, 2016
  13. Offline

    chikenlitle99

    ?
     
  14. Offline

    TheBlack100

    tidy
     
Thread Status:
Not open for further replies.

Share This Page