Project Inventories

Hello, When someone logs on my server I will message in the console.

[08:55:00] [Server thread/INFO]: Nashous[/81.64.71.50:50046] logged in with entity id 27515 in Spawn(0) at (-759.0, 7.0, -1256.0) [08:55:00] [Server thread/ERROR] [Sponge]: Could not pass PlayerLoggedInEvent to Plugin{id=PJI, name=Project Inventories, version=0.4.4} java.lang.IllegalStateException at com.google.common.base.Preconditions.checkState(Preconditions.java:161) ~[minecraft_server.1.8.9.jar:?] at org.spongepowered.api.item.inventory.transaction.InventoryTransactionResult$Builder.build(InventoryTransactionResult.java:182) ~[InventoryTransactionResult$Builder.class:1.8.9-1691-3.1.0-BETA-1046] at org.spongepowered.common.item.inventory.adapter.impl.slots.SlotAdapter.offer(SlotAdapter.java:176) ~[SlotAdapter.class:1.8.9-1691-3.1.0-BETA-1046] at com.gmail.trentech.pji.data.InventoryPlayer.setInventory(InventoryPlayer.java:46) ~[InventoryPlayer.class:?] at com.gmail.trentech.pji.EventManager.ClientConnectionEventJoin(EventManager.java:32) ~[EventManager.class:?] at org.spongepowered.common.event.listener.JoinListener_EventManager_ClientConnectionEventJoin75.handle(Unknown Source) ~[?:?] at org.spongepowered.common.event.RegisteredListener.handle(RegisteredListener.java:86) ~[RegisteredListener.class:1.8.9-1691-3.1.0-BETA-1046] at org.spongepowered.mod.event.SpongeModEventManager.post(SpongeModEventManager.java:233) [SpongeModEventManager.class:1.8.9-1691-3.1.0-BETA-1046] at org.spongepowered.mod.event.SpongeModEventManager.post(SpongeModEventManager.java:193) [SpongeModEventManager.class:1.8.9-1691-3.1.0-BETA-1046] at org.spongepowered.mod.event.SpongeModEventManager.post(SpongeModEventManager.java:273) [SpongeModEventManager.class:1.8.9-1691-3.1.0-BETA-1046] at org.spongepowered.mod.event.SpongeModEventManager.post(SpongeModEventManager.java:245) [SpongeModEventManager.class:1.8.9-1691-3.1.0-BETA-1046] at org.spongepowered.common.SpongeImpl.postEvent(SpongeImpl.java:146) [SpongeImpl.class:1.8.9-1691-3.1.0-BETA-1046] at net.minecraft.server.management.ServerConfigurationManager.initializeConnectionToPlayer(ServerConfigurationManager.java:311) [lx.class:?] at net.minecraftforge.fml.common.network.handshake.NetworkDispatcher.completeServerSideConnection(NetworkDispatcher.java:239) [NetworkDispatcher.class:?] at net.minecraftforge.fml.common.network.handshake.NetworkDispatcher.access$100(NetworkDispatcher.java:54) [NetworkDispatcher.class:?] at net.minecraftforge.fml.common.network.handshake.NetworkDispatcher$1.func_73660_a(NetworkDispatcher.java:190) [NetworkDispatcher$1.class:?] at net.minecraft.network.NetworkManager.func_74428_b(NetworkManager.java:289) [ek.class:?] at net.minecraft.network.NetworkSystem.func_151269_c(NetworkSystem.java:189) [ll.class:?] at net.minecraft.server.MinecraftServer.func_71190_q(MinecraftServer.java:724) [MinecraftServer.class:?] at net.minecraft.server.dedicated.DedicatedServer.func_71190_q(DedicatedServer.java:344) [ko.class:?] at net.minecraft.server.MinecraftServer.func_71217_p(MinecraftServer.java:605) [MinecraftServer.class:?] at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:481) [MinecraftServer.class:?] at java.lang.Thread.run(Thread.java:745) [?:1.8.0_45-internal] [08:55:00] [Server thread/INFO]: Nashous vient de se connecter sur MCMurigny

Do you know where the problem ?

cordially

Update: v0.6.0

Release: Download Here

!!!NOT COMPATIBLE WITH OLD VERSIONS. MUST DELETE OLD DATABASE BEFORE UPDATING!!!

