Per World Inventory v1.11.5

Have a seperate inventory and more, for each world

  1. Gnat008
    Tested Minecraft Versions:
    • 1.8
    • 1.9
    • 1.10
    • 1.11
    • 1.12
    Source Code:
    https://github.com/Gnat008/PerWorldInventory/tree/master
    Contributors:
    Gnat008, Beatles, ljacqu, sgdc3
    pwi_banner_main.png
    The way this plugin stores data is fundamentally different from MultiVerse-Inventories. Like MV-I, this plugin saves data in a .json format, but that is where the similarities end. Not only does this save your inventory, it saves your stats as well! This includes things like active potion effects, exp, level, economy balance, and more. These all can be configured on a per-item basis, should you not want all of these saved. See the Configuration section below for these. All commands can be seen ingame with the '/pwi help' command.

    > Video
    Thanks so much to @Koz4christ for making a video for PWI!

    And also to @racerk12 for his video tutorial for PWI!


    > Configuration
    Code (Text):

    ##########################################
    #  PerWorldInventory configuration file  #
    ##########################################

    # If true, the server will change player's gamemodes when entering a world
    # The gamemode set is configured in the worlds.yml file
    manage-gamemodes: false

    # If true, players will have different inventories for each gamemode
    separate-gamemode-inventories: true

    # If true, any worlds that are not in the worlds.yml configuration file will share the same inventory
    share-if-unconfigured: false

    metrics:
      # Choose whether or not to enable metrics sending.
      # See https://bstats.org/getting-started for details.
      enable: true
      # Send the number of configured groups.
      # No group names will be sent!
      send-number-of-groups: true
      # Send the total number of worlds on the server.
      send-number-of-worlds: true

    # All settings for players are here:
    player:
      # Save and Load players' economy balances. Requires Vault!
      economy: false
      # Load players' ender chests
      ender-chest: true
      # Load players' inventory
      inventory: true
      # All options for player stats are here:
      stats:
        # Load if a player is able to fly
        can-fly: true
        # Load the player's display name
        display-name: false
        # Load a player's exhaustion level
        exhaustion: true
        # Load how much exp a player has
        exp: true
        # Load a player's hunger level
        food: true
        # Load if a player is flying
        flying: true
        # Load what gamemode a player is in. This is shadow-set to false if
        # 'manage-gamemodes' is true, to stop infinite loop
        gamemode: false
        # Load how much health a player has
        health: true
        # Load what level the player is
        level: true
        # Load all the potion effects of the player
        potion-effects: true
        # Load the saturation level of the player
        saturation: true
        # Load a player's fall distance
        fall-distance: true
        # Load the fire ticks a player has
        fire-ticks: true
        # Load the maximum amount of air a player can have
        max-air: true
        # Load the current remaining air a player has
        remaining-air: true

    # Configure the amount of time between saves, in seconds
    # Default is 5 minutes (300 seconds)
    save-interval: 300

    # Attempt to figure out which world a player last logged off in
    # and save/load the correct data if that world is different.
    # REQUIRES MC 1.9.2 OR NEWER
    load-data-on-join: false

    # Print out debug messages to the console for every event that happens in PWI
    debug-mode: false

    # Disables bypass regardless of permission
    # Defaults to false
    disable-bypass: false
     

    Pretty straightforward, turning the options to false will cause that item to not be loaded on world change. The option 'manage-gamemodes' is set to false by default to not interfere with other plugins that you may have to manage GameModes.

    Code (Text):
    groups:
      world1:
        worlds:
        - world1
        - world1_nether
        - world1_the_end
        default-gamemode: SURVIVAL
      world_2:
        worlds:
        - world_2
        default-gamemode: CREATIVE

    This is where you configure your world groups. Follow the default or above example to get the format. If you have 'manage-gamemodes' set to false in your main config, the 'default-gamemode' option here does nothing, and can be safely removed. Worlds in the same group will all share the same inventory and stats.

    Once you have made your desired changes, simply type /pwi reload.

    A default inventory loadout is provided for each configured group, as well as for a server fallback, if for some reason a world isn't in any group. These can be set ingame by using the '/pwi setworlddefault [group]' command, where group is a configured group name, or 'default'. If no group is specified, it will set the loadout for the group that you are currently standing in. This does not require a reload.


    > Permissions and Commands
    Permissions:
    - perworldinventory.admin: Defaults to Ops, grants all other permissions
    - perworldinventory.convert: Allows user to convert data from other plugins
    - perworldinventory.reload: Allows user to reload configs and world groups
    - perworldinventory.setdefaults: Allows user to set the default inventory loadout for a group
    - perworldinventory.notify: Users with this permission will be notified if the config is out of date
    - perworldinventory.bypass.*: Users that have this will keep their inventory when changing worlds or gamemode
    - perworldinventory.bypass.gamemode: Users that have this will keep their inventory when changing gamemode
    - perworldinventory.bypass.world: Users that have this will keep their inventory when changing worlds
    - perworldinventory.bypass.enforcegamemode: Users with this permission will not have their gamemode changed if manage-gamemodes is enabled
    Commands:
    /pwi help: Shows the help page
    /pwi convert: Converts data from MultiVerse-Inventories; see below
    /pwi reload: Reloads the config file and worlds file
    /pwi setWorldDefault [default | <group_name>]: Sets the default inventory loadout for the specified group, or server default. If no parameter is given, it will sets the loadout for the group you are currently standing in.


    > Conversion
    If you are converting from MV-I, simply run the "/pwi convert multiverse" command and the plugin will take care of everything. You must have MV-I running for this. Keep in mind, converting only works with MV-I version 2.5, it will not work on 2.4. When MV-I is updated from 2.4 to 2.5, it switches from yml to json files, but does not convert the data until it is used. Be sure to keep your MV-I data around, just in case something does go wrong.

    A converter from MultiInv is still in the works. There is a beginning framework as of version 1.4.0; do not use it! It is not fully operational yet, and will result in errors.


    > API
    If you are a developer and want to use the API methods, you first must create a PerWorldInventoryAPI object. You can do that like this:
    Code (Text):
    PerWorldInventory pwi = (PerWorldInventory) Bukkit.getServer().getPluginManager().getPlugin("PerWorldInventory");
    PerWorldInventoryAPI api = pwi.getAPI();
    From there, just call what method you want from the API, for example:
    Code (Text):
    boolean canShare = api.canWorldsShare("world", "anotherWorld");
    You can view the full API class here.

    > Miscellaneous
    Support
    If you have an issue, please go here, or send me a private message here on Spigot.

    Metrics
    For my own curiosity's sake, I decided to implement bStats. As always, nothing identifying anything or any server is sent. For more information, look here. This can be disabled in the config file.

    Other
    The code repository can be found on Github.

