Solved Config and MySQL Help

Discussion in 'Plugin Development' started by Xp10d3, Dec 26, 2019.

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

    Xp10d3

    Hello. I'm having some trouble with my config and MySQL stuff. I have a few problems. The first one is that my plugin isn't registering the cost of the item. This is partly related to my second problem, but I printed out how much the item might cost and I got zero. I suspect it is due to the item NAME, which it isn't reading from my config. The name is the only thing that my plugin isn't reading (I tested out everything else). Everything is working perfectly (except the /pay command which I posted a forum on) except for the name. The cost is related to that as it reads the name and checks for the cost based on the name of the item. I might change it so that it reads the NBT value or something, but that's in the future. Anyways, I get no errors at all.
    Main Class (that creates the GUI): https://hastebin.com/imohelewuc.makefile
    Listeners class (that senses the click events): https://hastebin.com/jayifepele.java
    Config file: https://hastebin.com/ziseyehuya.coffeescript
    And yes, my config is updated ;)
     
  2. Offline

    KarimAKL

    @Xp10d3 The config path is "shop.items.(name).price" while your PlayerListeners class is trying to get "shop.items.(name).cost".

    Also, you should be null checking in your InventoryClickEvent.
     
  3. Offline

    Xp10d3

    Lol. I messed that up xD Thanks.
     
    KarimAKL likes this.
Thread Status:
Not open for further replies.

Share This Page