Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

error using ready command #12

Open
llronaldoll opened this issue Apr 16, 2019 · 7 comments
Open

error using ready command #12

llronaldoll opened this issue Apr 16, 2019 · 7 comments

Comments

@llronaldoll
Copy link

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
Copy link
Owner

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
Copy link
Author

@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
Copy link
Owner

@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:

double itemCount = (chestMidpoint + ((RANDOM.nextDouble() * chestRange) * (RANDOM.nextDouble() > 0.5 ? 1 : -1)));

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

@llronaldoll
Copy link
Author

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

@mattysweeps
Copy link
Owner

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

@llronaldoll
Copy link
Author

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
Copy link
Author

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants