Skip to main content
added 4 characters in body
Source Link
Angzuril
  • 8.4k
  • 2
  • 39
  • 57

youYou can use scoreboard... 
thereThere is a criteria called stat.leaveGame, you can use this to detect when the player rejoinrejoins the server, and run effect command to those players score higher or equal to 1. afterAfter that, you can set the score to be 0 and wait for the next time


edit:

Add scoreboard objective(detect leave game)

/scoreboard objectives add leaveGame stat.leaveGame

Give effect to the player who joined the game(has left before)

/effect @a[score_leaveGame_min=1] minecraft:resistance <time> 4

Clear their score

/scoreboard players set @a leaveGame 0

you can use scoreboard... there is a criteria called stat.leaveGame, you can use this to detect when the player rejoin the server, and run effect command to those players score higher or equal to 1. after that, you can set the score to be 0 and wait for the next time


edit:

Add scoreboard objective(detect leave game)

/scoreboard objectives add leaveGame stat.leaveGame

Give effect to the player who joined the game(has left before)

/effect @a[score_leaveGame_min=1] minecraft:resistance <time> 4

Clear their score

/scoreboard players set @a leaveGame 0

You can use scoreboard... 
There is a criteria called stat.leaveGame, you can use this to detect when the player rejoins the server, and run effect command to those players score higher or equal to 1. After that, you can set the score to be 0 and wait for the next time


edit:

Add scoreboard objective(detect leave game)

/scoreboard objectives add leaveGame stat.leaveGame

Give effect to the player who joined the game(has left before)

/effect @a[score_leaveGame_min=1] minecraft:resistance <time> 4

Clear their score

/scoreboard players set @a leaveGame 0
elaborated
Source Link

you can use scoreboard... there is a criteria called stat.leaveGame, you can use this to detect when the player rejoin the server, and run effect command to those players score higher or equal to 1. after that, you can set the score to be 0 and wait for the next time


edit:

Add scoreboard objective(detect leave game)

/scoreboard objectives add leaveGame stat.leaveGame

Give effect to the player who joined the game(has left before)

/effect @a[score_leaveGame_min=1] minecraft:resistance <time> 4

Clear their score

/scoreboard players set @a leaveGame 0

you can use scoreboard... there is a criteria called stat.leaveGame, you can use this to detect when the player rejoin the server, and run effect command to those players score higher or equal to 1. after that, you can set the score to be 0 and wait for the next time

you can use scoreboard... there is a criteria called stat.leaveGame, you can use this to detect when the player rejoin the server, and run effect command to those players score higher or equal to 1. after that, you can set the score to be 0 and wait for the next time


edit:

Add scoreboard objective(detect leave game)

/scoreboard objectives add leaveGame stat.leaveGame

Give effect to the player who joined the game(has left before)

/effect @a[score_leaveGame_min=1] minecraft:resistance <time> 4

Clear their score

/scoreboard players set @a leaveGame 0
Source Link

you can use scoreboard... there is a criteria called stat.leaveGame, you can use this to detect when the player rejoin the server, and run effect command to those players score higher or equal to 1. after that, you can set the score to be 0 and wait for the next time