Quarantine
Quarantine
Survive the zombie horde! - Version 0.7.1
Quarantine lets you create special zones where mobs spawn and roam around, which players can then join to try to fight for their survival. To improve their odds, they can buy items or sell them. Quarantine has a localized economy, where players get money from killing mobs or selling items. It also has support for leader boards backed by a Redis or MySQL database. You can lock buttons with keys (which players can buy). Also, the player's last health, inventory and locations are saved, so they can resume gameplay at any time. When exiting a zone, pre-game health is restored. This is a hard core survival game, if you die, all your data is deleted, and you loose all your score. Score is obtained by killing mobs, and can be set for each mob type.
Requires WorldGuard, Regios or Residence to work.
Features
- Multi zone
- Sub zone based mob handling
- Local economy with buy and sell signs
- Support for enchantments
- Leader boards for each zone, backed by a database (Redis or MySQL)
- Lockable buttons, with purchasable keys (one time use or not, you decide)
- Random mob spawning based on defined regions (all region handling is done by a region management plugin)
- Convert money between the integrated economy and an external economy plugin
- SpoutPlugin GUIs
- Edit in-game messages
- Easy setup
Instructions and usage
First, download the file, and follow the readme instructions. As for setting the config, don't put any zones to load on startup, we sill haven't set the regions, you can still name the regions in the config even if we have yet to define them. MAKE SURE the world names for all the zones are valid, that they correspond to the name of a world on your server (the name is the same as the world folders), or you might get errors on startup. If you need help with the settings, the config with notes between "#" is bellow.
Now build something awesome to play in: an abandoned city, a forgotten island, a demolished prison, etc. Don't make it too big, else it might be a bit hard to manage. Only requirement: must be COMPLETELY walled off, players MUST NOT be able to walk away.
For region setup, see the appropriate section.
Now that's done, reboot, or use /qload (zone name) to load up the zone. If anything goes wrong, it will popup in the console.
Finally, we'll set an entrance. Make this a closed and secure spot so players have time to set up their stuff. Use /qsetentrance (zone name) to set it. Now, for the lobby. Don't put it in the zone, but next to it. Make it an enclosed space. This is a little pre-game lobby where you can put signs and stuff for rules or story lines, etc. I just use it to load data :P. To set it do /qsetlobby (zone name). To exit the lobby, players must have access to a teleportation command, either /spawn, /warp or /home.
And, we're done! Test your zone, and then you can add stuff like keys and economy signs. See the section bellow for that (and the leader board setup).
Region setup
These are the currently supported region plugins:
- WorldGuard
- Regios
- Residence
(if you use WorldGuard, get the WorldEdit CUI client mod, so much easier!)
If you don't know how to use either of these plugin, start by reading their wikis. Choose which ever you prefer.
First, we'll start with the main zone, it encases the whole playable area, make sure that you are always within that region when in the zone, else you'll have problems. Name it as you wish, I suggest to use what you set in the config, unless you want to edit it again. MAKE SURE you use the same capitalization! If you get an issue where a player enters, and gets told his last location was invalid, and got reset to the entrance, well, you failed, the main region does not cover the whole playable area.
Ok, now on to the spawning regions. Here, they're called subzones. It's in these that the mobs will spawn. They can cover multiple floors, just make sure again that they're not too big, and not too numerous, I suggest keeping those under 200 blocks in volume (ex.: 10x10x2). Also, MAKE SURE you leave one block space between the region and the walls that may surround it. This is to prevent a spawning problem where mobs get pushed in and up over walls. When it comes to naming them, stick to what you set in the config, and again, USE THE SAME capitalization. For Regios and WorldGuard, these are normal regions, but for Residence, they're subzones of the residence defined for the zone (you have to use the '/res subzone' command to create them).
Buy and sell signs
You right click those to sell or buy stuff, really straight forward. Formats:
Buy an item:
[Quarantine]
Buy Item
(ID)-(amount)-(cost)
(whatever you want here, not used)
Buy a random item:
This takes two signs, first one:
[Quarantine]
Buy Random Item
(amount)-(cost)
(whatever you want here, not used)
Second one, directly adjacent to it:
(ID)-(ID)-(ID)
(ID)-(ID)-(ID)
(ID)-(ID)-(ID)
(ID)-(ID)-(ID)
This is just a example,
You can place as many IDs as you want (or as will fit), separated, on a line, by "-".
Note: for damage values (potion effects, etc.), replace "(ID)" with "(ID):(DamageValue)".
Sell an item:
[Quarantine]
Sell Item
(ID)-(amount)-(cost)
(whatever you want here, not used)
Sell an enchantment:
[Quarantine]
Enchantment
(ID)-(level)-(cost)
(whatever you want here, not used)
Note: make sure you use valid IDs and quantities! For IDs, check the Minecraft wiki, for quantities, it's between 1 and 64. You'll find the enchantment IDs here: http://www.minecraftwiki.net/wiki/Enchantments (they're called EIDs).
Buy a kit:
[Quarantine]
Buy Kit
(kit name)
(price)
Get a kit (lobby only!):
[Quarantine]
Get Kit
(kit name)
(whatever you want here, not used)
Keys and lock signs
You buy keys like items, here's the format:
[Quarantine]
Buy Key
(key name, also it's ID)
(cost)
Keys aren't items though, they're not physical. The ID doesn't need to be a number, it can be a word or more, like "cake key"
To lock a button, place a sign like so next to the button (bellow, above, to the left or to the right). You may only lock buttons (why? because they're momentary, so players can't leave them on).
[Quarantine]
Key Lock
(key name, also it's ID)
(whatever you want here, not used)
Kits
You can rename, add and remove kits. Just modify the entries, following the format from the default config.
The kit format goes like this:
- The line is divided in sections by '|'.
- If there's no divider, there's only one section.
- The first section is the item ID and the amount, separated with a '-'.
- If you want to add a damage value to the item, add it the ID, separating them with a ':'
- Example: the last item of the donator kit is five colored wool.
- The remaning sections are enchantments.
- They follow this format: the enchantment ID and the level of the enchantment, separated by a '-'.
Enchantement ID list: http://www.minecraftwiki.net/wiki/Enchantments
Kits are permission controlled. The nodes vary depending on the name of the zone and kit.
Use this format:
quarantine.kit.(zone name).(kit name)
Economy converter
The economy converter allows players to move money between their zone account and an account for an external economy plugin, with fix rates. Take a look at the config, it's pretty simple. There's one special thing though, the permission nodes vary according to the zone you want to let them convert money from (since there's one account per zone).
- quarantine.convertmoney.(zone name).(exttoint)
- quarantine.convertmoney.(zone name).(inttoext)
- ExtToInt means external to internal (economy plugin to Quarantine)
- IntToExt means internal to external (Quarantine to economy plugin)
Leader boards
Redis database server software: http://redis.io/
MySQL database server software: http://www.mysql.com/
You'll need to run either of those databases, the choice is up to you. I'll have to assume here you have basic knowledge of how they work, and that you took time to learn a bit about them. All you need to do to get the leaderboards working is to set the correct access information in the config. If you took the time to learn a bit about the software, it'll be simple. Then specify the DB type in the config, which is either 'mysql' or 'redis', and set the 'enabled' field to 'true'. Boot up the you Minecraft server, and any problems should be logged to the console.
Note: to set a score for a mob type, you'll find under the money_rewards setting, last number.
Commands and permissions
Important: a zone is not a sub zone. These commands won't work with sub zone names, only for zones. You do not need to do anything with sub zones once they're defined and set in the config, the plugin will take care of the rest itself.
Note: commands with "*" after the description can only be used in pre-game lobby or in game (zone).
- /qload (zone name) : Load an unloaded zone. Permission: quarantine.admin
- /qunload (zone name) : Unload a desired zone (flush all players, save the locations, stop the mob check task and disconnect from the leaderboard database). Permission: quarantine.admin
- /qconvertinv (zone name) : Convert the player inventories to the new format. This command will be removed in v0.6 Permission: quarantine.admin
- /qzones : Display the current zones. Permission: quarantine.play
- /qrespawnmobs (zone name) : Respawn all the mobs for a zone. Permission: quarantine.admin
- /qjoin (zone name) : Join the desired zone's lobby. Permission: quarantine.play
- /qenter : Enter the zone, when in pre-game lobby*. Permission: quarantine.play
- /qplayers (optional: zone name) : Display the current player list. Permission: quarantine.play
- /qleave : Leave the zone*. Permission: quarantine.play
- /qmoney : Tells the player his current money*. Permission: quarantine.play
- /qkeys : Tells the player all of his keys*. Permission: quarantine.play
- /qscore : Tells the player his score*. Permission: quarantine.play
- /qrank : Shows the player his current rank and score for the zone he's in*. Permission: quarantine.play
- /qtop (optional page number) : Shows the player the current top five players and there scores for the zone he's in*. Permission: quarantine.play
- /qsetlobby (zone name) : Set the lobby for the desire zone. Permission: quarantine.setup
- /qsetentrance (zone name) : Set the entrance for the desire zone. Permission: quarantine.setup
- /qkits : Show the kits for the zone*. Permission: quarantine.play
- /qkit (kit name) : Get a kit, only if you don't have an inventory file*. Permission: quarantine.play
There's an additional "special" permission for the '/qkit' command:
quarantine.kit.(zone name).(kit name).
See the "Kits" section for more info.
- /qconvertmoney ('IntToExt' or 'ExtToInt') (amount) : Convert money. See the "Money converter" section*. Permission: quarantine.play
There are additional "special" permissions for the '/qconvertmoney' command:
- quarantine.convertmoney.(zone name).(exttoint)
- quarantine.convertmoney.(zone name).(inttoext)
See the "Money converter" section for more info.
Config
IMPORTANT: names for the world and regions are case sensitive! So "zone1", "world" and "subzone1", "subzone2" and "subzone3" in this config cannot have different cases from what you've set, else loading will fail. (Of course, case depends on your setup).
Load_on_start: #Zones to load on startup# - 'zone1' Leaderboards: #See the leaderboards section# enabled: false type: mysql redis_db_info: host: 'localhost' port: 6379 mysql_db_info: host: 'localhost' name: 'minecraft' port: 3306 user: 'user' password: 'password' Region_Provider_Plugin: WorldGuard #Can also be Regios or Residence# External_Economy_Link: enabled: false external_to_internal: allow: true rate: 1 #internal = external * rate# internal_to_external: allow: false rate: 0.5 #external = internal * rate# Zones: #The zones, here there's one entry: zone1# zone1: #Name of the zone, also the name of the WorldGuard region for it# max_number_of_players: 10 world: 'world' #Name of the world the zone can be found in# mob_check_task_interval: 300 #Mob check task interval, in seconds# soft_mob_respawn: false #Use the mob check task to respawn a mob instead of it's death?# clear_drops: true #Should mobs drops be cleared?# clear_mob_xp: false #Should mobs drop xp?# keep_xp_on_respawn: true #Don't loose xp on death# one_time_use_keys: false #Should keys be one time use?# keep_money_on_death: false #Keep money after loosing, for next game# entrance: #All values at zero mean an unset location# x: 0 #You can set these in-game with commands# y: 0 z: 0 yaw: 0 pitch: 0 lobby: #Same for the lobby# x: 0 y: 0 z: 0 yaw: 0 pitch: 0 starting_money: 35 #Money that should be given to players when the first join# kits: #See the "Kits" section for these# player: - '298-1' - '299-1' - '300-1' - '301-1' - '272-1' - '297-3' donator: - '306-1' - '307-1' - '308-1' - '309-1' - '267-1|16-2' - '364-3' - '35:4-5' admin: - '310-1' - '311-1' - '312-1' - '313-1' - '276-1|17-5|16-5' - '322-3' money_rewards: #Important: make sure you capitalize the first letter for all mobs names!!!# - 'Zombie:10-15-5' #Reward format : (name of mob):(min money)-(max money)-(score)# - 'Skeleton:15-20-6' - 'Spider:15-18-6' sub_zones: #List of sub zone, here, three entries# subzone1: #Entry number one, the name is also the name of the WorldGuard region associated to it# number_of_mobs: 10 mob_types: #Again, capitalize the first letter of the mob names here# - 'Zombie' #In this sub zone, all these mobs can spawn# - 'Spider' - 'Skeleton' subzone2: number_of_mobs: 10 #Number of mobs for a sub zone# mob_types: - 'Zombie' - 'Spider' subzone3: number_of_mobs: 10 mob_types: - 'Zombie' - 'Skeleton'
Permissions config
This config can be found in the Quarantine folder, it's called perms_config, and is generated on plugin startup. For most applications, you may not need to change it, but if you do not use any permission plugin, you will need to edit it.
PermissionsSystem: SuperPerms #This config is case sensitive!!# PlayerPerms: - quarantine.play
"PermissionsSystem" is the permission checking system to use. If you use any up-to-date permissions plugin that support SuperPerms, leave the config as is.
If you do not use a permissions plugin, set the field to "PlayerAndOP". This will set all permissions at OP only, unless you add them to the "PlayerPerms" field. This basically creates a simple group system: players, the default group with no permissions, except the ones added to the "PlayerPerms" field, and OPs, who have all permissions.
Messages config
You can edit this config to change the in-game messages and the header used by the zone and lobby signs.
For colors or formats, use the color or format name, in full caps, separating words with a "_". The color and format names are the standard MC ones. Colors must be precede and follow and "%".
Variables (numbers and text) also have to precede and follow a "%", and follow the format "%var-(number)%. If you remove a variable, it will not be displayed. If you add one, it will be ignored and not replaced, if this entry doesn't have as many variables as in the text. Don't edit or remove entry names. To remove a message, replace it with "".
Features to add
(Features marked with "done" will be available in the next version.)
Source
The source code can be found here: https://github.com/DDoS/Quarantine
Feel free to contribute!
Donate
If you want to make a donation for all my hard work, here's a link: Donate here!
Changelog
Version 0.7.1
- Lobby signs
- Messages config
- XP and money configuration options
- Fixed the mob check task
- Improved the soft respawn mechanics
- Better leaderboard GUI
Version 0.7
- Added a money converter
- Fix an exploit by preventing zone players and regular players from exchanging items
- Fix and error when trying to load incomplete zones (not all regions defined) with WorldGuard as a region provider
Version 0.6
- Kit selection
- XP is preserved after death
- Support for Regios and Residence
- Optional zone name argument of the '/qplayers' command
- The mob check task stops when there's no players
- Mob death by pet and fire damage is now properly attributed
- Fixed the flame enchantments not lighting mobs on fire
- Made the money received announcement less spammy
Version 0.5.1
- Compatibility update
Version 0.5
- MySQL leaderboards
- Spout GUI for the /qtop command
- Random item signs
- Damage values for IDs everywhere.
Version 0.4.1
- Bug fix, see the file description.
Version 0.4
- Added support for food levels
- Database process on a separate thread
- Added the /qzones command
- Added the /qplayers command
- Added the /qscore command
- Fixed a bug when a player leaving the lobby by quitting wouldn't have his inventory reset
- Added soft mob respawning
- Added damage values to buy signs
- Support for the latest RB API
- Spout GUI for the /qplayers and /qzones commands
- Other code improvements
Version 0.3
- Chunk will not unload if they're part of a zone that's in use.
- Added support for enchantments (selling and saving)
- More flexible and versatile permission system
- Entrances can now only be set in the main zone.
- Players with their last locations being outside of the main zone will be reset to the entrance. This fixes a bug.
- Bug fixes
- Code improvements.
Version 0.2.2
- Small bug fix, see the file description.
Version 0.2.1
- Small bug fix, see the file description.
Version 0.2
- Full rewrote
- keys
- multi zone
- sub zone control of mobs
- Sell signs
- Not just zombies anymore
- Score and leader boards
- And a bunch more stuff!
Version 0.1
- Initial release
Well I can load my first zone that defines the whole area but I can't seem to get the lobby and entrance set. I have defined the areas with the worldedit command "/region define lobby/entrance".
Here is my config, please tell me if I have anything wrong.
Load_on_start:
- 'zone1'
Leaderboards:
enabled: false
redis_db_info:
host: 'localhost'
port: 6379
Zones:
zone1:
max_number_of_players: 10
world: 'zombie'
mob_check_task_interval: 300
soft_mob_respawn: false
clear_drops: true
one_time_use_keys: false
entrance:
x: 0
y: 0
z: 0
yaw: 0
pitch: 0
lobby:
x: 0
y: 0
z: 0
yaw: 0
pitch: 0
starting_money: 35
starting_kit:
- '276-1'
- '310-1'
- '311-1'
- '312-1'
- '313-1'
money_rewards:
- 'Zombie:10-15-5'
- 'Skeleton:15-20-6'
- 'Spider:15-18-6'
sub_zones:
subzone1:
number_of_mobs: 10
mob_types:
- 'Zombie'
- 'Spider'
- 'Skeleton'
subzone2:
number_of_mobs: 10
mob_types:
- 'Zombie'
- 'Spider'
subzone3:
number_of_mobs: 10
mob_types:
- 'Zombie'
- 'Skeleton'
@DDoSQc
Just a few ideas :P And the reason why I suggested redstone use, is because you can do so much more and customize your maps even more with redstone... something that you would have to code individually for plugins.
But if you can make the plugin randomly pick a sign out of a choice of how ever many signs, then that would be awesome!
@MIceLee
Why take such a complicated route, when it's really easy to make signs with multiple IDs, and have the plugin randomly pick one?
@MIceLee
There's no wave here. It's a continuous flow of mob. Also, that sort of arena stuff doesn't fit well with the roaming survival gameplay I'm looking for.
[SUGGESTION] Add redstone compatibility to the buy/sell/enchantment signs (e.g. a lever leads to the sign by redstone. I flick the lever and the sign reacts like I just right clicked it.)
This would allow people to add a "mystery box" using random bits, as well as a whole new set of possibilities!
[IDEA] There should be a config.yml option for increasing number of mobs spawned in region after each "wave".
@MummyX
The problem isn't with the main zone, but with the sub zones.
@Duplex_
It's CaveSpider.
I tried to add another subzone with another mobtype, when I restarted server I couldn't /qjoin my Quarantine zone (internal error occured) and this popped up in server console?:
EDIT: Nvm, I put a space between (:) and numbers on mob rewards.. Another thing tho, I don't seem to get any reward by killing Blazes (as in my Config ) And what is the correct string if I want double-named mobs? Like Cave Spider or Spider Jockey? Cave_spider, Cavespider or Cave Spider doesn't work, it just breaks the plugin giving:
Would you say 310W X 348L X 127H is to much for the main zone??
Ok thnx a lot i'll try that
@MummyX
If the subzones are too large, or too numerous, you could cause lag. Subzones are just large spawning points. I suggest keeping those under 200 blocks in volume (ex.: 10x10x2).
I don't know if it is just me but this doesn't work with huge areas. After setting up zones and subzones then trying to use /qjoin [Zone Name] it freezes entire server but with smaller areas works fine. If you have any suggestions plz msg me. I would lose to use this plugin
@blondeplayer153
Copy the config. Edit the copy. Stop your server. Replace the normal config with the edited one (same name and directory, of course). Reboot your server.
The plugin overwrites the config during unload, to save the lobby and entrance locations, so changes made at runtime are lost.
Ok So I have this on my server. I love it, but there is a problem. I want to change a couple things. I go to the config files, change it, then save the changes. I reload my server and my changes did not save...I open up the config files again and the changes are not there. I know for sure I am saving it. I have tried three different ways. Am I doing something wrong??
@jjj51
It has something to do with the kit entry. Make sure it's there and correctly formatted.
Hey there, when i try and restart my server i allways get this error which prevents me from loading the arena with /qload. It just throws an "Internal error".. here is the server log:
03.02 16:09:33 [Server] INFO at net.minecraft.server.ThreadServerApplication.run(SourceFile:465) 03.02 16:09:33 [Server] INFO at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:408) 03.02 16:09:33 [Server] INFO at net.minecraft.server.MinecraftServer.init(MinecraftServer.java:175) 03.02 16:09:33 [Server] INFO at net.minecraft.server.MinecraftServer.a(MinecraftServer.java:344) 03.02 16:09:33 [Server] INFO at net.minecraft.server.MinecraftServer.t(MinecraftServer.java:357) 03.02 16:09:33 [Server] INFO at org.bukkit.craftbukkit.CraftServer.enablePlugins(CraftServer.java:205) 03.02 16:09:33 [Server] INFO at org.bukkit.craftbukkit.CraftServer.loadPlugin(CraftServer.java:222) 03.02 16:09:33 [Server] INFO at org.bukkit.plugin.SimplePluginManager.enablePlugin(SimplePluginManager.java:379) 03.02 16:09:33 [Server] INFO at org.bukkit.plugin.java.JavaPluginLoader.enablePlugin(JavaPluginLoader.java:1057) 03.02 16:09:33 [Server] INFO at org.bukkit.plugin.java.JavaPlugin.setEnabled(JavaPlugin.java:231) 03.02 16:09:33 [Server] INFO at me.DDoS.Quarantine.Quarantine.onEnable(Quarantine.java:78) 03.02 16:09:33 [Server] INFO at me.DDoS.Quarantine.Quarantine.loadStartUpZones(Quarantine.java:674) 03.02 16:09:33 [Server] INFO at me.DDoS.Quarantine.zone.QZoneLoader.loadZone(QZoneLoader.java:164) 03.02 16:09:33 [Server] INFO at me.DDoS.Quarantine.zone.QZoneLoader.loadZoneData(QZoneLoader.java:128) 03.02 16:09:33 [Server] INFO java.lang.NullPointerException 03.02 16:09:33 [Server] SEVERE Error occurred while enabling Quarantine v0.4.1 (Is it up to date?): null 03.02 16:09:33 [Server] INFO [Quarantine] Got SuperPerms permissions. 03.02 16:09:33 [Server] INFO [Quarantine] No Spout detected. Spout GUI disabled. 03.02 16:09:33 [Server] INFO [Quarantine] WorldGuard detected. 03.02 16:09:33 [Server] INFO [Quarantine] Loading Quarantine v0.4.1.
@kerelious
You can use this: https://github.com/Bukkit/Bukkit/blob/master/src/main/java/org/bukkit/entity/CreatureType.java
Use the names in red, between the ". Ex.: PIG_ZOMBIE("PigZombie", PigZombie.class, 57), you want to use PigZombie.
Note: non hostile mobs are not supported. Neutral are.
As for the leader boards, if I have time for it, I might work on a SQL implementation, with support for MySQL and SQLite.
Hi, I have your plugin on my server. And it has been working wonderfully! I really enjoy it and even though I am no where near done with my zone my players are very excited about what they've seen. I am wondering about the mob names though. I have no problem with 1 name mobs, ie Zombie, Spider, but I can't figure out how to add Zombie Pigman or Cave Spiders. I've tried doing as one word and with a space and underscore ( _ ). Also I'm wondering is there an easier way to have a database for the leader boards. I run my server from my pc and has many plugins that use databases without me having to figure much out. I don't know much about coding, though I am good at deducing what I can change in the configs and am pretty good at following directions. But what I was reading about how to set up the leader board looked pretty complex.
Thanks again for your work on this plugin, it is really awesome and I look forward to your updates!
@CrayolaCrafter
Since you can simply sell items separately, with no big difference from a kit, I won't be adding this. Adding a kit system isn't worth it.
Now, would it be possible to sell kits?
See, I would, but I can't say I know what I'm doing. I mean I could add a pull request for the random sign, but I have no clue how to properly use code reflection. Not to mention, any code I submit would need lots of refining since I taught myself what I know about Java and I barely know enough to get by. (and that's WITH and IDE helping me...)