[Again] Tokens Shop error

Discussion in 'Spigot Plugin Help' started by anakinsky249, May 4, 2017.

  1. Hey, I had a yml error but now it gives an error... here it is:
    Code (Text):
    04.05 01:29:33 [Server] INFO ... 15 more
    04.05 01:29:33 [Server] INFO at org.bukkit.command.PluginCommand.execute(PluginCommand.java:44) ~[Server_Spigot_1.11.2_R0.1.jar:git-Spigot-54ec0b8-1c3428e]
    04.05 01:29:33 [Server] INFO at net.empshock.tokens.TokenHandler.onCommand(TokenHandler.java:100) ~[?:?]
    04.05 01:29:33 [Server] INFO at net.empshock.tokens.TokenHandler.loadInventory(TokenHandler.java:392) ~[?:?]
    04.05 01:29:33 [Server] INFO at org.bukkit.inventory.ItemStack.<init>(ItemStack.java:94) ~[Server_Spigot_1.11.2_R0.1.jar:git-Spigot-54ec0b8-1c3428e]
    04.05 01:29:33 [Server] INFO Caused by: java.lang.NullPointerException
    04.05 01:29:33 [Server] INFO at java.lang.Thread.run(Thread.java:745) [?:1.8.0_121]
    04.05 01:29:33 [Server] INFO at net.minecraft.server.v1_11_R1.MinecraftServer.run(MinecraftServer.java:576) [Server_Spigot_1.11.2_R0.1.jar:git-Spigot-54ec0b8-1c3428e]
    04.05 01:29:33 [Server] INFO at net.minecraft.server.v1_11_R1.MinecraftServer.C(MinecraftServer.java:678) [Server_Spigot_1.11.2_R0.1.jar:git-Spigot-54ec0b8-1c3428e]
    04.05 01:29:33 [Server] INFO at net.minecraft.server.v1_11_R1.DedicatedServer.D(DedicatedServer.java:399) [Server_Spigot_1.11.2_R0.1.jar:git-Spigot-54ec0b8-1c3428e]
    04.05 01:29:33 [Server] INFO at net.minecraft.server.v1_11_R1.MinecraftServer.D(MinecraftServer.java:747) [Server_Spigot_1.11.2_R0.1.jar:git-Spigot-54ec0b8-1c3428e]
    04.05 01:29:33 [Server] INFO at net.minecraft.server.v1_11_R1.SystemUtils.a(SourceFile:46) [Server_Spigot_1.11.2_R0.1.jar:git-Spigot-54ec0b8-1c3428e]
    04.05 01:29:33 [Server] INFO at java.util.concurrent.FutureTask.run(FutureTask.java:266) [?:1.8.0_121]
    04.05 01:29:33 [Server] INFO at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) [?:1.8.0_121]
    04.05 01:29:33 [Server] INFO at net.minecraft.server.v1_11_R1.PlayerConnectionUtils$1.run(SourceFile:13) [Server_Spigot_1.11.2_R0.1.jar:git-Spigot-54ec0b8-1c3428e]
    04.05 01:29:33 [Server] INFO at net.minecraft.server.v1_11_R1.PacketPlayInChat.a(PacketPlayInChat.java:1) [Server_Spigot_1.11.2_R0.1.jar:git-Spigot-54ec0b8-1c3428e]
    04.05 01:29:33 [Server] INFO at net.minecraft.server.v1_11_R1.PacketPlayInChat.a(PacketPlayInChat.java:45) [Server_Spigot_1.11.2_R0.1.jar:git-Spigot-54ec0b8-1c3428e]
    04.05 01:29:33 [Server] INFO at net.minecraft.server.v1_11_R1.PlayerConnection.a(PlayerConnection.java:1189) [Server_Spigot_1.11.2_R0.1.jar:git-Spigot-54ec0b8-1c3428e]
    04.05 01:29:33 [Server] INFO at net.minecraft.server.v1_11_R1.PlayerConnection.handleCommand(PlayerConnection.java:1354) [Server_Spigot_1.11.2_R0.1.jar:git-Spigot-54ec0b8-1c3428e]
    04.05 01:29:33 [Server] INFO at org.bukkit.craftbukkit.v1_11_R1.CraftServer.dispatchCommand(CraftServer.java:650) ~[Server_Spigot_1.11.2_R0.1.jar:git-Spigot-54ec0b8-1c3428e]
    04.05 01:29:33 [Server] INFO at org.bukkit.command.SimpleCommandMap.dispatch(SimpleCommandMap.java:141) ~[Server_Spigot_1.11.2_R0.1.jar:git-Spigot-54ec0b8-1c3428e]
    04.05 01:29:33 [Server] INFO at org.bukkit.command.PluginCommand.execute(PluginCommand.java:46) ~[Server_Spigot_1.11.2_R0.1.jar:git-Spigot-54ec0b8-1c3428e]
    04.05 01:29:33 [Server] INFO org.bukkit.command.CommandException: Unhandled exception executing command 'vt' in plugin Tokens v1.0
    04.05 01:29:33 [Server] ERROR null
    My code:
    Code (Text):
    #============================================[ Tokens Module ]============================================#
    # %target - specifies the player receiving the token.
    # %amount - specifies the amount you are sending.
    # %price - this variable is only used below in the 'shop-items' section.
    #
    # ENCHANTMENTS: http://prntscr.com/6bgwx3
    # - if an item does not have an enchantment, leave it in this format: ' enchantments: {} '
    #
    # MATERIALS: https://github.com/Bukkit/Bukkit/blob/master/src/main/java/org/bukkit/Material.java
    # - if you do not put the material like it is in the above link (case sensitive), you will get an error.
    #=========================================================================================================#

    TOKENS_PREFIX: '&8[&4Tokens&8]&7 '
    TOKENS_NO_PERMISSION: '&cYou do not have permission to execute this command.'
    TOKENS_INVALID_SENDER: '&cInvalid sender. This command can only be performed by a player.'
    TOKENS_BALANCE_ZERO: '&7You currently have a token balance of &c0&7.'
    TOKENS_BALANCE_MESSAGE: '&7You currently have a token balance of &c%amount&7.'
    TOKENS_BALANCE_OTHERS_ZERO: '&c%target &7currently has a token balance of &c0&7.'
    TOKENS_BALANCE_OTHERS_MESSAGE: '&c%target &7currently has a token balance of &c%amount&7.'
    TOKENS_OFFLINE_PLAYER: '&cThe specified player is not online.'
    TOKENS_NUMBER_EXCEPTION: '&cThe specified amount must be a positive integer.'
    TOKENS_GIVE_SUCCESSFUL: '&c%target &7has been successfully given &c%amount &7token(s).'
    TOKENS_GIVEALL_SUCCESSFUL: '&7You have successfully gave &c%amount &7token(s) to everyone.'
    TOKENS_TAKE_SUCCESSFUL: '&7You have successfully taken &c%amount &7token(s) from &c%target&7.'
    TOKENS_TAKE_FAILURE: '&cThe specified target does not have enough tokens to take away from.'
    TOKENS_SET_SUCCESSFUL: '&7The token balance of &c%target &7has been successfully set to &c%amount&7.'
    TOKENS_PAY_IMPROPER_USAGE: '&cImproper usage. Proper usage for this command: ./at pay <player> <amount>.'
    TOKENS_PAY_SUCCESSFUL: '&7You have successfully paid &c%amount &7tokens to &c%target&7.'
    TOKENS_PAY_FAILURE: '&cYou do not have enough tokens to pay this user.'
    TOKENS_PAY_YOURSELF_DENY: '&cYou cannot pay yourself.'
    TOKENS_PURCHASE_FAILURE: '&cYou do not have enough tokens.'

    TOKENS_HELP_MESSAGE:
    - '|======[MEMBERS]======|'
    - ' > /vt help.'
    - ' > /vt shop.'
    - ' > /vt balance [player].'
    - ' > /vt pay <player> <amount>.'
    - '|========[OP]========|'
    - ' > /vt give <player> <amount>.'
    - ' > /vt giveall <amount>.'
    - ' > /vt take <player> <amount>.'
    - ' > /vt set <player> <amount>.'
    - '|=====================|'


    shop-size: 27
    shop-prefix: '&7[&bVoting Shop&7]'

    shop-items:
              0:
                material: EXP_BOTTLE
                material-id: 0
                amount: 64
                enchantments: {}
                name: '&664 XP Bottles'
                lore:
                - '&7Enchant your items!'
                - ''
                - '&6Price&7: &c10'
                price: 15
                message: '&7You have successfully bought &c64 XP Bottles &7for &c%price &7token(s).'
                console-commands:
                - give {username} 384 64
              1:
                material: ELYTRA
                material-id: 0
                amount: 1
                enchantments: {}
                name: '&5Elytra'
                lore:
                - '&7Explore the world!'
                - ''
                - '&6Price&7: &c35'
                price: 35
                message: '&7You have successfully bought &c1 Elytra &7for &c%price &7token(s).'
                console-commands:
                - give {username} 443 1
              2:
                material: FIREWORK
                material-id: 0
                amount: 32
                enchantments: {}
                name: '&e32 Fireworks'
                lore:
                - '&7Boost your Elytra!'
                - ''
                - '&6Price&7: &c20'
                price: 20
                message: '&7You have successfully bought &c32 Fireworks &7for &c%price &7token(s).'
                console-commands:
                - give {username} 401 32
              3:
                material: DIAMOND_HELMET
                material-id: 0
                amount: 1
                enchantments:
                    PROTECTION_ENVIRONMENTAL: 2
                    DURABILITY: 2
                name: '&2Voting Helmet'
                lore:
                - '&7Part of the Voting Set'
                - ''
                - '&6Price&7: &c15'
                price: 15
                message: '&7You have successfully bought &cThe Voting Helmet &7for &c%price &7token(s).'
                console-commands:
                - give {username} diamondhelmet 1 protection:2 unbreaking:2 name:&8[&2Voting Helmet&8]
              4:
                material: DIAMOND_CHESTPLATE
                material-id: 0
                amount: 1
                enchantments:
                    PROTECTION_ENVIRONMENTAL: 2
                    DURABILITY: 2
                name: '&2Voting Chestplate'
                lore:
                - '&7Part of the Voting Set'
                - ''
                - '&6Price&7: &c17'
                price: 17
                message: '&7You have successfully bought &cThe Voting Chestplate &7for &c%price &7token(s).'
                console-commands:
                - give {username} diamondchestplate 1 protection:2 unbreaking:2 name:&8[&2Voting Chestplate&8]
              5:
                material: DIAMOND_LEGGINGS
                material-id: 0
                amount: 1
                enchantments:
                    PROTECTION_ENVIRONMENTAL: 2
                    DURABILITY: 2
                name: '&2Voting Pants'
                lore:
                - '&7Part of the Voting Set'
                - ''
                - '&6Price&7: &c17'
                price: 17
                message: '&7You have successfully bought &cThe Voting Pants &7for &c%price &7token(s).'
                console-commands:
                - give {username} diamondleggings 1 protection:2 unbreaking:2 name:&8[&2Voting Pants&8]
              6:
                material: DIAMOND_BOOTS
                material-id: 0
                amount: 1
                enchantments:
                    PROTECTION_ENVIRONMENTAL: 2
                    DURABILITY: 2
                name: '&2Voting Boots'
                lore:
                - '&7Part of the Voting Set'
                - ''
                - '&6Price&7: &c15'
                price: 15
                message: '&7You have successfully bought &cThe Voting Boots &7for &c%price &7token(s).'
                console-commands:
                - give {username} diamondboots 1 protection:2 unbreaking:2 name:&8[&2Voting Boots&8]
              7:
                material: DIAMOND_SWORD
                material-id: 0
                amount: 1
                enchantments:
                    DAMAGE_ALL: 2
                    DURABILITY: 2
                name: '&2Voting Sword'
                lore:
                - '&7Part of the Voting Set'
                - ''
                - '&6Price&7: &c15'
                price: 15
                message: '&7You have successfully bought &cThe Voting Sword &7for &c%price &7token(s).'
                console-commands:
                - give {username} diamondsword 1 sharpness:2 unbreaking:2 name:&8[&2Voting Sword&8]
              8:
                material: DIAMOND_PICKAXE
                material-id: 0
                amount: 1
                enchantments:
                    DIG_SPEED: 2
                    DURABILITY: 2
                name: '&2Voting Pickaxe'
                lore:
                - '&7Part of the Voting Set'
                - ''
                - '&6Price&7: &c15'
                price: 15
                message: '&7You have successfully bought &cThe Voting Pickaxe &7for &c%price &7token(s).'
                console-commands:
                - give {username} diamondpickaxe 1 efficiency:2 unbreaking:2 name:&8[&2Voting Pickaxe&8]
              9:
                material: DIAMOND_AXE
                material-id: 0
                amount: 1
                enchantments:
                    DIG_SPEED: 2
                    DURABILITY: 2
                name: '&2Voting Axe'
                lore:
                - '&7Part of the Voting Set'
                - ''
                - '&6Price&7: &c15'
                price: 15
                message: '&7You have successfully bought &cThe Voting Axe &7for &c%price &7token(s).'
                console-commands:
                - give {username} diamondaxe 1 efficiency:2 unbreaking:2 name:&8[&2Voting Pickaxe&8]
              10:
                material: DIAMOND_SHOVEL
                material-id: 0
                amount: 1
                enchantments:
                    DIG_SPEED: 2
                    DURABILITY: 2
                name: '&2Voting Shovel'
                lore:
                - '&7Part of the Voting Set'
                - ''
                - '&6Price&7: &c15'
                price: 15
                message: '&7You have successfully bought &cThe Voting Shovel &7for &c%price &7token(s).'
                console-commands:
                - give {username} diamondshovel 1 efficiency:2 unbreaking:2 name:&8[&2Voting Shovel&8]
              11:
                material: MOB_SPAWNER
                material-id: 0
                amount: 1
                enchantments: {}
                name: '&3Zombie Spawner'
                lore:
                - '&7Kill ''em all!'
                - ''
                - '&6Price&7: &c55'
                price: 55
                message: '&7You have successfully bought &cZombie Spawner &7for &c%price &7token(s).'
                console-commands:
                - pex user {username} add pickupspawners.give
                - sudo {username} ps give zombie 1
                - pex user {username} remove pickupspawners.give
              12:
                material: MOB_SPAWNER
                material-id: 0
                amount: 1
                enchantments: {}
                name: '&3Skeleton Spawner'
                lore:
                - '&7Kill ''em all!'
                - ''
                - '&6Price&7: &c55'
                price: 55
                message: '&7You have successfully bought &cSkeleton Spawner &7for &c%price &7token(s).'
                console-commands:
                - pex user {username} add pickupspawners.give
                - sudo {username} ps give skeleton 1
                - pex user {username} remove pickupspawners.give
              13:
                material: MOB_SPAWNER
                material-id: 0
                amount: 1
                enchantments: {}
                name: '&3Pigman Spawner'
                lore:
                - '&7Kill ''em all!'
                - ''
                - '&6Price&7: &c60'
                price: 60
                message: '&7You have successfully bought &cPigman Spawner &7for &c%price &7token(s).'
                console-commands:
                - pex user {username} add pickupspawners.give
                - sudo {username} ps give pigman 1
                - pex user {username} remove pickupspawners.give
              14:
                material: SHULKER_SHELL
                material-id: 0
                amount: 1
                enchantments: {}
                name: '&3Shulker Shell'
                lore:
                - '&7Combine 2 for a shulker box'
                - ''
                - '&6Price&7: &c10'
                price: 10
                message: '&7You have successfully bought &cShulker Shell Spawner &7for &c%price &7token(s).'
                console-commands:
                - give {username} 450 1
              15:
                material: MOB_SPAWNER
                material-id: 0
                amount: 1
                enchantments: {}
                name: '&3Zombie Spawner'
                lore:
                - '&7Kill ''em all!'
                - ''
                - '&6Price&7: &c55'
                price: 55
                message: '&7You have successfully bought &cZombie Spawner &7for &c%price &7token(s).'
                console-commands:
                - pex user {username} add pickupspawners.give
                - sudo {username} ps give zombie 1
                - pex user {username} remove pickupspawners.give










     
     
  2. You entered a command to open the shop GUI, and it failed to load because of an error with an item in your configuration file. Your error is likely caused by a typo or unrecognized item name in your config. Make sure everything is spelt correctly and that all of your item names can be read by the plugin.

    (According to the console stacktrace.)