mattysweeps / SurvivalGames

Survival Games Minigame Plugin for Sponge
MIT License
3 stars 6 forks source link

Add further documentation on how to /ssg load. It's not functioning correctly. #15

Open 233Neon opened 9 months ago

233Neon commented 9 months ago

The Wiki doesn't give an example on how to use '/ssg load world-name file-path.' I'm having trouble loading with the command.

I receive this error. (Which tells me nothing)

User [01:46:45] [pool-2-thread-4/INFO] [minecraft/DedicatedServer]: Loading: . [01:46:45] [pool-2-thread-5/INFO] [STDERR]: [io.github.m0pt0pmatt.survivalgames.command.executor.LoadConfigCommand:lambda$executeCommand$0:95]: org.spongepowered.api.data.persistence.InvalidDataException: Could not deserialize something correctly, likely due to bad type data.

    at org.spongepowered.api.data.persistence.AbstractDataBuilder.build(AbstractDataBuilder.java:89)
    at org.spongepowered.common.data.SpongeDataManager.lambda$deserialize$0(SpongeDataManager.java:188)
    at java.util.Optional.flatMap(Unknown Source)
    at org.spongepowered.common.data.SpongeDataManager.deserialize(SpongeDataManager.java:188)
    at org.spongepowered.common.config.DataSerializableTypeSerializer.deserialize(DataSerializableTypeSerializer.java:66)
    at org.spongepowered.common.config.DataSerializableTypeSerializer.deserialize(DataSerializableTypeSerializer.java:45)
    at ninja.leaping.configurate.objectmapping.serialize.AbstractListChildSerializer.deserialize(AbstractListChildSerializer.java:43)
    at ninja.leaping.configurate.objectmapping.ObjectMapper$FieldData.deserializeFrom(ObjectMapper.java:140)
    at ninja.leaping.configurate.objectmapping.ObjectMapper$BoundInstance.populate(ObjectMapper.java:201)
    at ninja.leaping.configurate.objectmapping.serialize.AnnotatedObjectSerializer.deserialize(AnnotatedObjectSerializer.java:34)
    at ninja.leaping.configurate.objectmapping.ObjectMapper$FieldData.deserializeFrom(ObjectMapper.java:140)
    at ninja.leaping.configurate.objectmapping.ObjectMapper$BoundInstance.populate(ObjectMapper.java:201)
    at io.github.m0pt0pmatt.survivalgames.command.executor.LoadConfigCommand.lambda$executeCommand$0(LoadConfigCommand.java:90)
    at io.github.m0pt0pmatt.survivalgames.thread.DotProgressable.run(DotProgressable.java:47)
    at java.util.concurrent.CompletableFuture$AsyncRun.run(Unknown Source)
    at org.spongepowered.api.scheduler.Task$Builder.lambda$execute$0(Task.java:139)
    at org.spongepowered.common.scheduler.SchedulerBase.lambda$startTask$0(SchedulerBase.java:197)
    at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source)
    at java.util.concurrent.FutureTask.run(Unknown Source)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
    at java.lang.Thread.run(Unknown Source)

