Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Placeholder error for ruined towns #54

Open
Firav opened this issue Dec 27, 2023 · 2 comments
Open

Placeholder error for ruined towns #54

Firav opened this issue Dec 27, 2023 · 2 comments
Labels
bug Something isn't working inactive Used to mark items that will be closed soon due to inactivity.

Comments

@Firav
Copy link

Firav commented Dec 27, 2023

Describe the Bug

The following error displays on every refresh interval for ruined towns.

- [Wed 10:13:09 ERROR MapTowny] Error applying the replacement '%mayor%' for click information on town 'Sangtown'!
java.lang.NullPointerException: Cannot invoke "com.palmergames.bukkit.towny.object.Resident.getName()" because the return value of "com.palmergames.bukkit.towny.object.Town.getMayor()" is null
    at maptowny-2.2.0.jar//me.silverwolfg11.maptowny.managers.TownInfoManager.lambda$registerReplacements$0(TownInfoManager.java:104)
    at maptowny-2.2.0.jar//me.silverwolfg11.maptowny.objects.TextReplacement.getReplacedText(TextReplacement.java:88)
    at maptowny-2.2.0.jar//me.silverwolfg11.maptowny.managers.TownInfoManager.getClickTooltip(TownInfoManager.java:237)
    at maptowny-2.2.0.jar//me.silverwolfg11.maptowny.managers.TownyLayerManager.buildTownEntry(TownyLayerManager.java:172)
    at maptowny-2.2.0.jar//me.silverwolfg11.maptowny.tasks.RenderTownsTask.run(RenderTownsTask.java:55)
    at org.bukkit.craftbukkit.v1_20_R2.scheduler.CraftTask.run(CraftTask.java:101)
    at org.bukkit.craftbukkit.v1_20_R2.scheduler.CraftScheduler.mainThreadHeartbeat(CraftScheduler.java:480)
    at net.minecraft.server.MinecraftServer.tickChildren(MinecraftServer.java:1470)
    at net.minecraft.server.dedicated.DedicatedServer.tickChildren(DedicatedServer.java:446)
    at net.minecraft.server.MinecraftServer.tickServer(MinecraftServer.java:1379)
    at net.minecraft.server.MinecraftServer.runServer(MinecraftServer.java:1156)
    at net.minecraft.server.MinecraftServer.lambda$spin$0(MinecraftServer.java:315)
    at java.base/java.lang.Thread.run(Thread.java:840)

Plugin Version

2.2.0

Towny Version

0.100.0.14

Server Software Version

git-Paper-318 (MC: 1.20.2) (Implementing API version 1.20.2-R0.1-SNAPSHOT) (Git: 9271ee7)

@Firav Firav added the bug Something isn't working label Dec 27, 2023
@silverwolfg11
Copy link
Collaborator

Hi, thanks for reporting the issue, and sorry for the late response.

Ruined towns shouldn't be getting rendered to the map. This would imply that the ruined town check is failing on the Towny side. Do the ruined towns have any residents? If so, that might be what's causing the check to fail. If this is still occurring, I would also encourage reporting this on the Towny github as well.

@silverwolfg11 silverwolfg11 added the inactive Used to mark items that will be closed soon due to inactivity. label Oct 28, 2024
@silverwolfg11
Copy link
Collaborator

Marking this issue as inactive and slating for removal since no further information was provided.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working inactive Used to mark items that will be closed soon due to inactivity.
Projects
None yet
Development

No branches or pull requests

2 participants