Notable Changes:

  • Update teleportation implementation for Latest Sponge API
  • Inventories now stored as Containers
  • Some bug fixes

@TrenTech

i would like to request a feature for this Project Inventories:

please add an ability where it can carry health, experience, durability of the tools, and inventories from one server to another server through BungeeCord?

please do same for Project Portals where i can connect portal to a server (not a world) through bungeecord as well

um…they already do all that. All player information is saved, and Project Inventories utilizes MySQL so cross server support can be accomplished with or without BungeeCord.

Project Portals already has Bungee support through the use of the -b flag when creating portals.

can you tell me a bit more about that. i want to know how it works… I can’t figure it out how to make it work because there is no instruction on how to set it up.

Well you’ll need a SQL server setup. There are plenty of tutorials for that on google. In the Project Inventories config.conf enable MySQL and input the server database name, host, username and password. On your Minecraft server setup create your inventories with /inv create and assign them to the desired worlds with /inv set. Once this is done, on any other Minecraft server, in the config point it to the same database. Because the inventories have already been created all thats needed is to assign the previously created inventories to the desired worlds. Repeat with each server.

As far as Project Portals goes, You’ll need SpongyCord plugin installed and as previously stated when creating a portal, in the destination argument enter the bungee server name, and add the -b flag at the end.

@TrenTech

thank you, it all make sense now… you should mention it in the instruction… just make a short instruction on what you need to do for anyone who dont know. thats all. Keep up the work. :smile:

about time! i get to play

Yeah my documentation is less than impressive. Eventually I’d like to create wiki pages for all my plugins.

I have a problem.
When some player lost connect
Enter the server again
Or use bungecord transfer

Some times Inventory is empty

using project-inventores-v0.6.1
spongeforge-1.8.9-1890-4.2.0-BETA-1634

When Player joined
setInventory() is player.getInventory().clear(); and inventory build is not completed
World is saving and saveInventory()

save the empty inventory? Possible?

I found that the player’s network is relatively poor when it is easy to empty inventory

join and leave
Almost at the same time

please forgive my terrible english

Hi TrenTech. I think I found a bug in PJI. Items held in the off hand (such as torches for placing while mining, or shields), are not saved on exiting the server. They disappear.

I wouldn’t call it a bug, I just haven’t implemented it yet. Honestly I forgot all about it.

Fair enough. Thought it should be pointed out though! Thanks.

Possible to have a global inventory with this? Like keep the inventory between maps. I have my players teleporting between worlds right now with a command sign that issues a /tppos command with world and xyz location.

Also is it compatible with pixelmon db file so players pokemon would carry over between worlds?

I don’t know what you mean

No

I mean have one inventory that stays with the player no matter what world they go

Any plans to implant pixelmon support cause that would be amazing for pixelmon servers

Need a little help with this. Im using Project Inventory and Worlds I created a world and the inventory
/world create Test /inventory create Test
How do i set the inventory for the world? I tried
/inventory set Test Test is that not the command?
Currently on
Sponge 5.0.0-BETA-1785
Forge 12.18.1.2095

Is there any console output? That should work

Could you maybe document and/or make a better a way to migrate to using PJI?

It took me a while to figure out PJI will only import from the playerdata files when a connecting player doesn’t yet have an entry in players table. I have a multi-server setup that I’ve simplified into the following problem:

Scenario:

  • Server serverA hosts the primary world worldA. The inventories will be attempted to be migrated into invA.
  • Server serverB hosts its primary world worldB. It is configured to use the invB inventory.

Player 1 connects to serverA into world worldA, and PJI creates a row in players for that player and copies the inventory loaded from the file in serverA's playerdata folder into the invA table. This is good!

Player 1 now connects to serverB and loads worldB. They initially receive the inventory serverB remembers via the playerdata folder, and then PJI takes over. I believe it sees that there is already an entry for Player 1 in the players table, so it ignores any existing inventory and loads from the invB table. There is no entry for Player 1 in that table so it creates and overwrites a blank inventory for that player!

Is there any point to tracking with the players table? Can’t the check just be if there is an inventory for a certain player in the invB table?

Otherwise, something like a /inventory import <inventory> <player|uuid> would be handy.