Hello Im kinda noobish when it comes to scripts and would like to run a bunch of “whitelist add “user”” commands after my server starts, as me and my friends are currently running snapshot 20w09a on our server where the whitelist is bugged, and everyone needs to be manually added everytime the server restarts. Has looked around already, but got quickly confused, anyone that could point me in the right direction.
EDIT: Am able to write the scripts just dont know the syntax
There’s currently no way to do this.
While there is a way to have commands run for you, it is done on a timing trigger, not an event-trigger. This is because it uses cron (time).
Another reason why I believe I can’t have any scripts run on startup is that every minecraft server has a different startup sequence, startup length, and way to verify it came up properly before it starts running console commands.
i have looked a bit at the cron stuff, is there any way to have the additional argument be more than one command, so i dont need 15 cronjobs, something like “whitelist add user1; whitelist add user2”
another thing, is best to use the autosave in server status, or use a cronjob my cronjob seems to work best
The cronjob mechanism in the webui is designed so it has the least amount of security-related risks; this is why all the commands listed are also only commands that can be executed through
mineos.js, the heart of the Minecraft interfacing.
Whitelisting users is just leveraging the “send to console” functionality, so again (in the spirit of security and reliable execution) each line is basically anything you can type in the console with a single
If the Minecraft server software supported
whitelist add user1; whitelist add user2 in the console, then so would MineOS.
As best as I know, no server software does, so it looks like creating one cron per command is still the only option.