options: command: /spleef permission: spleef.admin failBlocks: water source #Ending must contain or EndingCommand: true EndCommand: /items #This will be executed by player instantRegen: false eggCooldown: 20 #ticks Version: 1.0.1 variables: {spleef::prefix} = "&6&lSpleef&8&l>>" {spleef::tool} = diamond shovel {spleef::clearinv} = true {spleef::slot} = 4 {spleef::block} = snow block command {@command} [] []: trigger: if arg 1 is not set: if {spleef::spawn::player1} and {spleef::spawn::player2} are set: if {spleef::player1} is not set: set {spleef::player1} to "%player%" teleport player to {spleef::spawn::player1} if {spleef::clearinv} is true: clear player's inventory set slot {spleef::slot} of player's inventory to {spleef::tool} loop blocks within {spleef::pos1} to {spleef::pos2}: set block at location of loop-block to {spleef::block} if {@instantRegen} is false: wait 1 tick else if {spleef::player2} is not set: set {spleef::player2} to "%player%" teleport player to {spleef::spawn::player2} if {spleef::clearinv} is set: clear player's inventory set slot {spleef::slot} of player's inventory to {spleef::tool} else: message "%{spleef::prefix}% &cThe game is already ingame" else: message "%{spleef::prefix}% &cThe spleef spawn(s) are not set. Please contact a staff member" else if arg 1 is "pos1": if player has permission "{@permission}": set {spleef::pos1} to location of target block message "%{spleef::prefix}% &6Set pos1" else if arg 1 is "pos2": if player has permission "{@permission}": set {spleef::pos2} to location of target block message "%{spleef::prefix}% &6Set pos2" else if arg 1 is "spec": if {spleef::spawn::spec} is set: teleport player to {spleef::spawn::spec} message "%{spleef::prefix}% &6Teleported to spleef spectator spawn" else: message "%{spleef::prefix}% &cThe spec spawn is not set. Please contact a staff member" else if arg 1 is "spawn1": if player has permission "{@permission}": set {spleef::spawn::player1} to player's location message "%{spleef::prefix}% &6Set player1's spawn" else if arg 1 is "spawn2": if player has permission "{@permission}": set {spleef::spawn::player2} to player's location message "%{spleef::prefix}% &6Set player2's spawn" else if arg 1 is "setspec": if player has permission "{@permission}": set {spleef::spawn::spec} to player's location message "%{spleef::prefix}% &6Set spec spawn" else if arg 1 is "setprefix": if player has permission "{@permission}": set {spleef::prefix} to coloured "%arg 2%" message "%{spleef::prefix}% &6Set spleef prefix" else if arg 1 is "reset": if player has permission "{@permission}": loop blocks within {spleef::pos1} to {spleef::pos2}: set block at location of loop-block to {spleef::block} if {@instantRegen} is false: wait 1 tick else if arg 1 is "setend": if player has permission "{@permission}": set {spleef::spawn::end} to player's location message "%{spleef::prefix}% &6Set end spawn" else if arg 1 is "tool": if player has permission "{@permission}": set {spleef::tool} to "%arg 2%" parsed as item message "%{spleef::prefix}% &6Tool set to %{spleef::tool}%" else if arg 1 is "slot": if player has permission "{@permission}": set {spleef::slot} to "%arg 2%" parsed as integer message "%{spleef::prefix}% &6Tool slot set to %{spleef::slot}%" else if arg 1 is "clearinv": if player has permission "{@permission}": set {spleef::clearinv} to arg 2 message "%{spleef::prefix}% &6Clearinv set to %{spleef::clearinv}%" else if arg 1 is "break": if player has permission "{@permission}": set {spleef::block} to arg 2 message "%{spleef::prefix}% &6Tool slot set to %{spleef::block}%" else if arg 1 is "leave": teleport "%{spleef::player2}%" parsed as player to {spleef::spawn::end} execute "%{spleef::player2}%" parsed as player command "/items" teleport "%{spleef::player1}%" parsed as player to {spleef::spawn::end} execute "%{spleef::player1}%" parsed as player command "/items" delete {spleef::player2} delete {spleef::player1} loop blocks within {spleef::pos1} to {spleef::pos2}: set block at location of loop-block to {spleef::block} if {@instantRegen} is false: wait 1 tick else if arg 1 is "help": message "%{spleef::prefix}% &6/spleef &7- Join a game" message "%{spleef::prefix}% &6/spleef help &7- Shows help" message "%{spleef::prefix}% &6/spleef spec &7- Spectate the game" message "%{spleef::prefix}% &6/spleef leave &7- Leave the game" if player has permission "{@permission}": message "%{spleef::prefix}% &6/spleef pos1 &7- Set pos1 (Target block)" message "%{spleef::prefix}% &6/spleef pos2 &7- Set pos2 (Target block)" message "%{spleef::prefix}% &6/spleef spawn1 &7- Set spawn1" message "%{spleef::prefix}% &6/spleef spawn2 &7- Set spawn2" message "%{spleef::prefix}% &6/spleef setend &7- Set ending location" message "%{spleef::prefix}% &6/spleef setspec &7- Set spec spawn" message "%{spleef::prefix}% &6/spleef setprefix (name) &7- Set prefix" message "%{spleef::prefix}% &6/spleef reset &7- Resets the spleef map" message "%{spleef::prefix}% &6/spleef tool (item) &7- Set spleef tool" message "%{spleef::prefix}% &6/spleef slot (integer) &7- Set tool slot" message "%{spleef::prefix}% &6/spleef clearinv (boolean) &7- Clears inventory" message "%{spleef::prefix}% &6/spleef block (block) &7- Set break block" on break: if block is {spleef::block}: if {spleef::player1} is set: if {spleef::player2} is not set: cancel event message "%{spleef::prefix}% &cYou need 2 players to begin the game" else: cancel event set block to air on step on {@failBlocks}: if {spleef::player2} is "%player%": if {spleef::player1} is set: broadcast "%{spleef::prefix}% &6%{spleef::player1}% has won a spleef battle against %{spleef::player2}%" teleport "%{spleef::player2}%" parsed as player to {spleef::spawn::end} teleport "%{spleef::player1}%" parsed as player to {spleef::spawn::end} if {@EndingCommand} is true: execute "%{spleef::player1}%" parsed as player command "{@EndCommand}" execute "%{spleef::player2}%" parsed as player command "{@EndCommand}" delete {spleef::player2} delete {spleef::player1} loop blocks within {spleef::pos1} to {spleef::pos2}: set block at location of loop-block to {spleef::block} wait 1 tick if {spleef::player1} is "%player%": if {spleef::player2} is set: broadcast "%{spleef::prefix}% &6%{spleef::player2}% has won a spleef battle against %{spleef::player1}%" teleport "%{spleef::player2}%" parsed as player to {spleef::spawn::end} teleport "%{spleef::player1}%" parsed as player to {spleef::spawn::end} if {@EndingCommand} is true: execute "%{spleef::player1}%" parsed as player command "{@EndCommand}" execute "%{spleef::player2}%" parsed as player command "{@EndCommand}" delete {spleef::player2} delete {spleef::player1} loop blocks within {spleef::pos1} to {spleef::pos2}: set block at location of loop-block to {spleef::block} if {@instantRegen} is false: wait 1 tick on right click on sign: if line 1 of block contains "Spleef": if line 2 of block contains "leave": teleport "%{spleef::player2}%" parsed as player to {spleef::spawn::end} teleport "%{spleef::player1}%" parsed as player to {spleef::spawn::end} if {@EndingCommand} is true: execute "%{spleef::player1}%" parsed as player command "{@EndCommand}" execute "%{spleef::player2}%" parsed as player command "{@EndCommand}" delete {spleef::player2} delete {spleef::player1} loop blocks within {spleef::pos1} to {spleef::pos2}: set block at location of loop-block to {spleef::block} if {@instantRegen} is false: wait 1 tick else if line 2 of block contains "join": execute player command "{@command}" on quit: if {spleef::player2} or {spleef::player1} is "%player%": teleport "%{spleef::player2}%" parsed as player to {spleef::spawn::end} teleport "%{spleef::player1}%" parsed as player to {spleef::spawn::end} if {@EndingCommand} is true: execute "%{spleef::player1}%" parsed as player command "{@EndCommand}" execute "%{spleef::player2}%" parsed as player command "{@EndCommand}" delete {spleef::player2} delete {spleef::player1} loop blocks within {spleef::pos1} to {spleef::pos2}: set block at location of loop-block to {spleef::block} if {@instantRegen} is false: wait 1 tick on rightclick with diamond shovel: if {spleef::player2} or {spleef::player1} is "%player%": if {spleef::player1} and {spleef::player2} are set: if {spleef::player::%shooter%::cooldown} is not set: make the player shoot a snowball at speed 2 on projectile hit: if projectile is a snowball: if "%shooter%" is {spleef::player2} or {spleef::player1}: if {spleef::player1} and {spleef::player2} are set: clear projectile loop blocks in radius 1 around event-location: if loop-block is a snow block: set loop-block to air set {spleef::player::%shooter%::cooldown} to 20 loop {spleef::player::%shooter%::cooldown} times: subtract 1 from {spleef::player::%shooter%::cooldown} wait 1 tick delete {spleef::player::%shooter%::cooldown}