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
Is this survival games ITSELF or is it a plugin that hooksup with a survival games plugin? I am quite confused. I like some of the features you have here but some of them I do not.
and wth.. it randomly spams my console and lagging:
it spams my console with this:
... 19 more 23:50:17 [SEVERE] Could not pass event EntityTargetEvent to LSGM org.bukkit.event.EventException at org.bukkit.plugin.java.JavaPluginLoader$1.execute(JavaPluginLoader.ja va:304) at org.bukkit.plugin.RegisteredListener.callEvent(RegisteredListener.jav a:62) at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.j ava:460) at org.bukkit.craftbukkit.event.CraftEventFactory.callEntityTargetEvent( CraftEventFactory.java:452) at net.minecraft.server.PathfinderGoalMeleeAttack.d(PathfinderGoalMeleeA ttack.java:59) at net.minecraft.server.PathfinderGoalSelector.a(PathfinderGoalSelector. java:33) at net.minecraft.server.EntityLiving.z_(EntityLiving.java:1246) at net.minecraft.server.EntityLiving.e(EntityLiving.java:1126) at net.minecraft.server.EntityMonster.e(EntityMonster.java:21) at net.minecraft.server.EntityZombie.e(EntityZombie.java:55) at net.minecraft.server.EntityLiving.F_(EntityLiving.java:447) at net.minecraft.server.EntityMonster.F_(EntityMonster.java:25) at net.minecraft.server.World.entityJoinedWorld(World.java:1262) at net.minecraft.server.WorldServer.entityJoinedWorld(WorldServer.java:1 06) at net.minecraft.server.World.playerJoinedWorld(World.java:1244) at net.minecraft.server.World.tickEntities(World.java:1151) at net.minecraft.server.MinecraftServer.w(MinecraftServer.java:558) at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:459) at net.minecraft.server.ThreadServerApplication.run(SourceFile:492) Caused by: java.lang.NullPointerException at com.hockeygoalie5.lsgm.Tribute.onEntityTarget(Tribute.java:55) at sun.reflect.GeneratedMethodAccessor59.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.lang.reflect.Method.invoke(Unknown Source) at org.bukkit.plugin.java.JavaPluginLoader$1.execute(JavaPluginLoader.ja va:302) ... 18 more
@hockeygoalie5
ok.. ehh it didnt work. I still stayed exactly were i was. Soooo idk how to fix it:/ i added 30 spawns and tested it with only 2 people soooo:/
EDIT: It also when peace time is up, it SPAMS it like 100 times. but then stops saying it.
@hockeygoalie5
Testing. If it works..... i love you:)
BUT! idk if it works yet haha
@YooStickAh
Exactly.
@hockeygoalie5
soo if i add like 30 spawns even if they fly wwwaaayyy off, when the game starts they will go back to the spawn?
@YooStickAh
If you set a spawn with /lsgm addspawn (I recommend adding enough to have each player spawn in a different spot), then they will be teleported when the game starts and not be far off.
You really need to fix the "spectator mode" liek make everything the same BUT NOO FLY. they can teleport and just walk with them. Because if a new game starts, they will have like 5min (countdown) to fly suuupppeerr far andthen the game will start and they are hella far. Plz take off the fly i need this to be fixed really bad plz:/
@DribblesSeakip
Teams will be added before 1.2 is released.
Sounds good. Thanks for the update,
So, are you considering adding team support?
@DribblesSeakip
Is it saying no one to teleport to, or doing nothing? Due to the way we have to detect mouse clicks, you might need to be looking at a block to use it. We hopefully have been able to disable all interaction from spectators. We pretty much put every single event listener to block the event from spectators. There is only so much we can do, though. This will defiantly be improved once the API is released.
Hey Hockey, I've looked into it and for some rounds, the Tp function for spectators works perfectly, but for others, it just never works (for everyone). Additionally, is there any way so spectators can get in peoples way, like they can block regular players from jumping and placing a block underneath them, and can get in the way of fights (particularly arrows).
Is there a way to make the mod active on one world and not all of them?
@iTiamo
This is a bug with Minecraft teleportation, and not the plugin itself. We've been able to set up the spawns ourselves without players taking damage, try setting the spawn to as close to the middle of the tube as possible.
@DribblesSeakip
Could you elaborate a bit more? They were working before, and I haven't touched them. Thanks for the testing! Also, we're knocking our noggins together to figure out implementing teams. This will probably be released when 1.2 leaves dev.
Bug: spectators can't TP
Testing the plugin, seems to be working flawlessly :)
Works :). So, do you think you'll be able to add the team support?
Hello, I've tried to set this plugin up and everything is working fine, people spawn at their spawns and when the game ends the server restarts. The only problem is... When the game starts and people go to a random spawn, they fall down due to a bit of lag and spawn around y 49 and start to suffocate. This is a big problem and do you have any idea how to fix it? I think settings spawns higher may cause them to die of fall damage!
@DribblesSeakip
I'm an idiot. Try now.
Hey, I tried downloading the file and I was given a 404 error.