Minigame Regenerator
Minigame Regenerator
Description
The minigame plugin allows users to regenerate a minigame after the round is complete. By specifying the coordinates of the top and bottom blocks (Ie. Front-top-right and back-bottom-left, like you would select a cube in WorldEdit) a "minigame area" can be defined. Any blocks within the area will be regenerated when the minigame is loaded, including items in container blocks such as Chests, Dispensers or Droppers.
A lobby can be set for each minigame in which players will be randomly spawned upon death, eliminating the need for bedrooms and sleeping before playing. Each player must register for the minigame so that players who are not participating in the game but are still online in the same world, aren't affected by the configuration.
Player configuration options can also be set for each minigame including:
- Gamemode | 0/survival or 1/creative
- Health | 1-20
- FoodLevel | 1-20
- Saturation | 1-20
- RemovePotionEffects | true or false
- ClearInventory | true or false
- GiveItem | itemName or itemName:amount or itemName:amount:byteCode
Commands
- Syntax: /minigame add <minigameName> <x1> <y1> <z1> <x2> <y2> <z2>
- Example: /minigame add Spleef 100 63 100 150 80 150
- Syntax: /minigame load <minigameName>
- Example: /minigame load Spleef
- Syntax: /minigame delete <minigameName>
- Example: /minigame delete Spleef
- Syntax: /minigame setlobby <minigameName> <x1> <y1> <z1> <x2> <y2> <z2>
- Example: /minigame setlobby Spleef 110 63 110 115 63 115
- Syntax: /minigame deletelobby <minigameName>
- Example: /minigame deletelobby Spleef
- Syntax: /minigame addproperty <property> <value> <minigameName>
- Example: /minigame addproperty GAMEMODE 0 Spleef
- Example: /minigame addproperty GIVEITEM POTION:1:16458 Spleef [NOTE: This gives the player a splash potion of slowness]
- Syntax: /minigame deleteproperty <property> <minigameName>
- Example: /minigame deleteproperty GAMEMODE Spleef
- Syntax: /minigame register <minigame>
- Example: /minigame register Spleef
- Syntax: /minigame unregister <minigameName>
- Example: /minigame unregister Spleef
Note: Multiple items can be given to players with the GiveItem command, just execute it multiple times with different items. When removing them however, due to the way they are stored, you will need to browse the Configuration in the plugins/Minigame/<minigameName>-<worldName>.yml file and find the configuration entry to specify. For example: GIVEITEM3 to remove the 4th item in the configuration. This may be fixed in a future update.
Demo Video
Development Status
- Version: 2.0
- Estimated Completion Date: 15/06/2014
- Current Status: In Development
-
View User Profile
-
Send Message
Posted May 29, 2014I'm pushing this back a bit due to work on another Plugin I'm developing taking priority. Will update within the next few weeks.
-
View User Profile
-
Send Message
Posted May 26, 2014OK I'm going to wait until you do that, as I know my area is so big it would certainly crash the server when reloading...
-
View User Profile
-
Send Message
Posted May 25, 2014@Etsija
No it's not multi-threaded and with the way the YML loading is at the moment it's grabbing all the blocks at once which would use all available RAM and, as we've all seen, crash the server when large areas are loaded.
I'm not sure as yet whether the problem lies in Bukkit's YAML Configuration methods or if it's just because I'm getting all the keys in the Blocks configuration section and then looping through it. I'm going to try getting blocks individually which should increase the time it takes to load but decrease the memory usage dramatically.
-
View User Profile
-
Send Message
Posted May 25, 2014Haven't seen your code, but you do have the loading implemented as a timed task, right? So the plugin doesn't try to reload everything asap? Because that would surely kill the server.
-
View User Profile
-
Send Message
Posted May 25, 2014I'm currently planning a version 2.0 which should hopefully fix a lot of the issues around loading large areas crashing the server. I'll post more when I've had more time to dev the idea.
-
View User Profile
-
Send Message
Posted May 24, 2014@Etsija
Possibly but I really can't give a definitive answer. Best just to backup your server, let your players know and try it out.
-
View User Profile
-
Send Message
Posted May 23, 2014I've been searching for a plugin like this for a long time. The plugin seems pretty straightforward and easy to use, but I have one serious question: I am setting up a Scorched Earth lookalike minigame, where there is roughly 600 x 500 block area around 100 blocks high. Players would try to shoot each other with cannons set up in different parts of this area. The whole area is made of sand and gravel, and needs to be restored to the original status after the game. Do I have any hope whatsoever to use your plugin with an area this big? We do have quite a powerful multicore server in use.
-
View User Profile
-
Send Message
Posted May 7, 2014@Kyren_Leah
actually, you could split it into two areas and then just load both one after the other. That might stop your server from crashing.
-
View User Profile
-
Send Message
Posted May 7, 2014@Kyren_Leah
Well that still should be enough for an area of that size but I suggest you try and minimise the area a bit more if possible. Sorry I can't be of any more assistance, I hope you're still able to make use of the plugin. :)
-
View User Profile
-
Send Message
Posted May 7, 2014@T3CHN0CR4T
3 GBs, but usually around 45% of that are used already once the startup is finished!
-
View User Profile
-
Send Message
Posted May 7, 2014@T3CHN0CR4T
Although the area you specified in your comment below really isn't that big at all so it shouldn't be crashing your server. How much RAM does your server have?
-
View User Profile
-
Send Message
Posted May 7, 2014@Kyren_Leah
Yes, that's the drawback of this approach - It is quite easy to crash your server if you save/load a large area. Unfortunately the only 'fix' would be to allocate more CPU cores or RAM (if possible) or decrease the size of the area that you're regenerating.
-
View User Profile
-
Send Message
Posted May 7, 2014@T3CHN0CR4T
Yes, reloading helped! But now I get a crash whenever I set it up, shortly after "adding Minigame". I guess it's due to the size of the area, which is a small village where the minigame plays - Is there a workaround?
-
View User Profile
-
Send Message
Posted May 7, 2014@Kyren_Leah
This happens occasionally, and I haven't had a chance to fix it yet. Just run /reload and try again and it'll be fine ;)
-
View User Profile
-
Send Message
Posted May 7, 2014Thanks for making this plugin - we really needed some simple and straightforward minigame manager! So far the other plugins I found for this had too many predefined options to really customize them.
I was trying to set up the first area now, using /minigame add Frozenvillage -47 95 98 -171 66 -28
but this gets me An error has occurred when adding minigame Arena_Frozenvillage! null [Ljava.lang.StackTraceElement;@1a04be07
what am I doing wrong?
-
View User Profile
-
Send Message
Posted May 5, 2014@IndyD
The commands are pretty self explanatory, but a tutorial video will be coming in a week or two. As for reloading an area, that's easy! Say you have an area that goes from X: 100 Y: 63 Z: 100 to X: 200 Y: 70 Z: 200, you simply type /Minigame add AreaName 100 63 100 200 70 200 to add the area. Then when you want to reload it, type /Minigame load AreaName. Done.
-
View User Profile
-
Send Message
Posted May 5, 2014how to use it lol there is no tutorial anywhere and i dont get how i could regenerate like a mob arena with block destroying mobs... :C
-
View User Profile
-
Send Message
Posted May 3, 2014Good Job!
-
View User Profile
-
Send Message
Posted May 3, 2014I am glad this has been created! Very useful