Inventory switching fails when inventory contains named items. #314


  • Defect
Open
  • Forge_User_71391719 created this issue Dec 18, 2017

    Multiinv version: 3.3.10

    TwoTuxLib version: 1.12-b8

     

    config.yml:

    useSQL: false
    splitHealth: true
    splitHunger: true
    controlGamemode: true
    separateGamemodeInventories: true
    creativeGroups:
    - creative
    sql:
      host: localhost
      port: '3306'
      username: username
      password: password
      database: database
      prefix: multiinv_
    SaveInventoryOnQuit: false

    groups.yml:

     

    sv1:
        - sv1
        - sv1_nether
        - sv1_the_end
    

    When the inventory of a player contains named items (e.g. a sword named on an anvil), their inventory will fail to switch between gamemodes and the following error will be posted to the console:

    [21:48:19 ERROR]: Could not pass event PlayerGameModeChangeEvent to MultiInv v3.3.10
    org.bukkit.event.EventException: null
        at org.bukkit.plugin.java.JavaPluginLoader$1.execute(JavaPluginLoader.java:306) ~[spigot-1.12.2.jar:git-Spigot-549c1fa-2ee49b4]
        at org.bukkit.plugin.RegisteredListener.callEvent(RegisteredListener.java:62) ~[spigot-1.12.2.jar:git-Spigot-549c1fa-2ee49b4]
        at org.bukkit.plugin.SimplePluginManager.fireEvent(SimplePluginManager.java:500) [spigot-1.12.2.jar:git-Spigot-549c1fa-2ee49b4]
        at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.java:485) [spigot-1.12.2.jar:git-Spigot-549c1fa-2ee49b4]
        at net.minecraft.server.v1_12_R1.EntityPlayer.a(EntityPlayer.java:1145) [spigot-1.12.2.jar:git-Spigot-549c1fa-2ee49b4]
        at net.minecraft.server.v1_12_R1.CommandGamemode.execute(CommandGamemode.java:30) [spigot-1.12.2.jar:git-Spigot-549c1fa-2ee49b4]
        at org.bukkit.craftbukkit.v1_12_R1.command.VanillaCommandWrapper.dispatchVanillaCommand(VanillaCommandWrapper.java:109) [spigot-1.12.2.jar:git-Spigot-549c1fa-2ee49b4]

    Furthermore, switching between worlds with a named item will result in the named item being erased.

     

    Steps to reproduce

     

    1. Name an item on an anvil.

    2. Switch gamemodes or worlds with the item in your inventory.

     

    Thanks.

  • Forge_User_71391719 added a tag Defect Dec 18, 2017

To post a comment, please login or register a new account.