mattysweeps / SurvivalGames

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

error using ready command #12

Open llronaldoll opened 5 years ago

llronaldoll commented 5 years ago

whenever I try the command ready, I get an error and this log!

[13:30:45] [pool-3-thread-34/INFO] [STDERR]: [java.util.Optional:ifPresent:-1]: java.util.concurrent.CompletionException: java.lang.RuntimeException: Error while switching states: World name is not set. [13:30:45] [pool-3-thread-34/INFO] [STDERR]: [java.util.Optional:ifPresent:-1]: at java.util.concurrent.CompletableFuture.encodeThrowable(Unknown Source) [13:30:45] [pool-3-thread-34/INFO] [STDERR]: [java.util.Optional:ifPresent:-1]: at java.util.concurrent.CompletableFuture.completeThrowable(Unknown Source) [13:30:45] [pool-3-thread-34/INFO] [STDERR]: [java.util.Optional:ifPresent:-1]: at java.util.concurrent.CompletableFuture$AsyncRun.run(Unknown Source) [13:30:45] [pool-3-thread-34/INFO] [STDERR]: [java.util.Optional:ifPresent:-1]: at org.spongepowered.api.scheduler.Task$Builder.lambda$execute$0(Task.java:139) [13:30:45] [pool-3-thread-34/INFO] [STDERR]: [java.util.Optional:ifPresent:-1]: at org.spongepowered.common.scheduler.SchedulerBase.lambda$startTask$0(SchedulerBase.java:192) [13:30:45] [pool-3-thread-34/INFO] [STDERR]: [java.util.Optional:ifPresent:-1]: at org.spongepowered.common.scheduler.SyncScheduler.executeTaskRunnable(SyncScheduler.java:74) [13:30:45] [pool-3-thread-34/INFO] [STDERR]: [java.util.Optional:ifPresent:-1]: at org.spongepowered.common.scheduler.SchedulerBase.startTask(SchedulerBase.java:183) [13:30:45] [pool-3-thread-34/INFO] [STDERR]: [java.util.Optional:ifPresent:-1]: at org.spongepowered.common.scheduler.SchedulerBase.processTask(SchedulerBase.java:169) [13:30:45] [pool-3-thread-34/INFO] [STDERR]: [java.util.Optional:ifPresent:-1]: at java.util.concurrent.ConcurrentHashMap$ValuesView.forEach(Unknown Source) [13:30:45] [pool-3-thread-34/INFO] [STDERR]: [java.util.Optional:ifPresent:-1]: at org.spongepowered.common.scheduler.SchedulerBase.runTick(SchedulerBase.java:112) [13:30:45] [pool-3-thread-34/INFO] [STDERR]: [java.util.Optional:ifPresent:-1]: at org.spongepowered.common.scheduler.SyncScheduler.tick(SyncScheduler.java:47) [13:30:45] [pool-3-thread-34/INFO] [STDERR]: [java.util.Optional:ifPresent:-1]: at org.spongepowered.common.scheduler.SpongeScheduler.tickSyncScheduler(SpongeScheduler.java:189) [13:30:45] [pool-3-thread-34/INFO] [STDERR]: [java.util.Optional:ifPresent:-1]: at org.spongepowered.mod.SpongeMod.onTick(SpongeMod.java:403) [13:30:45] [pool-3-thread-34/INFO] [STDERR]: [java.util.Optional:ifPresent:-1]: at net.minecraftforge.fml.common.eventhandler.ASMEventHandler_17_SpongeMod_onTick_ServerTickEvent.invoke(.dynamic) [13:30:45] [pool-3-thread-34/INFO] [STDERR]: [java.util.Optional:ifPresent:-1]: at net.minecraftforge.fml.common.eventhandler.ASMEventHandler.invoke(ASMEventHandler.java:90) [13:30:45] [pool-3-thread-34/INFO] [STDERR]: [java.util.Optional:ifPresent:-1]: at net.minecraftforge.fml.common.eventhandler.EventBus.post(EventBus.java:746) [13:30:45] [pool-3-thread-34/INFO] [STDERR]: [java.util.Optional:ifPresent:-1]: at net.minecraftforge.fml.common.eventhandler.EventBus.post(EventBus.java:696) [13:30:45] [pool-3-thread-34/INFO] [STDERR]: [java.util.Optional:ifPresent:-1]: at net.minecraftforge.fml.common.FMLCommonHandler.onPreServerTick(FMLCommonHandler.java:279) [13:30:45] [pool-3-thread-34/INFO] [STDERR]: [java.util.Optional:ifPresent:-1]: at net.minecraft.server.MinecraftServer.func_71217_p(MinecraftServer.java:657) [13:30:45] [pool-3-thread-34/INFO] [STDERR]: [java.util.Optional:ifPresent:-1]: at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:526) [13:30:45] [pool-3-thread-34/INFO] [STDERR]: [java.util.Optional:ifPresent:-1]: at java.lang.Thread.run(Unknown Source) [13:30:45] [pool-3-thread-34/INFO] [STDERR]: [java.lang.Throwable:printStackTrace:-1]: Caused by: java.lang.RuntimeException: Error while switching states: World name is not set. [13:30:45] [pool-3-thread-34/INFO] [STDERR]: [java.lang.Throwable:printStackTrace:-1]: at io.github.m0pt0pmatt.survivalgames.command.executor.state.AbstractStateCommand.lambda$executeCommand$1(AbstractStateCommand.java:100) [13:30:45] [pool-3-thread-34/INFO] [STDERR]: [java.lang.Throwable:printStackTrace:-1]: at io.github.m0pt0pmatt.survivalgames.thread.DotProgressable.run(DotProgressable.java:47) [13:30:45] [pool-3-thread-34/INFO] [STDERR]: [java.lang.Throwable:printStackTrace:-1]: ... 19 more [13:30:45] [pool-3-thread-34/INFO] [STDERR]: [java.lang.Throwable:printStackTrace:-1]: Caused by: java.lang.IllegalArgumentException: World name is not set. [13:30:45] [pool-3-thread-34/INFO] [STDERR]: [java.lang.Throwable:printStackTrace:-1]: at io.github.m0pt0pmatt.survivalgames.game.SurvivalGameStateManager.lambda$checkConfig$0(SurvivalGameStateManager.java:140) [13:30:45] [pool-3-thread-34/INFO] [STDERR]: [java.lang.Throwable:printStackTrace:-1]: at java.util.Optional.orElseThrow(Unknown Source) [13:30:45] [pool-3-thread-34/INFO] [STDERR]: [java.lang.Throwable:printStackTrace:-1]: at io.github.m0pt0pmatt.survivalgames.game.SurvivalGameStateManager.checkConfig(SurvivalGameStateManager.java:140) [13:30:45] [pool-3-thread-34/INFO] [STDERR]: [java.lang.Throwable:printStackTrace:-1]: at io.github.m0pt0pmatt.survivalgames.game.SurvivalGameStateManager.ready(SurvivalGameStateManager.java:84) [13:30:45] [pool-3-thread-34/INFO] [STDERR]: [java.lang.Throwable:printStackTrace:-1]: at io.github.m0pt0pmatt.survivalgames.command.executor.state.ReadySurvivalGameCommand.doWork(ReadySurvivalGameCommand.java:48) [13:30:45] [pool-3-thread-34/INFO] [STDERR]: [java.lang.Throwable:printStackTrace:-1]: at io.github.m0pt0pmatt.survivalgames.command.executor.state.AbstractStateCommand.lambda$executeCommand$1(AbstractStateCommand.java:98) [13:30:45] [pool-3-thread-34/INFO] [STDERR]: [java.lang.Throwable:printStackTrace:-1]: ... 20 more

