[MECH] InvFall v1.3 - Cascading Inventory Items [1060]

Discussion in 'Inactive/Unsupported Plugins' started by SPIA1001, Jun 24, 2011.

  1. Offline

    SPIA1001

    InvFall - Cascading Inventory Items:
    Verison: 1.3

    InvFall changes the mechanics of the in game inventory, items will now fall down into the hotbar when a slot is empty! InvFall does support Permissions and on a server without permissions it defaults to everyone.



    FreeFall:

    [​IMG]

    When freefall is disabled for an item to fall into the hotbar it must be directly connected to the hotbar. The flowers in column two will not fall into the hotbar, while all of the items in the two last columns will fall down into the hotbar. When freefall is enabled all items will fall down. FreeFall is disabled by default.

    Commands:
    Code:
    /invfall                         - toggles invfall for yourself
    /invfall player <username>       - toggles invfall for another player
    /invfall freefall                - toggles freefall for yourself
    /invfall setslots <slot numbers> - sets enabled slots Ex. /invfall setslots 1234
    Permission Nodes:
    Code:
    invfall.*         - gives all permissions for invfall
    invfall.invfall   - can use command /invfall
    invfall.player    - can use command /invfall player <username>
    invfall.freefall  - can use command /invfall freefall
    invfall.setslots  - can use command /setslots <slot numbers>
    invfall.blockfall - blocks fall
    invfall.toolfall  - tools fall
    Features:
    • Toggle Cascading Items
    • When a tool breaks it will be replaced by the item above it
    • Support for Permissions
    • Can enable InvFall for other players
    • FreeFall of items in inventory
    • Configurable slots, some can be enabled others disabled.
    Download Jar

    Source Code

    Changelog:
    Version 1.3
    • Added configurable slots.
    Version 1.2
    • Fixed bug: Tools falling after one use
    Version 1.1
    • Fixed bug: item data not copied when item falls.
    • This should fix an array of unforeseen problems
    Version 1.0
    • Fixed bug: user joining message not displayed
    Full Changelog
     
    Noppoly and GameFreakDude like this.
  2. Offline

    undeadmach1ne

    thats awesome ! thanks =) i just taught my players how to use this when i discovered that bug and temporarily removed the plugin to avoid problems...then they were all 'why isnt that thing working? =(' lol i can put it back and make everyone happy again.
     
    SPIA1001 likes this.
  3. Offline

    SPIA1001

    The configurable slots have been added in v1.3!
     
  4. Offline

    Garloth

    Theat's what I mean.
    Like if your iron showel has "ended" a new one from inventory takes it's place, and not anything.
    If it's like theat sorry.
     
  5. Offline

    SPIA1001

    It's not currently like that, but I can add a feature that would make it like that. I will most likely add this is the next version.
     
  6. Offline

    Garloth

    Thank you.
    Theat would be great.
     
  7. Offline

    jamescosten

    Hello mate, got your message will have a look for you later tonight :)
     
    SPIA1001 likes this.
  8. Offline

    philmacdonald2

    18:41:55 [SEVERE] Could not pass event PLAYER_INTERACT to InvFall
    java.lang.ArrayIndexOutOfBoundsException
    18:41:56 [SEVERE] Could not pass event PLAYER_INTERACT to InvFall
    java.lang.ArrayIndexOutOfBoundsException
    18:41:56 [SEVERE] Could not pass event PLAYER_INTERACT to InvFall
    java.lang.ArrayIndexOutOfBoundsException
    18:41:57 [SEVERE] Could not pass event PLAYER_INTERACT to InvFall
    java.lang.ArrayIndexOutOfBoundsException
    18:41:58 [SEVERE] Could not pass event PLAYER_INTERACT to InvFall
    java.lang.ArrayIndexOutOfBoundsException
    18:41:59 [SEVERE] Could not pass event PLAYER_INTERACT to InvFall
    java.lang.ArrayIndexOutOfBoundsException
    18:41:59 [SEVERE] Could not pass event PLAYER_INTERACT to InvFall
    java.lang.ArrayIndexOutOfBoundsException
    18:42:00 [SEVERE] Could not pass event PLAYER_INTERACT to InvFall
    java.lang.ArrayIndexOutOfBoundsException
    18:42:00 [SEVERE] Could not pass event PLAYER_INTERACT to InvFall
    java.lang.ArrayIndexOutOfBoundsException
    18:42:00 [SEVERE] Could not pass event PLAYER_INTERACT to InvFall
    java.lang.ArrayIndexOutOfBoundsException
    18:42:01 [SEVERE] Could not pass event PLAYER_INTERACT to InvFall
    java.lang.ArrayIndexOutOfBoundsException

    I keep getting these errors when people place blocks. What is wrong?
     
  9. Offline

    SPIA1001

    That's an interesting error although very vague. Could you tell me what other plugins your running? As to help me pinpoint the cause?
     
  10. Offline

    kush

    I am getting those errors too. Spams like crazy. I do use a lot of plugins... could it be related to multiInv? The error starts when the first player joins the server and it starts off with:

    java.lang.ArrayIndexOutOfBoundsException: -1
    at java.util.ArrayList.elementData(ArrayList.java:371)
    at java.util.ArrayList.get(ArrayList.java:384)
    at spia1001.InvFall.PlayerManager.slotEnabled(PlayerManager.java:56)
    at spia1001.InvFall.InvFallPlayerListener.onPlayerInteract(InvFallPlayerListener.java:45)
    at org.bukkit.plugin.java.JavaPluginLoader$11.execute(JavaPluginLoader.java:314)
    at org.bukkit.plugin.RegisteredListener.callEvent(RegisteredListener.java:58)
    at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.java:338)
    at org.bukkit.craftbukkit.event.CraftEventFactory.callPlayerInteractEvent(CraftEventFactory.java:168)
    at net.minecraft.server.ItemInWorldManager.dig(ItemInWorldManager.java:63)
    at net.minecraft.server.NetServerHandler.a(NetServerHandler.java:478)
    at net.minecraft.server.Packet14BlockDig.a(SourceFile:42)
    at net.minecraft.server.NetworkManager.b(NetworkManager.java:226)
    at net.minecraft.server.NetServerHandler.a(NetServerHandler.java:89)
    at net.minecraft.server.NetworkListenThread.a(SourceFile:105)
    at net.minecraft.server.MinecraftServer.h(MinecraftServer.java:454)
    at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:363)
    at net.minecraft.server.ThreadServerApplication.run(SourceFile:422)

    Then spams the errors above.
     
  11. Offline

    SPIA1001

    I just ran a test with multiInv and it works fine, so that's not the problem . From the errors it seems as if some how InvFall is looking up the slot configurations for a player who hasn't been added to the list of players with slot configurations. Which is weird becuase it does a sanity check to make sure that before looking a player up the player is in the list. The errors below in my opinion indicted a more deeply rooted problem, not just with my plugin but with some other plugins your running. When my plugin crashes it shouldn't cause the network handler or the server class to be effected. It seems like the error my plugin is throwing is a catalyst for more problems to arise. I am looking into what's causing the index error though, I might be doing a full rewrite of the plugin to increase stability. Thank you very much for posting this problem, I will try to get it fixed as soon as possible! :)

     
  12. Offline

    Chromana

    It seems like invfall defaults to ON every time you log on. Any way to have a config file which stores the ON/OFF choice for each player?
     
  13. Offline

    SPIA1001

    It does store the player states, but it's in the server, so if the server is restarted the states will be lost. In the next version there will be a player file that stores all the states for the players. I did initially have a file that stored the states, but it seemed to cause some io problems with some servers. I'm currently looking into the best way of storing the data. In v1.4 this feature should be added though.
     
  14. Offline

    Chromana

    Ah OK, that makes sense. Perhaps also give an option for making it on or off by default for users who haven't specified the state yet too, that would be useful.
     
  15. Offline

    SPIA1001

    I like that idea, it will be in the config file, and probably accessible through command line for players with the correct permissions.
     
  16. Offline

    Chromana

    Glad I could be of help :)
    Say, how easy is it to do these plugins? I've never really looked into it. I've done a couple years of Java at university level.
     
  17. Offline

    SPIA1001

    If you have learned Java at University, then writing plugins should be pretty easy for you. The only thing is you just need to learn the bukkit api. It's pretty simple though. Take a look at my source code, it might help you get your feet wet, and this link is of help, it helped me get started: http://code.google.com/p/blank-bukkit-plugin/source/browse/trunk/src/?r=2. Happy coding :D
     
    Chromana likes this.
  18. Offline

    Chromana

    Wow thanks a lot :)
    Seems like the hardest part might be coming up with a good idea...
    IDEA: MC Russian Roulette. Every block you hit has a 2% chance of turning into TNT and exploding.
    ...maybe not!

    Actually, now that I think about it, that could be a decent practice plugin.
     
    SPIA1001 likes this.
  19. Offline

    SPIA1001

    That sounds like an awesome plugin idea. I will most certainly be downloading it, if you make it :D
     
  20. Offline

    Chromana

    I won't add any other posts about this here, because I don't want to spam your plugin's thread, but I just want to let you know that your source has been absolutely invaluable! Very well laid out and clear. I just made a plugin which tells you if you place a block (how helpful, right?).

    Anyway, thanks for your help. I'll let you know if I make anything worth showing!
     
    SPIA1001 likes this.
  21. Offline

    Da_Norc

    Hey Spia,

    Thanks so much for this plugin. I'm going to try installing it with 1185 and see how that goes.

    Incidentally, i just want to echo some feature requests others have made:

    1) Yes, absolutely, please add an option like "samefall" in which items will only fall in and replace the hotbar when it is the same data value as the previous one used (pick damage might be hard to differentiate from wool color here maybe?) This would make it SO much more intuitive and user-friendly.

    The main problem with this plugin is if you're, say, putting down a line of cobble, glass auto-falls into your inventory, and you put down 4 before you realize it. Very irksome :)

    2) Please allow a config file to remember what users' preferences are, as well as a default status "invfall on or off" for new users.

    Thanks! It's a little thing, but this makes my life so much happier lol

    --Norc
     
    Chromana and SPIA1001 like this.
  22. Offline

    Chromana

    Any plans for permissionsBukkit support?

    For others: 1185 seems to be working fine.
     
  23. Offline

    SPIA1001

    Sorry for my long absence. I plan on adding a lot of these new features for the 1.0.0 compatible release of Bukkit. There will be more options, and better support, and hopefully no bugs! :D
     
    GameFreakDude likes this.
  24. Offline

    Da_Norc

    Welcome back. Samefall option coming anytime soon? It would make me pathetically happy!
     
    SPIA1001 likes this.
  25. Offline

    SPIA1001

    Yes, that possibly may be my favorite suggested feature. And most certainly will be added!
     
  26. Offline

    jacquelinesmind

    Just wondering if there are plans to update this plugin to 1.2.
     
  27. Offline

    KSib

    I agree! I love this mod, and would love to see it updated!!
     
  28. Offline

    Swang

    Hopefully he will update this. Ive used it for some time.
     
  29. Offline

    md_5

    Long time no see SPIA1001. You will notice that this thread has now been placed into the Inactive Plugin subforum.
    If you wish to revive this plugin, please ensure that you update and test compatibility with the latest recommended Bukkit build before reporting your original post, asking for it to be moved back to the release forum.

    Thanks for your time.
    md_5
     

Share This Page