Less Frequently Asked Questions
These are less common questions that don't come up often enough for me to make an entry on the main faq, but I want to have written down.
Feel free to CTRL + F to search for an issue here, or use the table of contents to the right (or the dropdown that says "On this page" if you are on a smaller screen)
The leaderboards don't reset at the right time!
This is probably caused by your server being on a different timezone than you expect. To fix this, you should change the timezone that the server uses. See below for how to do that:
How to change the system timezone
If your server is running on dedicated hardware or a vps that you have control over,
the best way to change the timezone of the server is to change the system timezone.
There is plenty of information online about how to do that.
For example, if your server is running on Ubuntu Server, you can look up
change system timezone on ubuntu server.
How to change the server timezone
If you do not have access to change the system timezone (e.g. if you are using a host) then the next best solution is
to change the timezone of the server itself. To do this, you can use the -Duser.timezone
startup flag.
The user timezone startup flag takes a TZ Database Time Zone,
such as America/New_York
. Note that not every city has its own time zone, so make sure that the timezone you enter
is a valid one in the list, otherwise it will not work.
The site time.is provides a page that shows your timezone,
which includes the timezone identifier you should enter.
(on that page it is called "IANA time zone identifier")
For example, aj lives in Arizona, USA, and the timezone identifier for all of Arizona is America/Phoenix
.
To set the server's timezone to Arizona, aj would add -Duser.timezone=America/Phoenix
to his startup flags.
If your host allows you to set startup flags yourself, you would most likely be able to do that in the "Startup" tab of your server's panel. If not, you might need to contact their support to have them add it. The system that most minecraft hosts use makes it easy for host admins to add startup flags to specific servers, so as long as they are not unreasonably stubborn they should be able to do it for you.
How do I reset a leaderboard?
To reset data for an ajLeaderboards leaderboard, you need to first reset the data in the target placeholder.
The process for resetting data for each target placeholder is different, so its not possible for me to know every process.
The one I can help you with is the statistics
expansion. If you are wanting to reset a player's statistics, see
Reset a player's statistics below.
If you are wanting to reset data for another expansion, try checking their documentation.
If the answer is not on their documentation, you should ask their support (not ajLeaderboards support).
Once you reset the data in the target placeholder, run /ajlb reset <board>
to clear the ajLeaderboards cache for that board.
Once you do that, players will need to join to show on the leaderboard again, just like when you first set it up.
Reset a player's statistics
You can follow these steps to reset Minecraft Statistics:
- Completely shut down the server (a simple restart will not work)
- Once the server is shut down, open the main world folder
- It is
world
by default, but might be different if you changedlevel-name
inserver.properties
- It is
- What to do from here depends on what you want to reset:
- If you want to reset all statistics for all players, you can just delete the
stats
folder - If you want to reset all statistics for a specific player, open the
stats
folder and delete the file with their UUID.- If your server is offline or has a faulty proxy setup, the UUIDs may be based on the player's username instead of their real mojang UUID. There are online converters to help find the offline UUID.
- If you want to reset a specific statistic for a specific player, you will need to open the file in the stats folder with their UUID, then find the statistic you want to reset (the file is json-formatted) and set it to 0.
- If you want to reset all statistics for all players, you can just delete the
- Make sure to save any changes you made, then start up the server.
- ajLeaderboards doesn't update offline players automatically, so if you don't want to wait for player(s) to join, you can:
- Run the command
/ajlb reset <board>
to clear all players from the board (they will need to join to show up again) - Run the command
/ajlb removeplayer <player> <board>
to remove a specific player from the board (they will need to join to show up again) - You can also try running
/ajlb updatealloffline <board>
to attempt an offline update of all players, or/ajlb updateplayer <board> <player>
to attempt an update of a specific player- Not all expansions support updating players who are offline, which is the main reason it is not done automatically.
- If nothing happens when running one of these commands, the expansion probably does not support updating offline players. You should run the
/ajlb reset
or/ajlb removeplayer
commands instead to remove players until they join again.
- Run the command
How can I make a group leaderboard?
ajLeaderboards is meant for leaderboards of players. You cannot currently make a leaderboard of groups (such as factions, clans, group islands, etc).
You can, however, display the group that a player is in alongside them on the leaderboard using extras
Illegal local variable table start_pc 72
If ajLeaderboards works fine, but then breaks after a restart with an error including Illegal local variable table start_pc 72 in method 'void us.ajg0702.leaderboards.LeaderboardPlugin.onEnable()'
then it is very likely that your server is infected by a Trojain.
This means that your server could have a backdoor that is very difficult to remove, but I can help you remove it.
The trojain that causes this error will spread itself to all jars when the server starts. That means to get rid of it, you need to delete all jars on your server, and re-download them from trusted sources. A common place to get these trojains would be from 'cracked' premium plugins and random people sending you jars. So if you have a jar from either one of those, you should avoid re-installing it.
After re-downloading all of your jars from trusted sources and before starting the server you should run a quick check to see if one of the jars you downloaded is the source of the infection. To do that, run one of these command line commands in the folder with your plugins:
For Linux:
grep -FR "l/M/x" .
For Windows:
findstr /sml /c:"l/M/x" *
These commands may come up with false positives, so you should double-check any jars returned by the command by opening it as a zip file. If you see a folder called l
and inside that folder is another one called M
and inside that folder another one called x
then that jar is infected.
VirusTotal does not currently detect this trojain!
The reason that this trojain breaks ajLeaderboards is due to the fact that it tries to spread itself to all other jars it can find. For some reason there is a bug in the trojain that happens to surface with the ajLeaderboards jar where it incorrectly modifies the jar, which then causes the jar to fail to load on the next server restart.
Spark shows ajLb using thousands of threads!
If you took a spark report of all threads and noticed that ajLb has a large number of threads, this is usually not a cause for concern.
That spark report shows the total number of threads that were used within a (usually long) time period, not the current number of threads. This might show a large number because ajLeaderboards will create threads when they are needed, then remove them when they are not used.
If ajLeaderboards was actually using thousands of threads, the server would crash (servers usually crash around 500 threads at the most)
ajLeaderboards will not go above max-fetching-threads
in the config. Note that lowering this option may have performance impacts.