JoeNuts Posted May 9, 2020 Share Posted May 9, 2020 I am new server owner and I made my server for me and my 2 friends. A random joined and stole our diamonds. Is there a way to limi the amount of players allowed in the server to 3? Link to comment Share on other sites More sharing options...
0 DeltaRays Posted May 9, 2020 Share Posted May 9, 2020 You could limit the amount of players but in my opinion the best way is to turn the whitelist on (/whitelist on) and add only yourself and your friends to the whitelist (/whitelist add NAME) so that only the people that are in the whitelist will be able to join, so there's no risk that you are on but two other people can still join 1 Link to comment Share on other sites More sharing options...
0 Ezekia Posted May 9, 2020 Share Posted May 9, 2020 I can help you with that! I made a script that does exactly that! Use /playerslots <number> to set the player slots! command /playerslot <number>: permission: op aliases: slot, ps trigger: set {server::playerslots} to arg-1 play sound "entity.player.levelup" to player message "&f " message "&3Set the current player slots to &b%{server::playerslots}%&3!" message "&f " on join: if number of online players is more than {server::playerslots}: console command "/kick %player% This server is full!" 1 By reading this you are a confirmed nerd Link to comment Share on other sites More sharing options...
0 DeltaRays Posted May 9, 2020 Share Posted May 9, 2020 49 minutes ago, Ezekia said: I can help you with that! I made a script that does exactly that! Use /playerslots <number> to set the player slots! command /playerslot <number>: permission: op aliases: slot, ps trigger: set {server::playerslots} to arg-1 play sound "entity.player.levelup" to player message "&f " message "&3Set the current player slots to &b%{server::playerslots}%&3!" message "&f " on join: if number of online players is more than {server::playerslots}: console command "/kick %player% This server is full!" the whitelist method is better as I explained it above and you should replace the `on join` with "on connect" because otherwise it's going to send the join and quit messages. Also, instead of using console command "/kick %player% This server is full!" you should use kick player due to "This server is full!" 1 Link to comment Share on other sites More sharing options...
0 Ezekia Posted May 9, 2020 Share Posted May 9, 2020 16 minutes ago, DeltaRays said: the whitelist method is better as I explained it above and you should replace the `on join` with "on connect" because otherwise it's going to send the join and quit messages. Also, instead of using console command "/kick %player% This server is full!" you should use kick player due to "This server is full!" Okay. Thanks for the help! By reading this you are a confirmed nerd Link to comment Share on other sites More sharing options...
Question
JoeNuts
I am new server owner and I made my server for me and my 2 friends. A random joined and stole our diamonds. Is there a way to limi the amount of players allowed in the server to 3?
Link to comment
Share on other sites
4 answers to this question
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now