andune / HomeSpawnPlus

Home/Spawn control plugin for Bukkit
GNU General Public License v3.0
13 stars 10 forks source link

Error with latest Spigot and latest WG: #53

Closed SimSonic closed 9 years ago

SimSonic commented 9 years ago
[16:39:47] [Server thread/INFO]: DataSourcePool [HomeSpawnPlus] autoCommit[false] transIsolation[SERIALIZABLE] min[2] max[20]
[16:39:47] [Server thread/INFO]: DatabasePlatform name:HomeSpawnPlus platform:mysql

[16:39:48] [Server thread/INFO]: [HomeSpawnPlus] Loading HomeSpawnPlus v2.0.1-SNAPSHOT-b619

[16:39:56] [Server thread/INFO]: [HomeSpawnPlus] Enabling HomeSpawnPlus v2.0.1-SNAPSHOT-b619
[16:39:56] [Thread-36/INFO]: [rscp] Fetched 8e, 199p, 20i, 53l, 6s from "voxile.ru".
[16:39:57] [Server thread/WARN]: [HomeSpawnPlus] Old-style (1.7) config file found, it will take priority over new-style (2.0) config files. You should copy your settings into the 2.0-style configs and then delete your old config.yml
[16:39:57] [Server thread/WARN]: [HomeSpawnPlus] It was found that you have some configuration items missing from your config files. Defaults for these values will be loaded and you will see a message about each missing value. Either copy these values into your config files or set core.warnMissingConfigItems to false if you want to disable this warning.
[16:39:57] [Server thread/INFO]: [HomeSpawnPlus] Missing config key core.uuidCleanupOnStartup, using default value false
[16:39:57] [Server thread/INFO]: [HomeSpawnPlus] Missing config key cost.enabled, using default value true
[16:39:57] [Server thread/INFO]: [HomeSpawnPlus] Loaded 179 locale strings (0 overrides)
[16:39:58] [Server thread/INFO]: [HomeSpawnPlus] using VAULT:rscPermissions for permissions
[16:39:58] [Server thread/INFO]: [HomeSpawnPlus] Vault interface found and will be used for economy-related functions (economy = Fe)
[16:39:58] [Server thread/WARN]: [HomeSpawnPlus] eventType 
[16:39:58] [Server thread/ERROR]: [HomeSpawnPlus] Caught exception loading plugin, shutting down
java.lang.NullPointerException
    at com.andune.minecraft.hsp.integration.worldguard.RegionListener.registerRegion(RegionListener.java:112) ~[HomeSpawnPlus_v2.0.1.b619.jar:2.0.1-SNAPSHOT]
    at com.andune.minecraft.hsp.integration.worldguard.RegionListener.registerRegion(RegionListener.java:91) ~[HomeSpawnPlus_v2.0.1.b619.jar:2.0.1-SNAPSHOT]
    at com.andune.minecraft.hsp.integration.worldguard.WorldGuardModule.registerRegion(WorldGuardModule.java:124) ~[HomeSpawnPlus_v2.0.1.b619.jar:2.0.1-SNAPSHOT]
    at com.andune.minecraft.hsp.strategy.StrategyConfigImpl.checkTypeForRegion(StrategyConfigImpl.java:126) ~[HomeSpawnPlus_v2.0.1.b619.jar:2.0.1-SNAPSHOT]
    at com.andune.minecraft.hsp.strategy.StrategyConfigImpl.loadDefaultStrategies(StrategyConfigImpl.java:186) ~[HomeSpawnPlus_v2.0.1.b619.jar:2.0.1-SNAPSHOT]
    at com.andune.minecraft.hsp.strategy.StrategyConfigImpl.loadConfig(StrategyConfigImpl.java:151) ~[HomeSpawnPlus_v2.0.1.b619.jar:2.0.1-SNAPSHOT]
    at com.andune.minecraft.hsp.strategy.StrategyConfigImpl.init(StrategyConfigImpl.java:81) ~[HomeSpawnPlus_v2.0.1.b619.jar:2.0.1-SNAPSHOT]
    at com.andune.minecraft.hsp.shade.commonlib.Initializer.initAll(Initializer.java:82) ~[HomeSpawnPlus_v2.0.1.b619.jar:2.0.1-SNAPSHOT]
    at com.andune.minecraft.hsp.HomeSpawnPlus.onEnable(HomeSpawnPlus.java:83) ~[HomeSpawnPlus_v2.0.1.b619.jar:2.0.1-SNAPSHOT]
    at com.andune.minecraft.hsp.HomeSpawnPlusBukkit.onEnable(HomeSpawnPlusBukkit.java:77) [HomeSpawnPlus_v2.0.1.b619.jar:2.0.1-SNAPSHOT]
    at org.bukkit.plugin.java.JavaPlugin.setEnabled(JavaPlugin.java:321) [Spigot_v1.8_2015-03-18.jar:git-Spigot-c3c767f-33d5de3]
    at org.bukkit.plugin.java.JavaPluginLoader.enablePlugin(JavaPluginLoader.java:335) [Spigot_v1.8_2015-03-18.jar:git-Spigot-c3c767f-33d5de3]
    at org.bukkit.plugin.SimplePluginManager.enablePlugin(SimplePluginManager.java:405) [Spigot_v1.8_2015-03-18.jar:git-Spigot-c3c767f-33d5de3]
    at org.bukkit.craftbukkit.v1_8_R1.CraftServer.loadPlugin(CraftServer.java:356) [Spigot_v1.8_2015-03-18.jar:git-Spigot-c3c767f-33d5de3]
    at org.bukkit.craftbukkit.v1_8_R1.CraftServer.enablePlugins(CraftServer.java:316) [Spigot_v1.8_2015-03-18.jar:git-Spigot-c3c767f-33d5de3]
    at net.minecraft.server.v1_8_R1.MinecraftServer.q(MinecraftServer.java:402) [Spigot_v1.8_2015-03-18.jar:git-Spigot-c3c767f-33d5de3]
    at net.minecraft.server.v1_8_R1.MinecraftServer.k(MinecraftServer.java:370) [Spigot_v1.8_2015-03-18.jar:git-Spigot-c3c767f-33d5de3]
    at net.minecraft.server.v1_8_R1.MinecraftServer.a(MinecraftServer.java:325) [Spigot_v1.8_2015-03-18.jar:git-Spigot-c3c767f-33d5de3]
    at net.minecraft.server.v1_8_R1.DedicatedServer.init(DedicatedServer.java:211) [Spigot_v1.8_2015-03-18.jar:git-Spigot-c3c767f-33d5de3]
    at net.minecraft.server.v1_8_R1.MinecraftServer.run(MinecraftServer.java:505) [Spigot_v1.8_2015-03-18.jar:git-Spigot-c3c767f-33d5de3]
    at java.lang.Thread.run(Thread.java:745) [?:1.8.0_11]
