Inactive [RP/PVP] RandomChest v1.0 - Bored of normal Hungergames' Maps? [1.4.5 - R0.3]

Discussion in 'Inactive/Unsupported Plugins' started by müsli1, Dec 7, 2012.


Is this plugin helpful?

  1. Yes, it's fine

  2. Yes, it's ok

  3. hm... :|

  4. No.

    0 vote(s)
  5. It's very bad

  1. Offline


    Suggested by: al3x74

    Unzip the .zip archive with winRAR or 7-Zip and drop all the files (two ;)) in the 'plugin' folder.
    How to use/Features:
    RandomChest generates a chest-field between to points:
    You can control the chest number and the size of the field.
    In the chests are random* items, so the Hungergames feeling is very well ;)

    *Not really 'random', you can customize the items in the config file like that:

      min: 0
      max: 1
      probability: 2/7
    The '2/7' represent a mathematical break. You can use all natural breaks you want :)
    The 'min' value is the min amount of the appearing items.
    The 'max' value is the max amount of the appearing items.

    You can make the chest auto-refilling or auto-regenerating after a certain time (example: 1 week, 2 hours... 1 second :p)


    /rc autorefill [Field-Name] [time/delete] [ms,s,m,h,d,w] - Let the Field auto-refill after a time or delete the auto-refilling (ms = milliseconds, s = seconds, h = hours, d = days, w = weeks)
    /rc autoregenerate [Field-Name] [time/delete] [ms,s,m,h,d,w] - Let the Field auto-regenerate after a time or delete the auto-regenerating
    /rc addmanully/addmanu [Field-Name] - Add a special Chest to the field, this chest won't be regenerated but it gets refilled when the other Chests get refilled.
    /rc removemanually/removemanu [Field-Name] - Remove a special Chest from the field (Only the Chests that you selected with /rc addmanully/addmanu)
    /rc remove [Field-Name] - Remove a Chest-Field forever.
    /rc generate [Field-Name] [max x] [max z] [chest number] (chestrefill-type)- Generate a Chest-Field between your x and z coords and the coords you type in.
    The Chest Number represents the Chest-Number in the field. The chestrefill-type is the item-config used for this field**.
    /rc regenerate [Field-Name] (chestrefill-type) (chest number)- Regenerate a Chest-Field.
    /rc refill [Field-Name] (chestrefill-type) - Refill all chests in a Chest-Field. (With the specified chestrefill-type)
    /rc reload - Reload the Config-File
    Legend: (Can use) [Must use]


    RandomChest.rc - States whether a player can use all commands

    NOTE: I've made only one Permission, because if you can generate fields you have to have the permissions to delete them.


              min: 0
              max: 1
              probability: 2/7
              min: 0
              max: 1
              probability: 2/20
              min: 5
              max: 64
              probability: 1/1
      console-signals-by-regenerate: true
      console-signals-by-refill: true
    console-signals-by-regenerate - if this is 'true' the plugin will send a message to the console if a field got auto-regenerated
    console-signals-by-refill- if this is 'true' the plugin will send a message to the console if a field got auto-refilled
    chestconfig - configure out the items ;)
    types - the types that you can use in the commands (chestrefill-types) (example: type: hungergames - make them yourself)
    wood_sword - scroll up to features :p

    V1.0 - Release
    V1.0(.1) - Fixed the '1 hour = 6 minutes' bug

      • Message to the console if a chest gets opened (configurable)
      • signal-configuration for single fields
    Known Bugs:
      • None
    I'm free for suggestions :) Hope you enjoy!

    Attached Files:

  2. Offline


    Just perfect ! This is exactly what I wanted !
  3. Offline


    Source Code?
  4. Offline


    Is that I can post it on French platforms ?
  5. Offline


    Yes, if you want :)
    That's no problem! ;)
  6. Offline


    At the moment, the source code is not published.. Maybe later ;)
    If you have any questions, just ask me
  7. Offline


    I've found a little mistake in my plugin:
    1 hour would be 6 Minutes :'(

    Please download the new version with the fix: here

    Attached Files:

  8. Offline


    I mostly just wanted to see the proablity thing.
  9. Offline


    Ok, here it is: (For all those want to see the code lines,too :))

    Random r = new Random();
    int min,max;
    min = getConfig().getInt("chestconfig.types." + chesttype + ".items." + item + ".min");
    max = getConfig().getInt("chestconfig.types." + chesttype + ".items." + item + ".max");
    int number = r.nextInt((max + 1) - min) + min;
    ItemStack stack = new ItemStack(Material.valueOf(item.toUpperCase()), number);
    String[] raw = getConfig().getString("chestconfig.types." + chesttype + ".items." + item + ".probability").split("/");
    int break1,break2;
    break1 = Integer.valueOf(raw[0]);
    break2 = Integer.valueOf(raw[1]);
    int appear = r.nextInt(break2 - 1);
    if(appear <= (break1 - 1)) {
        if(number!= 0) {
  10. Offline


    oh can i put it on chinese bbs? i think it is a good plugin. i can use it to make a game :> .i have found it for a long time QAQ l am moved my english is pour Ow :confused:kay ,thanks
  11. Offline


    Sorry, but I don't know the chinese bbs, so can you please tell me what that is, so I can answer the question? :)

Share This Page