perhaps fix concurrent modification issues
This commit is contained in:
@@ -105,12 +105,14 @@ public class BaritoneAutoTest implements AbstractGameEventListener, Helper {
|
|||||||
// to our defined starting position
|
// to our defined starting position
|
||||||
if (server != null && server.getWorld(DimensionType.OVERWORLD) != null) {
|
if (server != null && server.getWorld(DimensionType.OVERWORLD) != null) {
|
||||||
if (mc.player == null) {
|
if (mc.player == null) {
|
||||||
server.getWorld(DimensionType.OVERWORLD).setSpawnPoint(STARTING_POSITION);
|
server.execute(() -> {
|
||||||
server.getCommandManager().handleCommand(server.getCommandSource(), "/difficulty peaceful");
|
server.getWorld(DimensionType.OVERWORLD).setSpawnPoint(STARTING_POSITION);
|
||||||
int result = server.getCommandManager().handleCommand(server.getCommandSource(), "/gamerule spawnRadius 0");
|
server.getCommandManager().handleCommand(server.getCommandSource(), "/difficulty peaceful");
|
||||||
if (result != 0) {
|
int result = server.getCommandManager().handleCommand(server.getCommandSource(), "/gamerule spawnRadius 0");
|
||||||
throw new IllegalStateException(result + "");
|
if (result != 0) {
|
||||||
}
|
throw new IllegalStateException(result + "");
|
||||||
|
}
|
||||||
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user