[16:39:58] [Server thread/INFO]: [HomeSpawnPlus] Disabling HomeSpawnPlus v2.0.1-SNAPSHOT-b619
[16:39:58] [Server thread/INFO]: [HomeSpawnPlus] HomeSpawnPlus version 2.0.1-SNAPSHOT-b619 is disabled

My single config.yml: http://pastebin.com/iaWM7SbQ

SimSonic commented 9 years ago

I have splitted my config.yml into new separate files — no changes. I have deleted features one by one, and found, that problem is here:

events:
  onRegionEnter;starland2station,Starland:
    - spawnSpecificWorld:Station
  onRegionEnter;station2starland,Station:
    - spawnSpecificWorld:Starland

WorldGuard 6.0.0-beta-05.1569. Fix please :)

andune commented 9 years ago

Thanks for the detailed bug report and configs. Made it very easy to reproduce and fix the problem. The latest build with the fix can be found on Jenkins.

SimSonic commented 9 years ago

With the latest build plugin writes in console the following string on every onRegionEnter event (2 for my case):

[07:22:10 WARN]: [HomeSpawnPlus] eventType
[07:22:10 WARN]: [HomeSpawnPlus] eventType
[07:22:10 INFO]: Successfully reloaded event config

Teleporting still is not working.

andune commented 9 years ago

The message is due to an old log format that never got converted. If you look at the linked code in the commit, you can see when you update to the latest build, that warn message will be turned into one of two warnings:

eventType {} references non-existant world {}
eventType {} depends on WorldGuard which is not present or enabled. Skipping.

If it is the first one (which I would expect), it means the world you referenced in the onRegionEnter/onRegionExit strategy doesn't exist. Caps may be important.

If it's the second error, it's likely another bug with the WorldGuard module. I don't think this is happening, but if it is, at least it should be easy for me to reproduce and fix.

SimSonic commented 9 years ago

I have only two these worlds:

/mv list
[07:52:52 INFO]: ====[ Multiverse World List ]====
[07:52:52 INFO]: Station - NORMAL
[07:52:52 INFO]: Starland - NORMAL

Starland is my main world. WG regions are exists and in lowercase: station2starland and starland2station.

Current events.yml: http://pastebin.com/gjMxinGX

I will try to enter worldnames in lowercase for now.

SimSonic commented 9 years ago

I see, my worlds are not lowercase but hsp tries to find lowercase variants.

[08:04:03 WARN]: [HomeSpawnPlus] eventType onregionenter;station2starland,station references non-existant world station

I suppose fix should be like this:

String eventTypeLC = eventType.toLowerCase();
...
        if (eventTypeLC.startsWith(EventType.ENTER_REGION.toString())
                || eventTypeLC.startsWith(EventType.EXIT_REGION.toString())) {
            ...
        }

P.S. Link to Jenkins in readme.md is wrong for now, it is http://andune.com/jenkins/job/HomeSpawnPlus_v20/ but should be http://andune.com/jenkins/job/HomeSpawnPlus/

SimSonic commented 9 years ago

Thanks a lot, you're one of the most responsive devs I've contacted with!

SimSonic commented 9 years ago

Sorry ... it's still happening with build 626:

[10:00:05 WARN]: [HomeSpawnPlus] eventType onregionenter;starland2station,starland references non-existant world starland
[10:00:05 WARN]: [HomeSpawnPlus] eventType onregionenter;station2starland,station references non-existant world station
[10:00:05 INFO]: Successfully reloaded event config

I believe it is here: https://github.com/andune/HomeSpawnPlus/blob/master/core/src/main/java/com/andune/minecraft/hsp/strategy/StrategyConfigImpl.java#L175 https://github.com/andune/HomeSpawnPlus/blob/master/core/src/main/java/com/andune/minecraft/hsp/strategy/StrategyConfigImpl.java#L239 https://github.com/andune/HomeSpawnPlus/blob/master/core/src/main/java/com/andune/minecraft/hsp/strategy/StrategyConfigImpl.java#L314

P.S. I will try to fix it while you are absent =) :( P.P.S. I think it's done, but check it :) #54

CCCCarsten commented 8 years ago

Hi @SimSonic , may I take the liberty to ask you something about "world-specific strategies"? :) I don't find anyone here who could help me. I think you have configurated HomeSpawnPlus in a similar way. This is why it could be a great help for me if you look at this issue: https://github.com/andune/HomeSpawnPlus/issues/101 It would be very nice. Thank you in advance! Ciao, Carsten