[Plugin] ServerTools v 1.3.0

  • This is a set of plugins (put together in one .jar file) that we use in our server (Artisan's Realm) and I thought that maybe other servers would like to make use of them.


    As with all plugins you need to extract the .zip file in your plugins folder and restart your game if running.


    Now to explain what it does:


    Part 1: Autogm1, automatically sets players to semi-creative mode when they log in your server.


    Commands:
    /autogm1 set, adds the player to the autogm1 list
    /autogm1 del, removes the player from the autogm1 list
    /autogm1 list, shows all UIDs in the autogm1 list (Admins only)
    /autogm1 help, shows what each command does as described above


    Text Files associated with this part:
    autogm1list.txt -> holds the list of player UIDs Please do NOT manually edit or weird things can start happening


    Part 2: Automated Messages, sends automated messages to players on admin command


    Commands: (Admins only)
    /st list, shows a list of all automated messages
    /st sayt messagename playername, messagename the name identifier of the message, playername optional to send a private message, else it broadcasts to the server chat
    /st sayn messagenumber playername, messagenumber the number identifier of the message (or a coma separated series of numbers of messages), playername optional to send a private message, else it broadcasts to the server chat
    /st anntest annid, used to test automated announcements, annid can be any of: onlogin, onloginnew, onloginadminbroadcast, onloginadmin, or recurring


    Text Files associated with this part:
    messages.txt -> holds the automated messages, each line has to be formatted as follows: messagename;hex colourcode;messagecontent (example available in the .zip file)
    announcements.txt -> holds the automated announcements, each line has to be formatted as follows: annid;annname;hex colourcode;seconds if annid=recurring;anncontent (examples available in the .zip file)


    Part 3: Automated Ranking System, automatically changes permission groups of players if a time benchmark has been met

    Text Files associated with this part:
    ranklist.txt -> hold all rank information, each line should be formatted as: PermGroupName;TimeRequiredInSeconds;MessageToSendUponRankup
    The first line of the file as you can see in the example provided in the .zip file must be the rank you want the ranking system to start at and then a ;0 this is the rank your admins have to set a player to for the ranking process to start. This was done in case you want to have a Guest/Visitor permission group every player has to stay into until an admin has talked to them and e.g. claimed an area for them. Then that admin would set the "Guest" to the permission group mentioned above and the ranking process would start for that player.
    Note: all PermGroupNames must be the same as the ones in your permission files else the plugin will not work.


    Part4: Policing System, denies player access to selected items and keeps a log/warns players saying selected banned words


    Commands: (Admins only)
    /st blacklist show, shows the messages contained any of the banned words players have sent
    /st blacklist clear, clears the blacklist of all entries


    Text Files associated with this part:
    blacklist.txt -> holds blacklist messages Please do NOT manually edit or weird things can start happening
    bannedwords.txt -> holds a list of all words you want to keep track of. Only one word must be on each line of the file and e.g. if you ban "cat" the plugin will also be triggered for "delicate" or "catholic" so in this case you can use " cat " in the text file (without the quotation marks of course)
    banneditems.txt -> holds a list of all banned items that players cannot pick up from the ground or from chests, again only one item name per line in the text file. Note the item name must be the name it has in the world database e.g. for dynamite that is tnt.


    Part 5: Restart Warnings


    Text Files associated with this part:
    restartwarnings.txt -> requires three lines as in the example included in the zip archive, the line order doesn't matter.
    Example setup:
    restartTimes=03:00;09:00;15:00;21:00 (times must be written in 24 hour format at the timezone of the server, in case of multiple restarts in a day the times must be separated by a semicolon ";" and without spaces)
    restartWarningsMinutes=15;10;5;1 (warnings 15, 10, 5, and 1 minute before the restart, values must be separated by a semicolon)
    restartWarningsSeconds=30;15;10;5 (warnings 30, 15, 10, and 5 seconds before the restart, values must be separated by a semicolon)


    Part 6: General use/utility


    Commands: (Admins only)
    /st heal playername, fully heals target player
    /st lastonline playername, shows when a player was last online on your server
    /st tod 0-23, changes the time of day to the set 24 hour clock number
    /st weather weathertype, changes the weather to the provided type, valid inputs are: clear, default, densefog, fog, heavyrain, heavyrainthunder, overcast, rain, rainthunder, storm
    /st timespeed float, sets the server game time speed to the provided float value
    /st reload, reads the text files again to reinitialise the plugin without the need to restart your server
    /st help, displays plugin help


    Text Files associated with this part:
    settings.txt -> this is the most important file in order to customise the way you want this plugin to work on your server. The following options are available to initialise in the file: (note the = signs must be there)


    AutoMessageBotName=MinoBot (or any other name you want)
    PoliceBotMode=on (or off)
    PoliceBotName=MinoCop (or any other name you want)
    PoliceBotChatColour=[#1B00CC] (any hex colour code you want)
    RankingBotMode=on (or off)
    RankingBotName=MinoRank (or any other name you want)
    RankingBotChatColour=[#00FF00] (any hex colour code you want)
    RankcheckTimer=300 (a valid float number in seconds, signifies how often the timer will check all currently online players to if applicable rank them up)
    Autogm1Mode=on (or off)
    Autogm1DeniedPermGroup=SomePermGroup (gives you the option to deny access to autogm1 on login to one of your permission groups)
    NewPlayerPermGroup=SomePermGroup (used to recognise to which players to send the onloginnew automated announcements)
    RestartWarningsMode=on (or off)
    RestartWarningsBotName=MinoWarning (or any other name you want)
    RestartWarningsChatColour=[#EA4343] (any hex colour code you want)
    RestartWarningsCheckInterval=2 (a valid float number in seconds, signifies how often the timer will check the current time vs restart time difference)
    GeneralPluginTextColour=[#00eeee] (any hex colour code you want)


    if you leave any of the options blank they will be parsed in as empty strings, thus in messages nothing will appear. Important: if you are using the RankingBot or the RestartWarningBot do not leave the RankCheckTimer and RestartWarningsCheckInterval fields blank else you will get an error.


    Hope everything is clearly explained above. In case of questions or suggestions just comment here or send me a pm :)


    Any suggestions/requests for new features are also very welcome :)

  • Hey
    The tool is very imposing and a great job. Unfortunately, the whole thing is not for us, as we already use other plugins with the similar characteristics. When you have a new server is your tool determines the right choice.


    I would find it however great if the function: "last player online" as a singleess plug-in to have.


    Great work, keep it up



    Hey
    das tool ist sehr imposant und bestimmt eine tolle arbeit. leider ist das gesamtwerk nichts für uns, da wir schon andere plugins mit den änlichen merkmalen verwenden. wenn man einen server neu aufsetzt ist euer tool bestimmt die richtige wahl.


    ich würde es aber toll finden wenn die Funktion: "last player online" als einzelness plug-in zu haben.


    Tolle arbeit, macht weiter so

  • @lenko That was the reason it was created. We wanted a customised tool to allow us to run our server the way we wanted. So I am certain that not every one of the included tools will be wanted by every other server. For that reason I made the on/off settings in the settings.txt to allow you to use only the tools you want from it ;)


    Eitherway here is a small plugin that only includes the last online function :)
    [Plugin] LastOnline

  • jetzt gibt es keine, aber ich kann eine morgen (oder übermorgen) schreiben :)


    Für jetzt hast du eine besondere Frage, die ich antworten könnte?

  • Die alte Version soll noch kompatibel sein, in unser Server haben wir keine Probleme mit die alte Version.


    Außerdem bitte geb mir Bescheid ob java-Fehler oder andere Probleme gibt :)

  • Ok expected that, yes the plugin throws some errors in SP since the last update bit it is not supposed to work there so i haven't fixed them yet, will do with the next update in a week or so


  • I would find it however great if the function: "last player online" as a singleess plug-in to have.


    Not a plug in - but I just use the simplest of simple commands: tail -f <current_log>.log |grep -E "F.f|PLAYER CONNECT|Client Connected ID" in a different screen session.


    Extremely light on system resources, doesn't impact RW performance whatsoever because it's just looking at the log file, and shows (in real time as each user logs in) User name, User IP, and time connected.


    You can output it to file by Ctrl-a H which means you can sort it however you want.

  • Not a plug in - but I just use the simplest of simple commands: tail -f <current_log>.log |grep -E "F.f|PLAYER CONNECT|Client Connected ID" in a different screen session.


    Extremely light on system resources, doesn't impact RW performance whatsoever because it's just looking at the log file, and shows (in real time as each user logs in) User name, User IP, and time connected.


    You can output it to file by Ctrl-a H which means you can sort it however you want.

    the /lastonline function is there for admins to be able to check when a player was last online on the server, that could very well be 5, 10, or even 50 days ago. Looking through all the log files (especially when the server is restarted 2 times a day thus creating 3 log files per day) is extremely tedious imo :/


    The purpose of this function was a rule we have on our server that after 30 days of inactivity your area is cleaned up and returned to nature, thus we use this function to identify abandoned claims.


    The only thing the /lastonline function does is execute an SQL Query on the world database to extract the lastlogin date from the players table for the specified player then calculate the amount of days between that and the current date. So not really "heavy" on the server tbh.


    PS: lenko's comment was probably a direct translation from german that is why it said "last player online" instead of "last time a player was online" which for a native speaker ofc mean two completely different things ;)


  • PS: lenko's comment was probably a direct translation from german that is why it said "last player online" instead of "last time a player was online" which for a native speaker ofc mean two completely different things ;)


    Fair call.. It's one of the things with google translate.. it may be fantastic but some things can get misinterpreted. You are spot on in your analysis though.. I read "last player online" as exactly that.. which with tail and grep can give you exactly that extracted from the log with times and IP addresses.

  • Bump :D


    Big update to include restart warnings and refactoring the whole plugin classes' setup to make it easier for me to update it in the future and keep track of where everything is :D


    Also the autogm1list.txt was changed from name based to UID based thus everyone needs to readd themselves to the list. Server owners need to delete the contents of the old text file before starting the server with the new version of the plugin.

Participate now!

Don’t have an account yet? Create a new account now and be part of our community!