Lite Survival Games Manager
Lite Survival Games Manager

This project is abandoned. Use an alternative plugin.
Description
Survival Games have become popular in Minecraft recently, with the Hunger Games movie. The goal of the game is simple: survive. Players must adapt to the environment, find resources, and - most importantly - kill. The last player standing is the winner. The goal of this plugin is to allow players to run servers - whether big, public servers or smaller ones with friends - easily and make the experience more enjoyable. The hope for this plugins release is to allow admins to add maps, configure the plugin, then run the server and take the day off. Making the entire game automatic and requiring no admin at all.
Features
- Create a backup of the world to reload after the match
- Automatically refill select chests with select items
- Set players to spectate mode after death
- Changeable time limit
- Automatically restart and reload world after the match.
- Allow admins to set hosts with simple commands
- Keep track of individual scores
- Store data in a SQLite file
- Allow a server to load different maps in a map cycle
- Allow multiple spawn points to be set up
- Black or white list blocks that can't or can be broken, respectively, by players in-game
- Voting to start a game without an admin
- Selecting a button/lever to be triggered on game start
- Auto start with minimum players
- Peace time
- Players kicked after death
Spectate mode will god players, allow them to fly, make them invisible, and prevent them from interacting with the world. They can also teleport to players.
Use
- Set the server up for auto restart. See the section below.
- Edit the config files to your liking. They should be config.yml and blocks.yml in the plugins/LSGM folder.
- Add a map to the map cycle. Type /lsgm addmap <mapname>. You can add as many maps as you'd like, they'll be randomly picked from the file (same map can not be repeated) to be loaded on restart.
- Set spawns. You will want an individual spawn for the maximum players on your server. If there are too few spawns, more than one player should be spawned at a spawn point. Stand on the spawn point and type /lsgm addspawn <id>.
- Add chests. Chests will be automatically refilled on a set time or will be refilled on the command /lsgm fillchests. Look at the chest and type /lsgm addchest <id> [group], or - if you feel that your computer can handle it - type /lsgm addchest all and every chest on the map will be found automatically. You must fly around and make sure you load every chunk on the world to get every chests! Currently, we can only find chests on loaded blocks.
- Back up the world. This allows the world to revert to its original state when it is loaded next. Just type /lsgm backup.
- If necessary, add a start button or a lever. This will be activate when the game starts. Look at it and type /lsgm addbutton <id>
- Start the game. Go ahead and type /lsgm start [chest refill delay in minutes] [time limit in minutes]. If you do not specify a refill delay or a time limit, they will default to a 15 minute refill delay and no time limit.
- Check for bugs! There are probably going to be a lot. Not an understatement.
- Type /lsgm help for various other commands.
- If set, the server will automatically restart after the game.
Recommended: Download AntiCheat to easily disable client mods and prevent exploitation!
Auto Restart
In order for the server to start up again after the plugin has stopped it, you must change the file you use to run the server (e.g., RUN.bat). You will need to loop through the java -jar command so that it is ran when the server goes down. See the examples below:
Windows (*.bat)
@ECHO OFF SET BINDIR=%~dp0 CD /D "%BINDIR%" :start java -Xincgc -Xmx1G -jar craftbukkit.jar goto start
Mac/Linux (*.sh)
#!/bin/bash BINDIR=$(dirname "$(readlink -fn "$0")") cd "$BINDIR" while true do java -Xincgc -Xmx1G -jar craftbukkit.jar done
Commands
General command usage: /lsgm <command> [args]
- backup - Makes a backup of the world, to be loaded on the next game.
- addmap - Adds map to maplist. Usage: /lsgm addmap <map>
- delmap - Removes a map from the map list. Usage: /lsgm delmap <map | all>
- listmaps - Lists the maps on the map list.
- addchest - Adds the chest you are looking at to the refill list. Usage: /lsgm addchest <id> [group]
- delchest - Removes the chest you are looking at from the refill list. Usage: /lsgm delchest <id | all>
- listchests - Lists all of the chests on the refill list.
- fillchests - Fills all of the chests on the refill list.
- info - Display game info. Usage: /lsgm info [player]
- start - Start the games. Usage: /lsgm start [chest fill delay] [time limit]
- stop - Stop the games.
- addspawn - Add a spawn point where you are. Usage: /lsgm addspawn <id>
- delspawn - Remove a spawn point. Usage: /lsgm delspawn <id | all>
- sethost - Make a player a host. Usage: /lsgm sethost <player> <true | false>
- reload - Reload the config
- votestart - Vote to start a game
- addbuton - Add the button/lever you're looking at to buttons/levers to be triggered on game start. Usage: /lsgm addbutton <id>
- delbutton - Remove a start button. Usage: /lsgm delbutton <id | all>
- listbuttons - List ALL the start buttons!
Permissions
- lsgm.backup:
Back up worlds
- lsgm.access:
Use LSGM commands
- lsgm.fillchests:
Refill chests
- lsgm.addchest:
Add chests to the database
- lsgm.removechest:
Remove chests from the database
- lsgm.addmap:
Add maps to the map cycle
- lsgm.removemap:
Remove maps from the map cycle
- lsgm.start:
Start the game
- lsgm.stop:
Stop the game
- lsgm.addspawn:
Add a spawn point
- lsgm.delspawn:
Remove a spawn point
- lsgm.sethost:
Make a player a host
- lsgm.reload:
Reload the config
- lsgm.addbuton:
Add a start button
- lsgm.delbutton
Remove a start button
Configuration
config.yml
This is the general config file.
# -- blocklist-type # Use "black list" if you want what is in blocks.yml to not be broken by players. # Use "white list" if you want the blocks in blocks.yml - and only those blocks - to be allowed to be broken by players. # If you do not want to block anything, leave this as black list and leave blocks.yml empty # Warning: If this is set to white list and blocks.yml is empty, then no blocks can be broken. # -- time-limit # Default time limit in minutes; set to 0 for no time limit. # -- auto-restart # Set to "true" to automatically restart the server after a game, otherwise set to "false." # -- restart-delay # Time - in seconds - to wait before the server restarts. # -- alow-vote-start # Set to "true" to allow players to vote to start the game, otherwise set to "false." # -- minimum-players # Minimum players needed to start a game via voting. Will be ignored if less than 2. # -- auto-start # Start automatically when minimum players reached. # -- auto-start-delay # Time to wait for more players before game auto starts (minutes). # -- allow-spectators # Whether or not people can stay in the game after they die and spectators can join while the game is in progress. True/false # -- peace-time-length # The length (in minutes) players can not attack one another at the start. 0 allows players to attack one another immediatally. # -- refill-delay # Default automatic chest refill delay in minutes; set to 0 for no automatic refills. # -- refill-group # Chest group to be refilled automatically; leave default if you do not use custom groups. # -- refill-items # Items eligible to be placed into chests on automatic refill; format: itemid amount. # For now, the only way to set the probability of getting a certain item to be higher, you must add the item more than once. blocklist-type: white list time-limit: 0 auto-restart: true restart-delay: 5 allow-vote-start: true minimum-players: 2 auto-start: false auto-start-delay: 5 allow-spectators: true peace-time-length: 0 refill-delay: 15 refill-group: default refill-items: ..
blocks.yml
The blocks to be used in the white/black list. Use the block's ID, not the name.
# These are the blocks to be used with the white/black list. # See the example below for how to format this file. Use the block's id in the list. # Do NOT use tabs or allow you text editor to auto-tab! When indenting to list the ID, use two spaces! blocks: - 0 - 7
-
View User Profile
-
Send Message
Posted Jun 10, 2012It looks like we're about ready for the next update. Just having a bit of trouble with Manuestaire's suggestion on changing the map without a server restart. All's well, but we just can't get that world to unload! Possibility of just commenting it out and releasing just the bug fixes. We will please you, God help us!
-
View User Profile
-
Send Message
Posted Jun 10, 2012These will be fixed in the next update. Sorry that it wasn't even playable, we didn't test much further than setting chests, creating one spawn, starting the game, then running through some commands.
-
View User Profile
-
Send Message
Posted Jun 10, 2012@hockeygoalie5
When the commands run it says a internet error has occured and when it teleports you to the set spawns for a few seconds you are able to pass through the glass that surround the pods.
null org.bukkit.command.CommandException: Unhandled exception executing command 'lsgm' in plugin LSGM v0.25 at org.bukkit.command.PluginCommand.execute(PluginCommand.java:42) at org.bukkit.command.SimpleCommandMap.dispatch(SimpleCommandMap.java:166) at org.bukkit.craftbukkit.CraftServer.dispatchCommand(CraftServer.java:479) at net.minecraft.server.NetServerHandler.handleCommand(NetServerHandler.java:821) at net.minecraft.server.NetServerHandler.chat(NetServerHandler.java:781) at net.minecraft.server.NetServerHandler.a(NetServerHandler.java:764) at net.minecraft.server.Packet3Chat.handle(Packet3Chat.java:34) at net.minecraft.server.NetworkManager.b(NetworkManager.java:229) at net.minecraft.server.NetServerHandler.a(NetServerHandler.java:113) at net.minecraft.server.NetworkListenThread.a(NetworkListenThread.java:78) at net.minecraft.server.MinecraftServer.w(MinecraftServer.java:567) at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:459) at net.minecraft.server.ThreadServerApplication.run(SourceFile:492) Caused by: java.lang.ArrayIndexOutOfBoundsException: 6 >= 6 at java.util.Vector.elementAt(Unknown Source) at com.hockeygoalie5.lsgm.SurvivalGames.spawnPlayers(SurvivalGames.java:295) at com.hockeygoalie5.lsgm.SurvivalGames.onCommand(SurvivalGames.java:439) at org.bukkit.command.PluginCommand.execute(PluginCommand.java:40) ... 12 more
-
View User Profile
-
Send Message
Posted Jun 9, 2012@hockeygoalie5
Here is the error I am getting.
23:08:26 [INFO] [LSGM] Enabling LSGM v0.25
23:08:26 [INFO] [LSGM] Loading map...
23:08:27 [INFO] [LSGM] Only one map on the map list, not editing system.properti
es.
23:08:27 [INFO] [LSGM] Started, enjoy your game!
23:08:27 [INFO] [LSGM] Developed by hockeygoalie5 and FussyCashew.
23:08:37 [INFO] GoldBattle has joined with a score of 0.
23:08:42 [INFO] Let the games begin!
23:08:42 [SEVERE] null
org.bukkit.command.CommandException: Unhandled exception executing command 'lsgm
' in plugin LSGM v0.25
at org.bukkit.command.PluginCommand.execute(PluginCommand.java:42)
at org.bukkit.command.SimpleCommandMap.dispatch(SimpleCommandMap.java:16
6)
at org.bukkit.craftbukkit.CraftServer.dispatchCommand(CraftServer.java:4
79)
at net.minecraft.server.NetServerHandler.handleCommand(NetServerHandler.
java:821)
at net.minecraft.server.NetServerHandler.chat(NetServerHandler.java:781)
at net.minecraft.server.NetServerHandler.a(NetServerHandler.java:764)
at net.minecraft.server.Packet3Chat.handle(Packet3Chat.java:34)
at net.minecraft.server.NetworkManager.b(NetworkManager.java:229)
at net.minecraft.server.NetServerHandler.a(NetServerHandler.java:113)
at net.minecraft.server.NetworkListenThread.a(NetworkListenThread.java:7
8)
at net.minecraft.server.MinecraftServer.w(MinecraftServer.java:567)
at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:459)
at net.minecraft.server.ThreadServerApplication.run(SourceFile:492)
Caused by: java.lang.ArrayIndexOutOfBoundsException: 1 >= 1
at java.util.Vector.elementAt(Unknown Source)
at com.hockeygoalie5.lsgm.SurvivalGames.spawnPlayers(SurvivalGames.java:
295)
at com.hockeygoalie5.lsgm.SurvivalGames.onCommand(SurvivalGames.java:434
)
at org.bukkit.command.PluginCommand.execute(PluginCommand.java:40)
... 12 more
I hope it is a simple problem that i did. Imported the world. I added 24 spawns in each tube in the survival games 2 map. Backed up and started the game...
Thanks -Patrick
-
View User Profile
-
Send Message
Posted Jun 9, 2012@XenoBen
Please tell me the whole error.. You can copy it from the server.log file. Also, what do you mean lets you fly through walls? The only thing that starting the game would do that may remotely possibly but most likely not be causing it is teleporting players to spawns.
-
View User Profile
-
Send Message
Posted Jun 9, 2012I just tried it but when i do /lsgm start it says a internal error occured and it lets you fly through objects for awhile?
exception executing command 'lsgm' in plugin LSGM v0.25 java.lang.ArrayIndexOutOfBoundsException: 1 >= 1
Thats what came up.
-
View User Profile
-
Send Message
Posted Jun 9, 2012When suggesting awesome stuffs: Submitting a ticket keeps us more organized. This also allows me to simply assign the ticket to Noah and slave him away on it. Thank you! Looks like the files have been approved and are up. Test it out and send us all 9001 bugs you encounter. We're well into developing the next major step already, and I'm sure you'll like what's to come. Keep cool!
-
View User Profile
-
Send Message
Posted Jun 9, 2012@Manuestaire
Sounds like a really interesting concept! I'll look into it. Thanks for the suggestion.
-
View User Profile
-
Send Message
Posted Jun 9, 2012@FussyCashew
Yes that's what i meant, but also multiple worlds for survival games (appart from the non-survival-games) would be great, to have what I've said before, a world with race for the wool maps, another for battle games maps, adventure... :)
-
View User Profile
-
Send Message
Posted Jun 9, 2012@Andrew_Sikorski
:<
-
View User Profile
-
Send Message
Posted Jun 9, 2012Not today Fussy, not today.
-
View User Profile
-
Send Message
Posted Jun 9, 2012Aight! Fussy is taking over. For a bit :D
-
View User Profile
-
Send Message
Posted Jun 9, 2012@Manuestaire
Oh, I think I understand you now, you intend to run survival games in one world, while you have other worlds as well? I'll be sure to look into that!
-
View User Profile
-
Send Message
Posted Jun 9, 2012Trying out server reload. All players still need to be kicked, but the server will remain up, which boosts automation. The only issue is that something is still keeping the world locked despite it being unloaded. I need several cups of tea, Noah can take over.
-
View User Profile
-
Send Message
Posted Jun 9, 2012@FussyCashew
You might want to have a look at Multiverse Plugin (Skyblock has some dependencies on it) as it will allow to have a primary world (with the spawn, and portals) and some other worlds with different features.
That's something i'm really interested on, to be able to have this survival games appart from the normal worlds.
Don't know if I have explained myself properly.
-
View User Profile
-
Send Message
Posted Jun 9, 2012@Manuestaire
This looks like it overwrites the current world with new files and refreshes it. It doesn't actually change the level, so it doesn't restart. It may, however, be possible that I can use a single world name to host all the files and just copy the world to be loaded over to that name. I will look into it, thanks for the share!
-
View User Profile
-
Send Message
Posted Jun 9, 2012@Manuestaire
As far as Multiverse, I actually really like this idea, our system already supports grouping of chests that you can fill in different orders, and it would be simply adding another timer and keeping track of what players are in which game. I'll look into adding this into a future release. Also, thanks for the suggestion for reloading worlds, I'll look into that as well. Hopefully it will work. Thanks for the suggestion!
-
View User Profile
-
Send Message
Posted Jun 9, 2012If you search for "reset" you will see the script: https://github.com/Leseratte91/SkyBlock-Multiplayer/blob/master/src/me/lukas/skyblockmultiplayer/SkyBlockCommand.java
-
View User Profile
-
Send Message
Posted Jun 9, 2012@Manuestaire
To automatic reload: This, as far as I know, is not possible. The server needs to restart to change the level. The best we can do is add a server wrapper that will automatically restart the server.
-
View User Profile
-
Send Message
Posted Jun 9, 2012- Multiverse support: I would like to have this on my server but as a separated world don't know if it would be possible, and ¿maybe to have more than one universe of survival games, so you can have two different cycles of games at the same time? That way i could have a cycle with race for the wool maps, another for battle games, another for adventure maps and so on...
- Automatic reload: I don't know if this is already planned but I read actually it does not reload, so the best solution I think would be to change the map without having to reload the server (and without kick everyone playing in other worlds).