An implementation of the Minecraft PVP minigame by SethBling.
- Supports 2 teams - red and blue
- This means you can play with more than 2 players!
- Automatic or manual team assignment
- Any players not already in a team are assigned to one
- Automatically puts people into spectator when the game begins
- Doesn't automatically put people who join into spectator. There's an
easier and faster way to implement this. It's
gamemode=spectator
inserver.properties
.
- Doesn't automatically put people who join into spectator. There's an
easier and faster way to implement this. It's
- Customizable swap timer
- 20-120s by default with 2 players.
- Swap timer automatically scales with the number of players
- I need your help with playtesting this! I'm unsure what the right values are.
- Top tier enterprise development with over-engineered code
- Oh hey, I'll totally hook into the data pack in the future. You never
know! Hyuk!
- I say this, but wait until you see my Manhunt datapack. That thing's a total hack.
- Oh hey, I'll totally hook into the data pack in the future. You never
know! Hyuk!
- Set
gamemode=spectator
inserver.properties
- Run
tag @a add ds.player
- Ensure there's an even number of players
- Run
function deathswap:begin
- Set
gamemode=spectator
in server.properties- This pack only makes non-players spectator when the game begins. If someone joins during the game, they won't be in spectator.
- Change settings to suit your needs.
- Run
tag <player> add ds.player
- This lets the game know who's a player for random team assignment.
- "Player" in this document refers to anyone with
tag=ds.player
.
- Assign teams to players
- There are 2 teams:
ds.red
andds.blue
.- Run, e.g.,
team join ds.red <player>
to make a player join that team.
- Run, e.g.,
- Any players not assigned to a team will be randomly assigned.
- There are 2 teams:
- Ensure teams have an equal number of players
- Run
function deathswap:begin
There are various settings you can change before the game. Currently the settings are for the # of lives and the swap timer.
You can find the default values for these settings in the function
deathswap:core/settings
.
Since these are implemented with scoreboard values instead of world storage, you can't share a settings command.
There are also string values for various things such as translations and are mostly for data pack developers.
You can find those in the function deathswap:core/string
and the storage
deathswap:string
.
DeathSwap is licensed under the Expat/MIT License.
More copyright and licensing information can be found in individual files and in the dep5 file if an SPDX header isn't found.