Stargate Rewritten

Stargate Rewritten

241 Downloads

Could not pass event SignChangeEvent to Stargate v0.10.4.0

MNDude opened this issue ยท 3 comments

commented

Whenever I try to make a stargate it is unable to complete it. It will create a button but that's it.
I am running on CraftBukkit version 2991-Spigot-018b9a0-f3f3094 (MC: 1.16.5) (Implementing API version 1.16.5-R0.1-SNAPSHOT)
I am running Stargate v. 0.10.4.0
I am not using bungee.
I am on Windows 10 Pro.
The plugins I am running are LuckPerms, Stargate, MySQL, Vault, WorldEdit, Essentials, EssentialsProtect, LogBlock, EssentialsGeoIP, EssentialsAntiBuild, EssentialsSpawn, WorldGuard, ChestShop, and mcMMO
My config and gates folder are both default.
config.yml:

Stargate Configuration File v. 0.10.4.0

Main Stargate config

portal-folder: plugins/Stargate/portals/
gate-folder: plugins/Stargate/gates/
default-gate-network: central
destroyexplosion: false
maxgates: 0
lang: en
destMemory: false
ignoreEntrance: false
handleVehicles: true
sortLists: false
protectEntrance: false
signColor: BLACK
useeconomy: false
createcost: 0
destroycost: 0
usecost: 0
toowner: false
chargefreedestination: true
freegatesgreen: false
debug: false
permdebug: false
enableBungee: false
verifyPortals: false

nethergate.gate:
portal-open=NETHER_PORTAL
portal-closed=AIR
toowner=false
X=OBSIDIAN
-=OBSIDIAN

XX
X..X
-..-
X*.X
XX

Error:
[11:26:56 ERROR]: Could not pass event SignChangeEvent to Stargate v0.10.4.0
org.bukkit.event.EventException: null
at org.bukkit.plugin.java.JavaPluginLoader$1.execute(JavaPluginLoader.java:319) ~[spigot-1.16.5.jar:2991-Spigot-018b9a0-f3f3094]
at org.bukkit.plugin.RegisteredListener.callEvent(RegisteredListener.java:70) ~[spigot-1.16.5.jar:2991-Spigot-018b9a0-f3f3094]
at org.bukkit.plugin.SimplePluginManager.fireEvent(SimplePluginManager.java:589) ~[spigot-1.16.5.jar:2991-Spigot-018b9a0-f3f3094]
at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.java:576) ~[spigot-1.16.5.jar:2991-Spigot-018b9a0-f3f3094]
at net.minecraft.server.v1_16_R3.PlayerConnection.a(PlayerConnection.java:2526) ~[spigot-1.16.5.jar:2991-Spigot-018b9a0-f3f3094]
at net.minecraft.server.v1_16_R3.PlayerConnection.lambda$19(PlayerConnection.java:2489) ~[spigot-1.16.5.jar:2991-Spigot-018b9a0-f3f3094]
at net.minecraft.server.v1_16_R3.PlayerConnection.lambda$2(PlayerConnection.java:293) ~[spigot-1.16.5.jar:2991-Spigot-018b9a0-f3f3094]
at net.minecraft.server.v1_16_R3.PlayerConnection.lambda$4(PlayerConnection.java:307) ~[spigot-1.16.5.jar:2991-Spigot-018b9a0-f3f3094]
at net.minecraft.server.v1_16_R3.TickTask.run(SourceFile:18) ~[spigot-1.16.5.jar:2991-Spigot-018b9a0-f3f3094]
at net.minecraft.server.v1_16_R3.IAsyncTaskHandler.executeTask(SourceFile:144) ~[spigot-1.16.5.jar:2991-Spigot-018b9a0-f3f3094]
at net.minecraft.server.v1_16_R3.IAsyncTaskHandlerReentrant.executeTask(SourceFile:23) ~[spigot-1.16.5.jar:2991-Spigot-018b9a0-f3f3094]
at net.minecraft.server.v1_16_R3.IAsyncTaskHandler.executeNext(SourceFile:118) ~[spigot-1.16.5.jar:2991-Spigot-018b9a0-f3f3094]
at net.minecraft.server.v1_16_R3.MinecraftServer.bb(MinecraftServer.java:942) ~[spigot-1.16.5.jar:2991-Spigot-018b9a0-f3f3094]
at net.minecraft.server.v1_16_R3.MinecraftServer.executeNext(MinecraftServer.java:935) ~[spigot-1.16.5.jar:2991-Spigot-018b9a0-f3f3094]
at net.minecraft.server.v1_16_R3.IAsyncTaskHandler.awaitTasks(SourceFile:127) ~[spigot-1.16.5.jar:2991-Spigot-018b9a0-f3f3094]
at net.minecraft.server.v1_16_R3.MinecraftServer.sleepForTick(MinecraftServer.java:919) ~[spigot-1.16.5.jar:2991-Spigot-018b9a0-f3f3094]
at net.minecraft.server.v1_16_R3.MinecraftServer.w(MinecraftServer.java:851) ~[spigot-1.16.5.jar:2991-Spigot-018b9a0-f3f3094]
at net.minecraft.server.v1_16_R3.MinecraftServer.lambda$0(MinecraftServer.java:164) ~[spigot-1.16.5.jar:2991-Spigot-018b9a0-f3f3094]
at java.lang.Thread.run(Unknown Source) [?:1.8.0_281]
Caused by: java.lang.NullPointerException
at net.TheDgtl.Stargate.LangLoader.getString(LangLoader.java:77) ~[?:?]
at net.TheDgtl.Stargate.Stargate.getString(Stargate.java:296) ~[?:?]
at net.TheDgtl.Stargate.Portal.getSignLines(Portal.java:650) ~[?:?]
at net.TheDgtl.Stargate.Portal.drawSign(Portal.java:811) ~[?:?]
at net.TheDgtl.Stargate.Portal.createPortal(Portal.java:1228) ~[?:?]
at net.TheDgtl.Stargate.listeners.BlockEventsListener.onSignChange(BlockEventsListener.java:32) ~[?:?]
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_281]
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_281]
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_281]
at java.lang.reflect.Method.invoke(Unknown Source) ~[?:1.8.0_281]
at org.bukkit.plugin.java.JavaPluginLoader$1.execute(JavaPluginLoader.java:315) ~[spigot-1.16.5.jar:2991-Spigot-018b9a0-f3f3094]
... 18 more

Thank you for your time!

commented

Preliminary testing with the exact same environment, except for mcmmo, does not reproduce the issue.
When I get a chance, I will compile a mcmmo jar to try this with... perhaps the issue is an incompatibility.

image

Speaking more broadly, as the npe occurs with langloader:70, the issue occurs when loading in the language files.

    public boolean reload() {
        // This extracts/updates the language as needed
        updateLanguage(lang);
        strList = load(lang);
        return true;
    }

That leads me to believe that the issue might be related to commit 3a8f185

commented

@MNDude As a quick test, try replacing the en.txt (found in the Lang subfolder of your Stargate directory) with this one.
It is a copy of the English language file from before commit 3a8f185

Also, we tested some of the new translation files, but besides causing an unrelated issue (#18), they appear to be stable (no null pointers).

commented

Yeah that fixed it, for whatever reason it didn't have any language file at all. Thank you!