RandomChests

Discussion in 'Archived: Plugin Requests' started by imMrStamper, Jul 13, 2014.

  1. Offline

    imMrStamper

    Plugin category: Mechanics (i guess?)

    Suggested name: MegaLoot

    What I want: I'd like to see a plugin that can every few hours (preferably configurable) place a chest at a random location filled with random contents (preferably configurable) The chest has to be above ground and on chest placement from the plugin there will be an announcement saying "a loot chest has been placed at (these coordinates)"

    with the configurable list of items if its not hard to do so making a full list of items and it randomly selecting a few from the list, no more than 5 items in the chest with 5 of itself in there. that would be great to reiterate or clear things up

    5 total unique items but say there is 1 iron ingot, 1 gold ingot, 1 coal, 1 diamond, and 1 emerald. each item can have a total of 5 of itself but no more than 5 unique items
    Ideas for commands: No commands needed for this plugin.

    Ideas for permissions: no needed permissions

    When I'd like it by: soon but i'm not making it, so take your time you're the one doing myself a favor

    Any questions or things i didn't make to clear, please do ask

    Edit: when a player reaches the chest first/interacts with it first have an announcement that says "(playername) has found the loot chest "
     
  2. Offline

    imMrStamper

  3. Offline

    imMrStamper

    anyone...:oops:
     
  4. Offline

    izarooni

    imMrStamper
    I could possible do this for you tomorrow somewhere around 1 or 2pm MST since that's when I get home.
     
  5. Offline

    imMrStamper

    izarooni ok sounds awesome! Please feel free to bombard me with questions if you have any!
     
  6. Awesome Idea :D
     
  7. Offline

    imMrStamper

    Sil3nt_Aassassin thanks. I thought it would he a fun way to keep players entertained while playing.
     
    Sil3nt_Aassassin likes this.
  8. Offline

    izarooni

    imMrStamper
    <Edit by Moderator: Redacted mediafire url>
    I got a bit confused with this so tell me if there's something wrong.
     
    Last edited by a moderator: Nov 2, 2016
  9. Attached Files:

    Last edited by a moderator: Jun 30, 2016
  10. Offline

    izarooni

    Sil3nt_Aassassin
    Sorry, was debugging things and forgot to change the timer. Re-download from link above. The interval is in minutes
    and I can't help you with that error since you're using spigot
     
    Sil3nt_Aassassin likes this.
  11. izarooni Switched to craftbukkit and still doing it http://pastebin.com/hKRZsh46 and the anouncements are not working and chest is just spawning right underneath me with nothing in them
     
  12. Offline

    PandazNWafflez

    Sil3nt_Aassassin Looks like izarooni compiled with craftbukkit for Minecraft 1.7.4, and needs to update his craftbukkit library.
     
    Sil3nt_Aassassin likes this.
  13. Offline

    GreySwordz

    The question is why exactly he's using NMS for this.
     
    Sil3nt_Aassassin likes this.
  14. Offline

    PandazNWafflez

    GreySwordz A valid point, and one that would be better put in a post tagging him than one quoting me :p
     
  15. Offline

    GreySwordz

    izarooni
     
  16. Offline

    Deleted user

    It seems that the NMS is to change the inventory name
     
  17. Well there are alot of bugs in the plugin right now.
     
  18. Offline

    izarooni

    PandazNWafflez
    I compiled Bukkit 1.7.9

    For checking the chest name when the chest is opened so it can send messages saying a player found the chest. Is there a better way to do this?

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited by a moderator: Jun 9, 2016
  19. Offline

    PandazNWafflez

    izarooni

    But what about CraftBukkit? You need to update your craftbukkit jar as well as your bukkit jar.
     
  20. Offline

    izarooni

  21. Offline

    PandazNWafflez

    Sil3nt_Aassassin Actually I think it's your Craftbukkit version (you're running 1.7.3)
     
  22. Offline

    PandazNWafflez

    Sil3nt_Aassassin That's really odd. It's clearly a version problem, as the error states that the plugin is attempting to import CraftBlock from R4, but your server is running R3. I can't see why that would happen if you are both using the latest build..
     
  23. PandazNWafflez Well I am using craftbukkit: DEV on multicraft... is there anyway I can fix this
     
  24. Offline

    PandazNWafflez

    Sil3nt_Aassassin I don't know, having not use multicraft before. Maybe contact them?
     
  25. Will do thanks! also PandazNWafflez look at your messages I sent you a PM
     
  26. Offline

    _Filip

    Bukkit's Inventory#getName() method works fine.....................
     
  27. Offline

    Deleted user

    TheSpherret
    He's trying to set the inventory name, not get it

    imMrStamper
    Try this one:
    http://zombiekiller753.com/plugins/downloads/LootChests.jar

    Supports CB versions 1_6_R2 (1.6.2) to 1_7_R4 (1.7.10)

    Commands:
    /lc spawn - Force spawn a LootChest
    /lc reload - Reload the configuration

    TheSpherret
    For supporting all the versions ofc.
    Take a look at NMSManager. You'll see it uses reflection to find the right instance to create, or disable itself if it can't.

    TheSpherret
    Because reflection is somewhat taxing when used over and over, especially for something like this which will be called every x seconds (http://stackoverflow.com/questions/435553/java-reflection-performance)

    Sil3nt_Aassassin
    What did you set min.x and max.x to?

    It seems that max.x is smaller than min.x

    Sil3nt_Aassassin
    Ahhhh derp-a-derp.

    I had a goof with my default config. Seeing as it broke, you probably didn't make any changes, so please re-download the file and delete the LootChests folder. It should work now

    EDIT:
    Very very very true. When I was first making the config, I suddenly decided to change from
    x:
    min: -5000
    max: 5000

    to
    min:
    x: -5000
    y: -5000

    However, as you can see, it was botched slightly

    EDIT 2:
    Ugh. You're right, of course. However, the plugin doesn't take a 'z' value. Silly me. I'll go change that too.

    EDIT 3:
    Updated and tested with a fresh install. It should work now

    http://zombiekiller753.com/plugins/downloads/LootChests.jar

    TheSpherret
    I could, and for a plugin of this simplicity (As in the methods are not likely to change), it would probably be fine.

    However, I use that 'library' (the whole .nms package) in all my NMS-dependent plugins because when I'm dealing with variables as well as methods, it might so happen that a feature was not implements until, say, 1.7.2, so 1.6.2 won't work.

    Or, a variable name changed, making it useless because of all the extra checking needed.

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited by a moderator: Feb 8, 2022

Share This Page