IntellectualSites / PlotSquared

PlotSquared - Reinventing the plotworld
GNU General Public License v3.0
548 stars 753 forks source link

Failed to parse default flag with key 'use' and value '#doors' only on startup, reload is fine #4073

Closed SecretlyJealous closed 1 year ago

SecretlyJealous commented 1 year ago

Server Implementation

Paper

Server Version

1.20

Describe the bug

When I start my server I get this error:

[10:37:04 INFO]: Preparing level "plotworld"
[10:37:04 INFO]: [PlotSquared/PlotSquared] Detected world load for 'plotworld'
[10:37:04 INFO]: [PlotSquared/PlotSquared] - generator: PlotSquared>PlotSquared
[10:37:04 INFO]: [PlotSquared/PlotSquared] - plot world: com.plotsquared.core.generator.HybridPlotWorld
[10:37:04 INFO]: [PlotSquared/PlotSquared] - plot area manager: com.plotsquared.core.generator.HybridPlotManager
[10:37:04 WARN]: [PlotSquared/PlotArea] Failed to parse default flag with key 'use' and value '#doors'. Reason: com.plotsquared.core.configuration.caption.TranslatableCaption@6ebec81d. This flag will not be added as a default flag.
[10:37:04 WARN]: com.plotsquared.core.plot.flag.FlagParseException: Failed to parse flag of type 'use'. Value '#doors' was not accepted.
[10:37:04 WARN]:        at plotsquared-bukkit-7.0.0-SNAPSHOT.jar//com.plotsquared.core.plot.flag.types.BlockTypeListFlag.getCategory(BlockTypeListFlag.java:95)
[10:37:04 WARN]:        at plotsquared-bukkit-7.0.0-SNAPSHOT.jar//com.plotsquared.core.plot.flag.types.BlockTypeListFlag.parse(BlockTypeListFlag.java:56)
[10:37:04 WARN]:        at plotsquared-bukkit-7.0.0-SNAPSHOT.jar//com.plotsquared.core.plot.flag.types.BlockTypeListFlag.parse(BlockTypeListFlag.java:35)
[10:37:04 WARN]:        at plotsquared-bukkit-7.0.0-SNAPSHOT.jar//com.plotsquared.core.plot.PlotArea.parseFlags(PlotArea.java:196)
[10:37:04 WARN]:        at plotsquared-bukkit-7.0.0-SNAPSHOT.jar//com.plotsquared.core.plot.PlotArea.loadDefaultConfiguration(PlotArea.java:408)
[10:37:04 WARN]:        at plotsquared-bukkit-7.0.0-SNAPSHOT.jar//com.plotsquared.core.PlotSquared.loadWorld(PlotSquared.java:852)
[10:37:04 WARN]:        at plotsquared-bukkit-7.0.0-SNAPSHOT.jar//com.plotsquared.bukkit.generator.BukkitPlotGenerator.getPlotArea(BukkitPlotGenerator.java:410)
[10:37:04 WARN]:        at plotsquared-bukkit-7.0.0-SNAPSHOT.jar//com.plotsquared.bukkit.generator.BukkitPlotGenerator$BukkitPlotBiomeProvider.getBiome(BukkitPlotGenerator.java:444)
[10:37:04 WARN]:        at org.bukkit.generator.BiomeProvider.getBiome(BiomeProvider.java:61)
[10:37:04 WARN]:        at org.bukkit.craftbukkit.v1_20_R1.generator.CustomWorldChunkManager.getNoiseBiome(CustomWorldChunkManager.java:47)
[10:37:04 WARN]:        at net.minecraft.world.level.biome.WorldChunkManager.a(WorldChunkManager.java:126)
[10:37:04 WARN]:        at net.minecraft.world.level.biome.WorldChunkManager.a(WorldChunkManager.java:71)
[10:37:04 WARN]:        at net.minecraft.world.level.chunk.ChunkGeneratorStructureState.lambda$generateRingPositions$6(ChunkGeneratorStructureState.java:246)
[10:37:04 WARN]:        at java.base/java.util.concurrent.CompletableFuture$AsyncSupply.run(CompletableFuture.java:1768)
[10:37:04 WARN]:        at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1144)
[10:37:04 WARN]:        at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:642)
[10:37:04 WARN]:        at java.base/java.lang.Thread.run(Thread.java:1589)
[10:37:04 INFO]: [P2] Area flags: [use;minecraft:tripwire,minecraft:lever,minecraft:trapped_chest,#doors,#trapdoors,#buttons,#pressure_plates,#fence_gates,minecraft:ender_chest,minecraft:anvil,minecraft:loom, pvp;true, vehicle-cap;6, vehicle-use;true]
[10:37:04 INFO]: [P2] Road flags: []

This causes the use: flag to not work: 2023-06-12_10 38 11

However if I run /p2 reload in console it reloads the file and doesn't print the error. It also fixes the issue:

p2 reload
[10:40:55 INFO]: [PlotSquared/PlotSquared] Loaded caption map for namespace 'plotsquared': com.plotsquared.core.configuration.caption.LocalizedCaptionMap
[10:40:55 INFO]: [P2] Area flags: [use;minecraft:tripwire,minecraft:lever,minecraft:trapped_chest,#doors,#trapdoors,#buttons,#pressure_plates,#fence_gates,minecraft:ender_chest,minecraft:anvil,minecraft:loom, pvp;true, vehicle-cap;6, vehicle-use;true]
[10:40:55 INFO]: [P2] Road flags: []
[10:40:55 INFO]: [PlotSquared/HybridPlotWorld] - road schematic: false
[10:40:55 INFO]: [PlotSquared/HybridPlotWorld] - Dumping settings for ClassicPlotWorld with name plotworld
[10:40:55 INFO]: [PlotSquared/HybridPlotWorld] -- road_schematic_enabled = false
[10:40:55 INFO]: [PlotSquared/HybridPlotWorld] -- plot_schematic = false
[10:40:55 INFO]: [PlotSquared/HybridPlotWorld] -- path_width_lower = 3
[10:40:55 INFO]: [PlotSquared/HybridPlotWorld] -- path_width_upper = 509
[10:40:55 INFO]: [PlotSquared/HybridPlotWorld] -- schem_y = 64
[10:40:55 INFO]: [PlotSquared/HybridPlotWorld] -- road_height = 64
[10:40:55 INFO]: [PlotSquared/HybridPlotWorld] -- plot_height = 64
[10:40:55 INFO]: [PlotSquared/HybridPlotWorld] -- wall_height = 64
[10:40:55 INFO]: [PlotSquared/HybridPlotWorld] -- main_block = dirt
[10:40:55 INFO]: [PlotSquared/HybridPlotWorld] -- top_block = grass_block
[10:40:55 INFO]: [PlotSquared/HybridPlotWorld] -- wall_block = smooth_stone_slab
[10:40:55 INFO]: [PlotSquared/HybridPlotWorld] -- claimed_wall_block = smooth_stone_slab
[10:40:55 INFO]: [PlotSquared/HybridPlotWorld] -- wall_filling = grass_block
[10:40:55 INFO]: [PlotSquared/HybridPlotWorld] -- road_block = quartz_block
[10:40:55 INFO]: [PlotSquared/HybridPlotWorld] -- plot_bedrock = true
[10:40:55 INFO]: [PlotSquared/HybridPlotWorld] -- place_top_block = true
[10:40:55 INFO]: [PlotSquared/HybridPlotWorld] -- plot_width = 505
[10:40:55 INFO]: [PlotSquared/HybridPlotWorld] -- road_width = 7
[10:40:55 INFO]: [PlotSquared/HybridPlotWorld] -- road_offset_x = 0
[10:40:55 INFO]: [PlotSquared/HybridPlotWorld] -- road_offset_z = 0
[10:40:55 INFO]: [PlotSquared/HybridPlotWorld] -- size = 512
[10:40:55 INFO]: [P2] Translations and world settings have been reloaded successfully.

In game the flag is now applied: 2023-06-12_10 41 46

I basically need to reload the configuration file after startup every time I want my use flags to work which is not ideal

To Reproduce

  1. In worlds.yml use this flag with these values:

flags: use: minecraft:tripwire,minecraft:lever,minecraft:trapped_chest,#doors,#trapdoors,#buttons,#pressure_plates,#fence_gates,minecraft:ender_chest,minecraft:anvil,minecraft:loom

Expected behaviour

The flag should be applied and should not give an error on startup

Screenshots / Videos

No response

Error log (if applicable)

No response

Plot Debugpaste

https://athion.net/ISPaster/paste/view/cd0d98f009a749e482184100c8054c81

PlotSquared Version

PlotSquared version 7.0.0-SNAPSHOT

Checklist

Anything else?

No response

NotMyFault commented 1 year ago

My setup: https://athion.net/ISPaster/paste/view/2386400a0dcc4b5d9ee49867cb1c6e73

My Paper version is slightly newer, but I don't run into that at all 👀

SecretlyJealous commented 1 year ago

I'll try to isolate the issue, using the same flags causes no errors on startup with PlotSquared v6: https://athion.net/ISPaster/paste/view/6c38eca4b22f4314a75795fa26670bad

But with PlotSquared v7 I'm using the same flags and it causes the error: https://athion.net/ISPaster/paste/view/35513083dbc840a58b7a2b2842e02e58

NotMyFault commented 1 year ago

Thanks for the pointer, I'll take an additional look

JasonHorkles commented 1 year ago

I've also got the issue on my server if this helps https://athion.net/ISPaster/paste/view/68c511bea1cd4d3cb4861a75b5b08731

RappyTV commented 1 year ago

same here but with #signs using commit 1ddc19f

dordsor21 commented 1 year ago

Caused by having the plot world as the default world in server.properties consequently having the world load before worldedit has loaded registries (as WE waits for the world loading 💯)