Recent Updates

  1. Hotfix 1.11.5
  2. Update 1.11.4
  3. Update 1.11.3

Recent Reviews

  1. NuclearNinja
    NuclearNinja
    1/5,
    Version: v1.11.5
    it is not working properly you cunt..............................................................
  2. TeemoCell
    TeemoCell
    1/5,
    Version: v1.11.5
    Would be nice to give -5 stars. Never saw such a bad Plugin, just error shown in console. /PWI reaod are also not working, my server crashed after using that command. Update the plugin or remove it.
  3. xsd
    xsd
    1/5,
    Version: v1.11.5
    Plugin does not work. It glitches out sometimes and changes player's gamemodes to creative. Which is really bad in a factions server. Switched to MultiVerse-Inventories, and much better.
  4. MinecraftKid45
    MinecraftKid45
    3/5,
    Version: v1.11.5
    May just dislike me, however I cannot get it to work on my Spigot 1.8.8 server :(

    I don't know if it's just me, or if this plugin does not work on that version.
    Please remove the "1.8" from the supported versions if not.
  5. ZhenticZong
    ZhenticZong
    1/5,
    Version: v1.11.5
    To many bugs.

    Duplicate money
    Groups world does not recognize all the worlds.

    But, this plugin looks really nice.
  6. vy_vu
    vy_vu
    5/5,
    Version: v1.11.5
    [13:50:26 INFO]: vnvyvu lost connection: Disconnected
    [13:50:26 ERROR]: **** THIS IS NOT AN ISSUE TO DO WITH PER WORLD PLUGINS ****
    Could not pass event PlayerQuitEvent to PerWorldInventory v1.11.5
    org.bukkit.event.EventException
    at us.Myles.PWP.TransparentListeners.PerWorldPluginLoader$1.execute(PerWorldPluginLoader.java:122) ~[?:?]
    at org.bukkit.plugin.RegisteredListener.callEvent(RegisteredListener.java:62) ~[spigot.jar:git-Spigot-6016ac7-10c10b3]
    at us.Myles.PWP.TransparentListeners.PWPRegisteredListener.callEvent(PWPRegisteredListener.java:30) [PerWorldPlugins.jar:?]
    at org.bukkit.plugin.SimplePluginManager.fireEvent(SimplePluginManager.java:502) [spigot.jar:git-Spigot-6016ac7-10c10b3]
    at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.java:487) [spigot.jar:git-Spigot-6016ac7-10c10b3]
    at net.minecraft.server.v1_10_R1.PlayerList.disconnect(PlayerList.java:385) [spigot.jar:git-Spigot-6016ac7-10c10b3]
    at net.minecraft.server.v1_10_R1.PlayerConnection.a(PlayerConnection.java:1058) [spigot.jar:git-Spigot-6016ac7-10c10b3]
    at net.minecraft.server.v1_10_R1.NetworkManager.handleDisconnection(NetworkManager.java:318) [spigot.jar:git-Spigot-6016ac7-10c10b3]
    at net.minecraft.server.v1_10_R1.ServerConnection.c(ServerConnection.java:174) [spigot.jar:git-Spigot-6016ac7-10c10b3]
    at net.minecraft.server.v1_10_R1.MinecraftServer.D(MinecraftServer.java:832) [spigot.jar:git-Spigot-6016ac7-10c10b3]
    at net.minecraft.server.v1_10_R1.DedicatedServer.D(DedicatedServer.java:399) [spigot.jar:git-Spigot-6016ac7-10c10b3]
    at net.minecraft.server.v1_10_R1.MinecraftServer.C(MinecraftServer.java:672) [spigot.jar:git-Spigot-6016ac7-10c10b3]
    at net.minecraft.server.v1_10_R1.MinecraftServer.run(MinecraftServer.java:571) [spigot.jar:git-Spigot-6016ac7-10c10b3]
    at java.lang.Thread.run(Unknown Source) [?:1.8.0_151]
    Caused by: java.lang.NullPointerException
    at me.gnat008.perworldinventory.data.players.PWIPlayerManager.savePlayer(PWIPlayerManager.java:200) ~[?:?]
    at me.gnat008.perworldinventory.process.PlayerQuitProcess.processPlayerLeave(PlayerQuitProcess.java:46) ~[?:?]
    at me.gnat008.perworldinventory.listeners.player.PlayerQuitListener.onPlayerQuit(PlayerQuitListener.java:42) ~[?:?]
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_151]
    at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_151]
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_151]
    at java.lang.reflect.Method.invoke(Unknown Source) ~[?:1.8.0_151]
    at us.Myles.PWP.TransparentListeners.PerWorldPluginLoader$1.execute(PerWorldPluginLoader.java:120) ~[?:?]
    ... 13 more
    >
  7. KrzysiekRysiek
    KrzysiekRysiek
    5/5,
    Version: v1.11.5
    It's the best plugin! This is updated and i can make my server! This is what i need!
  8. _Rxan_
    _Rxan_
    4/5,
    Version: v1.11.5
    For Some Reason,I Cant Get it To Work,But i Have Seen Some Tutorials And I Know It's A Good Plugin!
  9. Albert_Bowden
    Albert_Bowden
    5/5,
    Version: v1.11.5
    This plugin is so awesome that i didn't even know there was an "infinite death loop problem". Awesome plugin! I would give unlimited stars if i could!
  10. ScuroK
    ScuroK
    5/5,
    Version: v1.11.4
    thanks for the update. im using this plugin since long time and i am thankful you keep it alive <3