ajgeiss0702 / ajleaderboards Goto Github PK
View Code? Open in Web Editor NEWCreate leaderboards for almost anything using PlaceholderAPI placeholders
Home Page: https://wiki.ajg0702.us/ajleaderboards/
License: GNU General Public License v3.0
Create leaderboards for almost anything using PlaceholderAPI placeholders
Home Page: https://wiki.ajg0702.us/ajleaderboards/
License: GNU General Public License v3.0
note "player_edr" is a custom placeholder that actually works
I tried the following in the config:
dont-add-zero: [player_edr]
dont-add-zero: ["player_edr"]
However, the values that return zero from the placeholder are still being added to the leaderboards.
I checked out the source code and I think the issue may be that there isn't a return statement if the condition is true.
Thanks!
Extension - Statistic
https://github.com/PlaceholderAPI/PlaceholderAPI/wiki/Placeholders#statistic
Every time I try to create /ajlb add %statistic_mine_block%
I get the error:
[03:44:58] [Craft Scheduler Thread - 157/WARN]: [ajLeaderboards] Plugin ajLeaderboards v2.8.0 generated an exception while executing task 452
java.lang.NullPointerException: The supplied Material does not have a corresponding statistic
at org.apache.commons.lang3.Validate.notNull(Validate.java:225) ~[commons-lang3-3.5.jar:3.5]
at org.bukkit.craftbukkit.v1_12_R1.entity.CraftPlayer.getStatistic(CraftPlayer.java:708) ~[CraftPlayer.class:git-CatServer-1.12.2-58b2eb6]
at com.extendedclip.papi.expansion.mcstatistics.StatisticsExpansion.calculateTotal(StatisticsExpansion.java:286) ~[?:?]
at com.extendedclip.papi.expansion.mcstatistics.StatisticsExpansion.onRequest(StatisticsExpansion.java:84) ~[?:?]
at me.clip.placeholderapi.replacer.CharsReplacer.apply(CharsReplacer.java:119) ~[?:?]
at me.clip.placeholderapi.PlaceholderAPI.setPlaceholders(PlaceholderAPI.java:71) ~[?:?]
at me.clip.placeholderapi.PlaceholderAPI.setPlaceholders(PlaceholderAPI.java:99) ~[?:?]
at us.ajg0702.leaderboards.LeaderboardPlugin.validatePlaceholder(LeaderboardPlugin.java:450) ~[?:?]
at us.ajg0702.leaderboards.commands.main.subcommands.Add.lambda$execute$0(Add.java:41) ~[?:?]
at org.bukkit.craftbukkit.v1_12_R1.scheduler.CraftTask.run(CraftTask.java:76) ~[CraftTask.class:git-CatServer-1.12.2-58b2eb6]
at org.bukkit.craftbukkit.v1_12_R1.scheduler.CraftAsyncTask.run(CraftAsyncTask.java:52) [CraftAsyncTask.class:git-CatServer-1.12.2-58b2eb6]
at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source) [?:1.8.0_391]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) [?:1.8.0_391]
at java.lang.Thread.run(Unknown Source) [?:1.8.0_391]
[us.ajg0702.leaderboards.libs.hikari.pool.PoolBase] HikariPool-1 - Failed to validate connection com.mysql.cj.jdbc.ConnectionImpl@67b9221d (No operations allowed after connection closed.). Possibly consider using a shorter maxLifetime value.
add option maximum-lifetime
[07:52:34 WARN]: [ajLeaderboards] An error occurred while loading a sign:
java.lang.NullPointerException: Cannot invoke "org.bukkit.World.getChunkAt(org.bukkit.Location)" because the return value of "org.bukkit.Location.getWorld()" is null
at org.bukkit.Location.getChunk(Location.java:123) ~[paper-api-1.20-R0.1-SNAPSHOT.jar:?]
at us.ajg0702.leaderboards.displays.signs.BoardSign.(BoardSign.java:37) ~[ajLeaderboards-2.7.0.jar:?]
at us.ajg0702.leaderboards.displays.signs.BoardSign.deserialize(BoardSign.java:141) ~[ajLeaderboards-2.7.0.jar:?]
at us.ajg0702.leaderboards.displays.signs.SignManager.reload(SignManager.java:63) ~[ajLeaderboards-2.7.0.jar:?]
at org.bukkit.craftbukkit.v1_20_R1.scheduler.CraftTask.run(CraftTask.java:101) ~[paper-1.20.jar:git-Paper-8]
at org.bukkit.craftbukkit.v1_20_R1.scheduler.CraftScheduler.mainThreadHeartbeat(CraftScheduler.java:483) ~[paper-1.20.jar:git-Paper-8]
at net.minecraft.server.MinecraftServer.runServer(MinecraftServer.java:1114) ~[paper-1.20.jar:git-Paper-8]
at net.minecraft.server.MinecraftServer.lambda$spin$0(MinecraftServer.java:320) ~[paper-1.20.jar:git-Paper-8]
at java.lang.Thread.run(Thread.java:1589) ~[?:?]
i am use paper
Just making sure
I have read the wiki and made sure, this feature is not yet in the plugin.
I believe, that this feature is possible to implement.
I made sure, that this feature has not been requested yet.
Problem
There is no Folia Support for ajLeaderboards yet (since it just came out)
Feature
https://github.com/PaperMC/Folia
Here is a summary of everything made with ChatGPT to save some time:
For plugin developers, there are a few key takeaways from the given text:
Folia introduces regionised multithreading, which means that plugins will require modification to function properly. Plugin developers should expect compatibility with existing plugins to be at zero.
Folia introduces new API additions, such as the RegionisedScheduler and EntityScheduler, which can help plugins run on the correct thread context.
To ensure compatibility with Folia, plugin developers must mark their plugin as compatible by placing "folia-supported: true" in the plugin.yml file. Additionally, plugins must take advantage of the RegionisedScheduler and EntityScheduler API to ensure correct behavior.
Plugins should not assume that they can access or modify data in other regions, as Folia regions tick in parallel and do not share data. Plugin developers should take advantage of the upcoming thread-check API to ensure correct behavior.
There are currently broken API, including the scoreboard API, and planned API changes, such as super aggressive thread checks, which may impact plugin development.
Overall, plugin developers should be prepared for significant changes in their plugins to ensure compatibility with Folia. They should take advantage of the new API additions and mark their plugin as compatible to ensure correct behavior. Additionally, they should be aware of the limitations and rules of Folia's regionised multithreading to avoid bugs and errors in their plugins.
What do I mean? Player 1metse on the balance, he creates a twink, throws there all the money and immediately out, as a result, he remains in the top, but it adds more and his twin, if the player who gave the money comes - the top will be updated, but he does not go. And it turns out that 1 player with accounts player_1 player_2 engaged all the top, and with the same balance.
itemsadder prefixes dont work in %ajlb_lb_statistic_deaths_1_alltime_prefix% (in all tops)
but in the usual holograms %img_player% work correctly
decentholograms ajleaderboards placeholderapi itemsadder latest stable versions
paper 1.16.5
java 17 (Temurin-17.0.8.1+1 from Eclipse Adoptium)
cfg ajlb + dh
Desktop.zip
The plugin won't start, getting error: Failed to initialize pool: Unknown system variable 'tx_isolation'
MySql version:
MySQL Ver 8.0.30-0ubuntu0.20.04.2 for Linux on x86_64 ((Ubuntu))
[06:26:22] [Server thread/INFO]: [ajLeaderboards] Enabling ajLeaderboards v2.6.2
[06:26:22] [Server thread/INFO]: [ajLeaderboards] Using MySQL for board cache. (mysql)
[06:26:22] [Server thread/ERROR]: Error occurred while enabling ajLeaderboards v2.6.2 (Is it up to date?)
us.ajg0702.leaderboards.libs.hikari.pool.HikariPool$PoolInitializationException: Failed to initialize pool: Unknown system variable 'tx_isolation'
at us.ajg0702.leaderboards.libs.hikari.pool.HikariPool.throwPoolInitializationException(HikariPool.java:595) ~[?:?]
at us.ajg0702.leaderboards.libs.hikari.pool.HikariPool.checkFailFast(HikariPool.java:574) ~[?:?]
at us.ajg0702.leaderboards.libs.hikari.pool.HikariPool.<init>(HikariPool.java:115) ~[?:?]
at us.ajg0702.leaderboards.libs.hikari.HikariDataSource.<init>(HikariDataSource.java:81) ~[?:?]
at us.ajg0702.leaderboards.cache.methods.MysqlMethod.init(MysqlMethod.java:55) ~[?:?]
at us.ajg0702.leaderboards.cache.Cache.<init>(Cache.java:99) ~[?:?]
at us.ajg0702.leaderboards.LeaderboardPlugin.onEnable(LeaderboardPlugin.java:167) ~[?:?]
at org.bukkit.plugin.java.JavaPlugin.setEnabled(JavaPlugin.java:321) ~[patched_1.8.8.jar:git-PaperSpigot-445]
at org.bukkit.plugin.java.JavaPluginLoader.enablePlugin(JavaPluginLoader.java:332) [patched_1.8.8.jar:git-PaperSpigot-445]
at org.bukkit.plugin.SimplePluginManager.enablePlugin(SimplePluginManager.java:407) [patched_1.8.8.jar:git-PaperSpigot-445]
at org.bukkit.craftbukkit.v1_8_R3.CraftServer.loadPlugin(CraftServer.java:359) [patched_1.8.8.jar:git-PaperSpigot-445]
at org.bukkit.craftbukkit.v1_8_R3.CraftServer.enablePlugins(CraftServer.java:318) [patched_1.8.8.jar:git-PaperSpigot-445]
at net.minecraft.server.v1_8_R3.MinecraftServer.s(MinecraftServer.java:408) [patched_1.8.8.jar:git-PaperSpigot-445]
at net.minecraft.server.v1_8_R3.MinecraftServer.k(MinecraftServer.java:372) [patched_1.8.8.jar:git-PaperSpigot-445]
at net.minecraft.server.v1_8_R3.MinecraftServer.a(MinecraftServer.java:327) [patched_1.8.8.jar:git-PaperSpigot-445]
at net.minecraft.server.v1_8_R3.DedicatedServer.init(DedicatedServer.java:267) [patched_1.8.8.jar:git-PaperSpigot-445]
at net.minecraft.server.v1_8_R3.MinecraftServer.run(MinecraftServer.java:563) [patched_1.8.8.jar:git-PaperSpigot-445]
at java.lang.Thread.run(Thread.java:750) [?:1.8.0_342]
Caused by: java.sql.SQLException: Unknown system variable 'tx_isolation'
at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:1073) ~[patched_1.8.8.jar:git-PaperSpigot-445]
at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3593) ~[patched_1.8.8.jar:git-PaperSpigot-445]
at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3525) ~[patched_1.8.8.jar:git-PaperSpigot-445]
at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:1986) ~[patched_1.8.8.jar:git-PaperSpigot-445]
at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:2140) ~[patched_1.8.8.jar:git-PaperSpigot-445]
at com.mysql.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2620) ~[patched_1.8.8.jar:git-PaperSpigot-445]
at com.mysql.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2570) ~[patched_1.8.8.jar:git-PaperSpigot-445]
at com.mysql.jdbc.StatementImpl.executeQuery(StatementImpl.java:1474) ~[patched_1.8.8.jar:git-PaperSpigot-445]
at com.mysql.jdbc.ConnectionImpl.getTransactionIsolation(ConnectionImpl.java:3198) ~[patched_1.8.8.jar:git-PaperSpigot-445]
at us.ajg0702.leaderboards.libs.hikari.pool.PoolBase.checkDefaultIsolation(PoolBase.java:479) ~[?:?]
at us.ajg0702.leaderboards.libs.hikari.pool.PoolBase.checkDriverSupport(PoolBase.java:442) ~[?:?]
at us.ajg0702.leaderboards.libs.hikari.pool.PoolBase.setupConnection(PoolBase.java:410) ~[?:?]
at us.ajg0702.leaderboards.libs.hikari.pool.PoolBase.newConnection(PoolBase.java:363) ~[?:?]
at us.ajg0702.leaderboards.libs.hikari.pool.PoolBase.newPoolEntry(PoolBase.java:206) ~[?:?]
at us.ajg0702.leaderboards.libs.hikari.pool.HikariPool.createPoolEntry(HikariPool.java:477) ~[?:?]
at us.ajg0702.leaderboards.libs.hikari.pool.HikariPool.checkFailFast(HikariPool.java:560) ~[?:?]
... 16 more
[06:26:22] [Server thread/INFO]: [ajLeaderboards] Disabling ajLeaderboards v2.6.2
[06:26:22] [Server thread/INFO]: [ajLeaderboards] Killing remaining workers
[06:26:22] [Server thread/INFO]: [ajLeaderboards] Remaining workers killed
[06:26:22] [Server thread/INFO]: [ajLeaderboards] ajLeaderboards v2.6.2 disabled.
We used ajLeaderboard to show the wins of PartyGames in the board.
in 1.20.1 it works fine. but in 1.20.2 i got this error.
im not sure if its related from aJLeaderboards or from PartyGames so i wrote it here too
[19:09:10] [Server thread/WARN]: [ajLeaderboards] Placeholder %partygames_wins% for player Cloude_Lecaw threw an error:
java.lang.NullPointerException: Cannot read field "wins" because "<local3>" is null
at me.wazup.partygames.placeholderapi.PlaceholderAPIHooks.onPlaceholderRequest(PlaceholderAPIHooks.java:76) ~[PartyGames_6.6.7.jar:?]
at me.clip.placeholderapi.PlaceholderHook.onRequest(PlaceholderHook.java:32) ~[PlaceholderAPI_2.11.5-Build182.jar:?]
at me.clip.placeholderapi.replacer.CharsReplacer.apply(CharsReplacer.java:119) ~[PlaceholderAPI_2.11.5-Build182.jar:?]
at me.clip.placeholderapi.PlaceholderAPI.setPlaceholders(PlaceholderAPI.java:71) ~[PlaceholderAPI_2.11.5-Build182.jar:?]
at us.ajg0702.leaderboards.cache.Cache.updateStat(Cache.java:493) ~[ajLeaderboards_2.8.0.jar:?]
at us.ajg0702.leaderboards.cache.Cache.updatePlayerStats(Cache.java:447) ~[ajLeaderboards_2.8.0.jar:?]
at us.ajg0702.leaderboards.Listeners.onQuit(Listeners.java:48) ~[ajLeaderboards_2.8.0.jar:?]
at com.destroystokyo.paper.event.executor.asm.generated.GeneratedEventExecutor1174.execute(Unknown Source) ~[?:?]
at org.bukkit.plugin.EventExecutor$2.execute(EventExecutor.java:77) ~[paper-api-1.20.2-R0.1-SNAPSHOT.jar:?]
at co.aikar.timings.TimedEventExecutor.execute(TimedEventExecutor.java:81) ~[paper-api-1.20.2-R0.1-SNAPSHOT.jar:git-Paper-226]
at org.bukkit.plugin.RegisteredListener.callEvent(RegisteredListener.java:70) ~[paper-api-1.20.2-R0.1-SNAPSHOT.jar:?]
at io.papermc.paper.plugin.manager.PaperEventManager.callEvent(PaperEventManager.java:54) ~[paper-1.20.2.jar:git-Paper-226]
at io.papermc.paper.plugin.manager.PaperPluginManagerImpl.callEvent(PaperPluginManagerImpl.java:126) ~[paper-1.20.2.jar:git-Paper-226]
at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.java:615) ~[paper-api-1.20.2-R0.1-SNAPSHOT.jar:?]
at net.minecraft.server.players.PlayerList.remove(PlayerList.java:594) ~[paper-1.20.2.jar:git-Paper-226]
at net.minecraft.server.players.PlayerList.remove(PlayerList.java:579) ~[paper-1.20.2.jar:git-Paper-226]
at net.minecraft.server.network.ServerGamePacketListenerImpl.removePlayerFromWorld(ServerGamePacketListenerImpl.java:2065) ~[?:?]
at net.minecraft.server.network.ServerGamePacketListenerImpl.onDisconnect(ServerGamePacketListenerImpl.java:2045) ~[?:?]
at net.minecraft.server.network.ServerGamePacketListenerImpl.onDisconnect(ServerGamePacketListenerImpl.java:2032) ~[?:?]
at net.minecraft.network.Connection.handleDisconnection(Connection.java:837) ~[?:?]
at net.minecraft.server.network.ServerConnectionListener.tick(ServerConnectionListener.java:260) ~[?:?]
at net.minecraft.server.MinecraftServer.tickChildren(MinecraftServer.java:1578) ~[paper-1.20.2.jar:git-Paper-226]
at net.minecraft.server.dedicated.DedicatedServer.tickChildren(DedicatedServer.java:446) ~[paper-1.20.2.jar:git-Paper-226]
at net.minecraft.server.MinecraftServer.tickServer(MinecraftServer.java:1379) ~[paper-1.20.2.jar:git-Paper-226]
at net.minecraft.server.MinecraftServer.runServer(MinecraftServer.java:1156) ~[paper-1.20.2.jar:git-Paper-226]
at net.minecraft.server.MinecraftServer.lambda$spin$0(MinecraftServer.java:315) ~[paper-1.20.2.jar:git-Paper-226]
at java.lang.Thread.run(Thread.java:1583) ~[?:?]
Our server auto-saves every 10 minutes. ajLeaderboards seems to have a bug that causes saves to take a solid 5 seconds, which results in massive TPS lag while saving. It's something to do with TopManager.reload()
.
Here's the full stack trace during the hang:
ajLeaderboards try to save a player with color to database.
I can't find any kind of User starts with Se, on my server it is impossible that the playername can bee changed.
In the stacktrace i can't find the real playername who the plugin try to save, maybe you can give me an info what i can change.
https://paste.gg/p/anonymous/6e7aa45d0f734e9286a5761900cc234a
Greetings
Ste3et_C0st
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.