You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
> shop reload
[14:02:29 INFO]: [ShopChest] Using locale "en_US"
[14:02:29 INFO]: [de.epiceric.shopchest.dependencies.hikari.HikariDataSource] HikariPool-1 - Shutdown initiated...
[14:02:29 INFO]: [de.epiceric.shopchest.dependencies.hikari.HikariDataSource] HikariPool-1 - Shutdown completed.
[14:02:29 INFO]: [de.epiceric.shopchest.dependencies.hikari.HikariDataSource] HikariPool-2 - Starting...
[14:02:29 INFO]: [de.epiceric.shopchest.dependencies.hikari.HikariDataSource] HikariPool-2 - Start completed.
[14:02:29 INFO]: [ShopChest] Cleaned up economy log
[14:02:29 INFO]: Successfully reloaded 1 shop/s.
[14:02:29 WARN]: Exception in thread "pool-29-thread-3" java.lang.NullPointerException
[14:02:29 WARN]: at java.base/java.lang.String.replace(String.java:2158)
[14:02:29 WARN]: at de.epiceric.shopchest.shop.Shop.getHologramText(Shop.java:317)
[14:02:29 WARN]: at de.epiceric.shopchest.shop.Shop.createHologram(Shop.java:228)
[14:02:29 WARN]: at de.epiceric.shopchest.shop.Shop.lambda$create$1(Shop.java:141)
[14:02:29 WARN]: at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1130)
[14:02:29 WARN]: at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:630)
[14:02:29 WARN]: at java.base/java.lang.Thread.run(Thread.java:832)
on using a shop
[14:06:44 ERROR]: Could not pass event PlayerInteractEvent to ShopChest v1.13-SNAPSHOT
java.lang.NullPointerException: null
at java.lang.String.replace(String.java:2158) ~[?:?]
at de.epiceric.shopchest.language.LanguageUtils.getMessage(LanguageUtils.java:2666) ~[?:?]
at de.epiceric.shopchest.listeners.ShopInteractListener.buy(ShopInteractListener.java:874) ~[?:?]
at de.epiceric.shopchest.listeners.ShopInteractListener.handleInteractEvent(ShopInteractListener.java:285) ~[?:?]
at de.epiceric.shopchest.listeners.ShopInteractListener.onPlayerInteract(ShopInteractListener.java:471) ~[?:?]
at com.destroystokyo.paper.event.executor.asm.generated.GeneratedEventExecutor389.execute(Unknown Source) ~[?:?]
at org.bukkit.plugin.EventExecutor.lambda$create$1(EventExecutor.java:69) ~[patched_1.16.5.jar:git-Paper-428]
at co.aikar.timings.TimedEventExecutor.execute(TimedEventExecutor.java:80) ~[patched_1.16.5.jar:git-Paper-428]
at org.bukkit.plugin.RegisteredListener.callEvent(RegisteredListener.java:70) ~[patched_1.16.5.jar:git-Paper-428]
at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.java:607) ~[patched_1.16.5.jar:git-Paper-428]
at org.bukkit.craftbukkit.v1_16_R3.event.CraftEventFactory.callPlayerInteractEvent(CraftEventFactory.java:510) ~[patched_1.16.5.jar:git-Paper-428]
at net.minecraft.server.v1_16_R3.PlayerInteractManager.a(PlayerInteractManager.java:464) ~[patched_1.16.5.jar:git-Paper-428]
at net.minecraft.server.v1_16_R3.PlayerConnection.a(PlayerConnection.java:1549) ~[patched_1.16.5.jar:git-Paper-428]
at net.minecraft.server.v1_16_R3.PacketPlayInUseItem.a(PacketPlayInUseItem.java:27) ~[patched_1.16.5.jar:git-Paper-428]
at net.minecraft.server.v1_16_R3.PacketPlayInUseItem.a(PacketPlayInUseItem.java:5) ~[patched_1.16.5.jar:git-Paper-428]
at net.minecraft.server.v1_16_R3.PlayerConnectionUtils.lambda$ensureMainThread$1(PlayerConnectionUtils.java:23) ~[patched_1.16.5.jar:git-Paper-428]
at net.minecraft.server.v1_16_R3.TickTask.run(SourceFile:18) ~[patched_1.16.5.jar:git-Paper-428]
at net.minecraft.server.v1_16_R3.IAsyncTaskHandler.executeTask(IAsyncTaskHandler.java:136) ~[patched_1.16.5.jar:git-Paper-428]
at net.minecraft.server.v1_16_R3.IAsyncTaskHandlerReentrant.executeTask(SourceFile:23) ~[patched_1.16.5.jar:git-Paper-428]
at net.minecraft.server.v1_16_R3.IAsyncTaskHandler.executeNext(IAsyncTaskHandler.java:109) ~[patched_1.16.5.jar:git-Paper-428]
at net.minecraft.server.v1_16_R3.MinecraftServer.bb(MinecraftServer.java:1132) ~[patched_1.16.5.jar:git-Paper-428]
at net.minecraft.server.v1_16_R3.MinecraftServer.executeNext(MinecraftServer.java:1125) ~[patched_1.16.5.jar:git-Paper-428]
at net.minecraft.server.v1_16_R3.IAsyncTaskHandler.awaitTasks(IAsyncTaskHandler.java:119) ~[patched_1.16.5.jar:git-Paper-428]
at net.minecraft.server.v1_16_R3.MinecraftServer.sleepForTick(MinecraftServer.java:1086) ~[patched_1.16.5.jar:git-Paper-428]
at net.minecraft.server.v1_16_R3.MinecraftServer.w(MinecraftServer.java:1000) ~[patched_1.16.5.jar:git-Paper-428]
at net.minecraft.server.v1_16_R3.MinecraftServer.lambda$a$0(MinecraftServer.java:173) ~[patched_1.16.5.jar:git-Paper-428]
at java.lang.Thread.run(Thread.java:832) [?:?]
The text was updated successfully, but these errors were encountered:
Managed to debug and reproduce the issue on my end. As it turns out, some economy plugins do not provide a meaningful implementation of Economy.format(double) and instead just return null.
switch (placeholder) {
caseBUY_PRICE:
replace = plugin.getEconomy().format(getBuyPrice()); // sets replace to nullbreak;
caseSELL_PRICE:
replace = plugin.getEconomy().format(getSellPrice()); // also sets replace to nullbreak;
default:
replace = String.valueOf(placeholders.get(placeholder));
}
format = format.replace(placeholder.toString(), replace); // consumes the null and throws
Despite the issue being caused by incomplete implementations of Economy in other plugins I'd still recommend handling this case more gracefully, perhaps even printing out a message to nag the authors of used econ plugin to provide a proper format implementation.
TheAwoo
added a commit
to TheAwoo/BetterEconomy
that referenced
this issue
Mar 15, 2021
The issue
Created shops display no holograms whatsoever. Still able to buy/sell; player balance changes properly.
PaperMC version: paper-1.16.5-428
Plugin version: Build #99
Hologram format config:
Relevant logs:
on using a shop
The text was updated successfully, but these errors were encountered: