Holographic Displays

Holographic Displays

3M Downloads

registerGlobalPlaceholder

DevSnx opened this issue · 4 comments

commented

Confirmation

Description

I have a problems with the Placeholders

My code:

StatsAPIAddon.getApi().registerGlobalPlaceholder("{statsapi}", 30, new GlobalPlaceholderReplaceFunction() { @Override public @NotNull String getReplacement(@NotNull String s) { return "§4StatsAPI §bv." + StatsAPI.getInstance().getDescription().getVersion() + " §7by §4Snx"; } });

error:
[Lobby-1]java.lang.NullPointerException: Cannot invoke "me.filoghost.holographicdisplays.api.HolographicDisplaysAPI.registerGlobalPlaceholder(String, int, me.filoghost.holographicdisplays.api.placeholder.GlobalPlaceholderReplaceFunction)" because the return value of "de.devsnx.statsapi.addon.StatsAPIAddon.getApi()" is null [Lobby-1]ud > at de.devsnx.statsapi.addon.manager.PlaceholdersManager.registerNewPlaceholders(PlaceholdersManager.java:20) ~[original-StatsAPI-HolographicDisplays-1.0.2-SNAPSHOT.jar:?] [Lobby-1]ud > at de.devsnx.statsapi.addon.manager.PlaceholdersManager.<init>(PlaceholdersManager.java:15) ~[original-StatsAPI-HolographicDisplays-1.0.2-SNAPSHOT.jar:?] [Lobby-1]ud > at de.devsnx.statsapi.addon.StatsAPIAddon.onEnable(StatsAPIAddon.java:29) ~[original-StatsAPI-HolographicDisplays-1.0.2-SNAPSHOT.jar:?] [Lobby-1]ud > at org.bukkit.plugin.java.JavaPlugin.setEnabled(JavaPlugin.java:264) ~[paper-api-1.19.2-R0.1-SNAPSHOT.jar:?] [Lobby-1]ud > at org.bukkit.plugin.java.JavaPluginLoader.enablePlugin(JavaPluginLoader.java:370) ~[paper-api-1.19.2-R0.1-SNAPSHOT.jar:?] [Lobby-1]ud > at org.bukkit.plugin.SimplePluginManager.enablePlugin(SimplePluginManager.java:542) ~[paper-api-1.19.2-R0.1-SNAPSHOT.jar:?] [Lobby-1]ud > at org.bukkit.craftbukkit.v1_19_R1.CraftServer.enablePlugin(CraftServer.java:565) ~[paper-1.19.2.jar:git-Paper-307] [Lobby-1]ud > at org.bukkit.craftbukkit.v1_19_R1.CraftServer.enablePlugins(CraftServer.java:479) ~[paper-1.19.2.jar:git-Paper-307] [Lobby-1]ud > at net.minecraft.server.MinecraftServer.loadWorld0(MinecraftServer.java:636) ~[paper-1.19.2.jar:git-Paper-307] [Lobby-1]ud > at net.minecraft.server.MinecraftServer.loadLevel(MinecraftServer.java:422) ~[paper-1.19.2.jar:git-Paper-307] [Lobby-1]ud > at net.minecraft.server.dedicated.DedicatedServer.initServer(DedicatedServer.java:306) ~[paper-1.19.2.jar:git-Paper-307] [Lobby-1]ud > at net.minecraft.server.MinecraftServer.runServer(MinecraftServer.java:1100) ~[paper-1.19.2.jar:git-Paper-307] [Lobby-1]ud > at net.minecraft.server.MinecraftServer.lambda$spin$0(MinecraftServer.java:305) ~[paper-1.19.2.jar:git-Paper-307] [Lobby-1]ud > at java.lang.Thread.run(Thread.java:833) ~[?:?]

Holographic Displays version

3.0.0

Additional information

No response

commented

??

commented

???

commented

?

commented

the return value of "de.devsnx.statsapi.addon.StatsAPIAddon.getApi()" is null

This error is not caused by Holographic Displays.