mattysweeps commented 5 years ago

At the top of this error I see Error while switching states: World name is not set.

Each game requires the name of the world where the game will take place. You should be able to set this with the /ssg set world-name command.

Let me know if that fixes your error.

llronaldoll commented 5 years ago

@mattysweeps this corrected the error and made me better understand the configuration, can you tell me what midpoint does? this is difficult to enter the creation because there is a tutorial, thank you.

mattysweeps commented 5 years ago

@llronaldoll you're correct in that this plugin needs a tutorial.

chestMidpoint and chestRange are used to determine the number of items given to each chest.

For each chest, the number of items is computed as a number on a scale, where chestMidpoint is the center of that scale and chestRange is the "radius" of the scale.

You can see how they are used in the code: https://github.com/mattysweeps/SurvivalGames/blob/d975378f827e9be48341eecf16c0b5826236abc8/src/main/java/io/github/m0pt0pmatt/survivalgames/task/FillChestsTask.java#L65

So for example, if midpoint is 5 and range is 3, each test will have 2 - 8 items. (5 +/- 3)

llronaldoll commented 5 years ago

after the game is created what is the procedure to start the game?

mattysweeps commented 5 years ago

Try something like: /ssg ready [game] /ssg add [game] [player] or /ssg join [game] /ssg start [game]

llronaldoll commented 5 years ago

Is not there some way to automate this? so that players do not need to do these steps? something like using / ssg join and the game starts automatically when the minimum amount of player is completed?

llronaldoll commented 5 years ago

another thing, there is a conflict with Easy Scoreboards where the score of the game is not appearing, it blinks once and disappears!