[01:46:45] [pool-2-thread-5/INFO] [STDERR]: [java.lang.Throwable:printStackTrace:-1]: Caused by: java.util.NoSuchElementException: No value present [01:46:45] [pool-2-thread-5/INFO] [STDERR]: [java.lang.Throwable:printStackTrace:-1]: at java.util.Optional.get(Unknown Source) [01:46:45] [pool-2-thread-5/INFO] [STDERR]: [java.lang.Throwable:printStackTrace:-1]: at org.spongepowered.common.data.builder.item.SpongeItemStackSnapshotBuilder.buildContent(SpongeItemStackSnapshotBuilder.java:61) [01:46:45] [pool-2-thread-5/INFO] [STDERR]: [java.lang.Throwable:printStackTrace:-1]: at org.spongepowered.api.data.persistence.AbstractDataBuilder.build(AbstractDataBuilder.java:87) [01:46:45] [pool-2-thread-5/INFO] [STDERR]: [java.lang.Throwable:printStackTrace:-1]: ... 21 more [01:46:46] [pool-2-thread-4/INFO] [minecraft/DedicatedServer]: Loading: .. [01:46:46] [pool-2-thread-4/INFO] [minecraft/DedicatedServer]: Error running command. Check the server logs for more details [01:46:46] [pool-2-thread-4/INFO] [STDERR]: [java.util.Optional:ifPresent:-1]: java.util.concurrent.CompletionException: java.lang.RuntimeException: org.spongepowered.api.command.CommandException: An error occurred when loading [01:46:46] [pool-2-thread-4/INFO] [STDERR]: [java.util.Optional:ifPresent:-1]: at java.util.concurrent.CompletableFuture.encodeThrowable(Unknown Source) [01:46:46] [pool-2-thread-4/INFO] [STDERR]: [java.util.Optional:ifPresent:-1]: at java.util.concurrent.CompletableFuture.completeThrowable(Unknown Source) [01:46:46] [pool-2-thread-4/INFO] [STDERR]: [java.util.Optional:ifPresent:-1]: at java.util.concurrent.CompletableFuture$AsyncRun.run(Unknown Source) [01:46:46] [pool-2-thread-4/INFO] [STDERR]: [java.util.Optional:ifPresent:-1]: at org.spongepowered.api.scheduler.Task$Builder.lambda$execute$0(Task.java:139) [01:46:46] [pool-2-thread-4/INFO] [STDERR]: [java.util.Optional:ifPresent:-1]: at org.spongepowered.common.scheduler.SchedulerBase.lambda$startTask$0(SchedulerBase.java:197) [01:46:46] [pool-2-thread-4/INFO] [STDERR]: [java.util.Optional:ifPresent:-1]: at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source) [01:46:46] [pool-2-thread-4/INFO] [STDERR]: [java.util.Optional:ifPresent:-1]: at java.util.concurrent.FutureTask.run(Unknown Source) [01:46:46] [pool-2-thread-4/INFO] [STDERR]: [java.util.Optional:ifPresent:-1]: at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source) [01:46:46] [pool-2-thread-4/INFO] [STDERR]: [java.util.Optional:ifPresent:-1]: at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) [01:46:46] [pool-2-thread-4/INFO] [STDERR]: [java.util.Optional:ifPresent:-1]: at java.lang.Thread.run(Unknown Source) [01:46:46] [pool-2-thread-4/INFO] [STDERR]: [java.lang.Throwable:printStackTrace:-1]: Caused by: java.lang.RuntimeException: org.spongepowered.api.command.CommandException: An error occurred when loading [01:46:46] [pool-2-thread-4/INFO] [STDERR]: [java.lang.Throwable:printStackTrace:-1]: at io.github.m0pt0pmatt.survivalgames.command.executor.LoadConfigCommand.lambda$executeCommand$0(LoadConfigCommand.java:101) [01:46:46] [pool-2-thread-4/INFO] [STDERR]: [java.lang.Throwable:printStackTrace:-1]: at io.github.m0pt0pmatt.survivalgames.thread.DotProgressable.run(DotProgressable.java:47) [01:46:46] [pool-2-thread-4/INFO] [STDERR]: [java.lang.Throwable:printStackTrace:-1]: ... 8 more [01:46:46] [pool-2-thread-4/INFO] [STDERR]: [java.lang.Throwable:printStackTrace:-1]: Caused by: org.spongepowered.api.command.CommandException: An error occurred when loading [01:46:46] [pool-2-thread-4/INFO] [STDERR]: [java.lang.Throwable:printStackTrace:-1]: at io.github.m0pt0pmatt.survivalgames.command.executor.LoadConfigCommand.lambda$executeCommand$0(LoadConfigCommand.java:96)

mattysweeps commented 9 months ago

@233Neon can you attach your config file? Also, which version of Sponge are you using? It's been a while since this plugin was updated, so maybe something changed in Sponge which is causing issues.

mattysweeps commented 9 months ago

@233Neon per our debug session we determined that this error was due to an item in your ItemConfig, but we were unable to determine which item. If you find out, please let me know.

This was the line in Sponge which triggered the exception:

final ItemType itemType = SpongeImpl.getRegistry().getType(ItemType.class, itemString).get();

I'm guessing this might mean Sponge doesn't know about the ItemType you're trying to load. Maybe this means your config was using Items from a mod which wasn't loaded at the time?