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

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

     
  1. Offline

    SPIA1001

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    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.  
  3. Offline

    GEN3RIC

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    By George it works. I don't know how, but I think I was running 0.6. I just downloaded it the other day so I'm not sure if I got it from an old repo or what. But thanks for setting me straight, this is perfect now.
    SPIA1001 likes this.
  4. Offline

    undeadmach1ne

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    i just discovered a bug. if you have a hoe, or a flint&steel equipped, with something in the slot above them, they will be used up in one use (even their first use) and the item from the above slot will fall into their space. they work fine with nothing above them. no error msg in logs, no other plugins installed. invfall v 1.1.

    Code:
    03:15:51 [INFO] This server is running Craftbukkit version git-Bukkit-0.0.0-917-
    ge54e46b-b968jnks (MC: 1.7.3)
    03:15:51 [INFO] This server is also sporting some funky dev build of Bukkit!
    >plugins
    03:16:02 [INFO] Plugins: InvFall
    >
  5. Offline

    MrJelle

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    I'll be switching to this once it matches QuickBelt's functionality.

    Main thing that comes to mind is not being able to configure the slots yet, unless I'm mistaken here?
  6. Offline

    Fabis94

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    I've also noticed that.
    Another thing that I think is because of this plugin, is that when you open your inventory and drop some stuff out (like click on an item stack and click out of the inventory on your screen) your character drops those items, but the Item icon is still on your mouse, as if you hadn't dropped it yet. So to drop stuff you need to click out of the inventory twice.

    Same goes for the inventory. If I have 64 items, if I place one it still says 64. When I place another one it goes to 62.
  7. Offline

    Garloth

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    I'd like it when the item would fall only when it would be the same as ended one.
  8. Offline

    rolandostar

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    Is there any way to activate invfall to all players by default?
  9. Offline

    SPIA1001

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    I will look into those bugs, and I have been thinking about adding the configurable slots for while. Sorry I haven't responded in awhile, I was on holiday.
  10. Offline

    SPIA1001

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    This bug has been fixed in 1.2! :)
  11. Offline

    SPIA1001

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    Do you mean that you would want an item to only fall down if the same item is the type as the one in the hotbar?
  12. Offline

    SPIA1001

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    Not currently, but I plan on adding a config file in a later update and that will be an option.
  13. Offline

    SPIA1001

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    I'm looking into this bug, and it does seem as if it is being caused by InvFall.
  14. Offline

    undeadmach1ne

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    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.
  15. Offline

    SPIA1001

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    The configurable slots have been added in v1.3!
  16. Offline

    Garloth

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    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.
  17. Offline

    SPIA1001

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    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.
  18. Offline

    Garloth

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    Thank you.
    Theat would be great.
  19. Offline

    jamescosten

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    Hello mate, got your message will have a look for you later tonight :)
    SPIA1001 likes this.
  20. Offline

    philmacdonald2

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    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?
  21. Offline

    SPIA1001

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    That's an interesting error although very vague. Could you tell me what other plugins your running? As to help me pinpoint the cause?
  22. Offline

    kush

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    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.
  23. Offline

    SPIA1001

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    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! :)


    This post has been edited 1 time. It was last edited by SPIA1001 Aug 16, 2011.
  24. Offline

    Chromana

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    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?
  25. Offline

    SPIA1001

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    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.
  26. Offline

    Chromana

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    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.
  27. Offline

    SPIA1001

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    I like that idea, it will be in the config file, and probably accessible through command line for players with the correct permissions.
  28. Offline

    Chromana

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    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.
  29. Offline

    SPIA1001

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    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.
  30. Offline

    Chromana

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    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.
  31. Offline

    SPIA1001

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    That sounds like an awesome plugin idea. I will most certainly be downloading it, if you make it :D
  32. Offline

    Chromana

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    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.

Share This Page