cccozmics Posted March 21, 2021 Share Posted March 21, 2021 My friends and I want to play a minehut server that when you die 3 times you will be in spectator mode? is there a command for that or a setting? Link to comment Share on other sites More sharing options...
4 _Tarna_ Posted March 21, 2021 Share Posted March 21, 2021 You can use a plugin called Skript to do this. First download the plugin called Skript and restart the server. Then go to plugins > skript > scripts. Then in this scripts folder, make a file called like lives.sk. It can be called anything but just has to end in .sk. Then in that file you just created, put this in it and click save. on death of player: add 1 to {deaths::%victim's uuid%} on respawn: if {deaths::%player's uuid%} >= 3: set player's gamemode to spectator command /resetdeaths <player>: permission: deaths.reset trigger: set {deaths::%arg-1's uuid%} to 0 set arg-1's gamemode to survival This makes it that whenever someone dies 3 times, they get put into spectator mode. Then someone with op or the permission node deaths.reset can do /resetdeaths <player> to reset a certain player's deaths and put them back in surival mode. After you put that inside of the file and clicked save, go in game and type /sk reload lives, or whatever you named the file. Now the skript should be working. Note that if it shows any indent errors cause of the forums formatting, try using the one from this pastebin. https://pastebin.com/7bEgzLGU Note that this is also possible with just vanilla minecraft using command blocks, I'm just not sure how to use them. You can either find an online tutorial or someone else can show you if you want to do it with just command blocks. 1 Discord - tarna256 In-game name - _Tarna_ Website - https://tarna.dev Paste Site: https://paste.tarna.dev --------------------------------------------------------- [VIP] - 7/27/2020 Community Support - 7/8/20 - 11/3/20 Helper - 11/3/20 - 2/21/21 Moderator - 2/21/21 - 5/17/21 - 5/17/21 - 12/20/22 Moderator - 12/20/22 - now --------------------------------------------------------- Link to comment Share on other sites More sharing options...
0 erjiwhghie Posted May 13, 2021 Share Posted May 13, 2021 Do you just copy and paste the whole thing? or just the commannds? Link to comment Share on other sites More sharing options...
0 rigs4296 Posted May 13, 2021 Share Posted May 13, 2021 copy everything inside the box Link to comment Share on other sites More sharing options...
0 Narratrr Posted June 15, 2021 Share Posted June 15, 2021 skript file IGN: LastMC Discord: LastXD#7171 Rank: PRO Join date: Monday - December - 23rd - 2019 Link to comment Share on other sites More sharing options...
0 maxybuild Posted September 11, 2021 Share Posted September 11, 2021 (edited) Thanks, the code worked! But there is an issue where, when spectators leave and join back to the game, their game mode is switched to survival. The death count for them isn't changed, just their game mode. I know I can just ban them, but I would like to give them the option to spectate. Can this be fixed? Edited September 12, 2021 by maxybuild Link to comment Share on other sites More sharing options...
-1 jahvetti100 Posted June 14, 2021 Share Posted June 14, 2021 where i put these commands Link to comment Share on other sites More sharing options...
-2 Critify Posted June 16, 2021 Share Posted June 16, 2021 it diddnt work Link to comment Share on other sites More sharing options...
-2 ninjaboyo007 Posted August 7, 2021 Share Posted August 7, 2021 Where is the file Link to comment Share on other sites More sharing options...
Question
cccozmics
My friends and I want to play a minehut server that when you die 3 times you will be in spectator mode? is there a command for that or a setting?
Link to comment
Share on other sites
8 answers to this question
Recommended Posts