Is there any way to run a server command on startup?

Discussion in 'Spigot Discussion' started by o355, May 29, 2016.

  1. Hi everyone,
    From my latest discoveries, it seems like with my server, doing "lagg unloadchunks" right after startup really improves server performance, by a lot. Doing the command first thing brings CPU usage down to 5% after startup, without it, it's pinned at 100% CPU usage of 200%.

    Is there any way to a command on startup inside when the Minecraft server boots up?

    Thanks.
     
    #1 o355, May 29, 2016
    Last edited: May 29, 2016
  2. You had the source code?
     
  3. No, I said it wrong. I meant a startup command done when the MC server finishes booting.
     
  4. You can create a plugin who do it? In the onEnable() you make what you want? Simply.
     
    • Agree Agree x 1
  5. All you need is to set up your anti-lag plugin to disable spawn chunks in all worlds. This frees up tons of memory and has no real downsides.

    If your plugin cant do this, there are others that are just for disabling spawn chunks (and your antilag plugin is shit, incidentally).
     
  6. I'm using ClearLagg, but I'm pretty sure it's Spigot's preload of the world spawn that causes high CPU usage, and lagg unloadchunks undoes that. I'll look into how I can stop preload of world spawns.
     
  7. I just told you how..

    (clearlagg is bloatware, honestly. it creates more than it cures)
     
  8. I've had it for ages and it's done really nothing to cure problems, I gotta face it. I'm gonna find a better plugin, any recommendations from you?