Inventory Issue - On World Change

Discussion in 'Plugin Development' started by turt2live, Nov 5, 2011.

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

    turt2live

    Hello,

    I am writing my own plugin for multiple worlds and came across an error that I simply am unable to fix.

    The code is -supposed- to when you teleport to a new world (via a method called port()) it saves your inventory to a file and loads the inventory related to the world.

    Here are all the links to the files I have:

    WorldLauncher.java: (Main) http://pastebin.com/uK848Mvc
    ServerPlayerListener.java: http://pastebin.com/U4zUsWA4
    ChatLog.java: http://pastebin.com/x5bSjZjX
    inventory() method (from WorldLauncher.java): http://pastebin.com/bF0TfZ7j
    Error: http://pastebin.com/gb01ZbrM

    For whatever reason it does not say "Caused By:" but I know it is in the inventory() method because if I comment out the call to it (line 190 in WorldLauncher.java) the code works fine (without the inventory change)

    As of right now the code will teleport you to the proper world, but kicks you due to an "Internal Server Error" and does not give you a new inventory (but it does wipe it like I want it to between save and load).

    In addition, I have used debug statements throughout the method and each and every one was called without error.

    Any and all help is appreciated!

    -- Turt2Live

    EDIT: It does give you a form of an inventory now, but it looks like this: http://postimage.org/image/av5fchrj5/

    EDIT: I fixed the inventory glitch, it now shows you your proper inventory, and it looks like the inventory() method is causing map loading issues (as the map doesn't load and therefore kicks you due to whatever the heck that error is)

    Bump, anyone able to help?

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited by a moderator: May 21, 2016
  2. The "internal server error" kicks a stacktrace into the server log. Would be great to have this...
     
  3. Offline

    turt2live

  4. Sorry, didn't see that, but is that really the full stacktrace? Nothing more Like "Caused by ..."?
     
  5. Offline

    turt2live

    That would be right, hence why I'm here, although upon looking over the log again, the errors alternate, it's never the same one twice (even after reload).

    Second error: http://pastebin.com/TCMbnPg0

    Looks like a Bukkit 1337 bug, wonderful.

    16 hours of searching and 12 hours after I gave up and posted do I find out other people are getting the same error based off some action like TNT, Walking, Inventory, or teleporting...

    *comments code*

    Plugin: Done for now.

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited by a moderator: May 21, 2016
Thread Status:
Not open for further replies.

Share This Page