Closed SimSonic closed 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 :)
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.
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.
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.
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.
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/
Thanks a lot, you're one of the most responsive devs I've contacted with!
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
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
My single config.yml: http://pastebin.com/iaWM7SbQ