Thank you again for the input.
Again, this is partially a sloppy port because I was rushed near the end to get it ready for my own server. I cannot remember why I was originally storing the online count but I don’t think it’s actually used here. It may be just a mistake on my part since this was merged with another plugin code I have since separated.
[details=longer reply]The configuration was simply personal preference. I have not seen many other plugins use the asset api either, at least the ones iv looked at anyway. But I may try it at some point in the future. I am learning how to use it on another plugin I have in the works atm as I need it for a default player storage file.
The reason for using Timers instead of schedulers in some places is because the plugin was intended for use under low TPS conditions. The timers run at the same speed no matter what the TPS is. If I use schedulers then the 5 minute timer will become upwards of 15 minutes in some cases and that is not what I am looking for.
I have not looked into the pagination yet, since the way I had it worked but I will soon. It will probably be easier.
I am still a novice with the commands side of things especially arguments wise. I was intending to tidy it up at some point because it is hard to look at and determine what is what at a glance.[/details]
If you add
Task.Builder, then it runs asynchronously, executing at what you call normal speed. The important thing to know is that most of the API is not accessible while running asynchronously,
Timer or otherwise. If you’re accessing the API from an asynchronous task, instead, schedule a new regular Task to execute immediately. This way you can have a still-synchronous task that executes after an asynchronous period of time.
Just sayin’ again, the way one is expected to exit a command if the user did something wrong is by throwing a
throw new CommandException(plugin.fromLegacy("&4You have already voted!"));
Derp - I had this done for my current one and forgot about it for this one. It is changed in the code now but i will not update the jar yet. Going to make a few more changes before doing so.
Hello and thank you for the plugin, I am having an issue with the bringing back up of the server after the timer has ran and shut the server down, that part runs perfectly it just isn’t bringing the server back online, also I have a blank .txt file in my config folder called restart.txt do I need to write anything in it.
Very strange, iv tested numerous times on both windows and linux setups and they restart perfectly fine. The blank .txt file is supposed to be blank. All it does there is change the last modified date for that file as a reference.
Do you use a server control panel and if so, what one?
we use putty on our Linux dedi server
I did a manual restart using the /reboot start m 5 command and the server went down at 2:34pm and it is 2:38pm right now and server still hasn’t restarted
Alright, The way I am currently doing it works with most server control panels, For example 2 of these are McMyAdmin and AMP, which is what i currently use (both from the same author), When i get some time i will look into accommodating the use of external files for systems not using these types of server management solutions.
so nothing I can do right now then, to get it to restart on its own?
Unfortunately not unless you want to use one of the control panels. some of them are free and most are very easy to install and use.
Ok so I just changed the OS on my server to windows server 1012 r2 with this setup instead of the Linux putty setup the plugin should be able to do the restart function for me right?
Sorry for the late reply I have been very busy the past week, I’m unsure exactly how it will act outside of a control panel environment. I haven’t been able to look into integrating any external restart mechanisms yet. Im still unsure exactly how to accomplish it.
- Fix some permissions
- Convert HelpList to PaginationService
you could simply write a restart script for your server with a .sh file, that runs automatically again once the server shuts down, i use one for my server and would be happy to provide the script
it will have to be used on linux though not windows