From 8db1f597ce6006d310ad22c7c53960397a11247a Mon Sep 17 00:00:00 2001 From: github-actions <41898282+github-actions[bot]@users.noreply.github.com> Date: Sat, 2 Sep 2023 23:51:35 +0000 Subject: [PATCH] Format code [skip actions] --- .../grasscutter/game/activity/ActivityManager.java | 3 +-- .../java/emu/grasscutter/game/avatar/Avatar.java | 11 +++++------ .../emu/grasscutter/game/quest/GameMainQuest.java | 12 ++++++------ .../emu/grasscutter/game/quest/QuestManager.java | 11 +++++------ src/main/java/emu/grasscutter/game/world/World.java | 7 +++---- .../java/emu/grasscutter/plugin/PluginManager.java | 9 ++++----- .../server/http/dispatch/RegionHandler.java | 7 +++---- 7 files changed, 27 insertions(+), 33 deletions(-) diff --git a/src/main/java/emu/grasscutter/game/activity/ActivityManager.java b/src/main/java/emu/grasscutter/game/activity/ActivityManager.java index 233f1c587..fbfe1402d 100644 --- a/src/main/java/emu/grasscutter/game/activity/ActivityManager.java +++ b/src/main/java/emu/grasscutter/game/activity/ActivityManager.java @@ -8,10 +8,9 @@ import emu.grasscutter.game.player.*; import emu.grasscutter.game.props.*; import emu.grasscutter.net.proto.ActivityInfoOuterClass; import emu.grasscutter.server.packet.send.PacketActivityScheduleInfoNotify; -import lombok.Getter; - import java.util.*; import java.util.concurrent.*; +import lombok.Getter; @SuppressWarnings("unchecked") @Getter diff --git a/src/main/java/emu/grasscutter/game/avatar/Avatar.java b/src/main/java/emu/grasscutter/game/avatar/Avatar.java index 690f86275..be5774ed0 100644 --- a/src/main/java/emu/grasscutter/game/avatar/Avatar.java +++ b/src/main/java/emu/grasscutter/game/avatar/Avatar.java @@ -1,5 +1,7 @@ package emu.grasscutter.game.avatar; +import static emu.grasscutter.config.Configuration.GAME_OPTIONS; + import dev.morphia.annotations.*; import emu.grasscutter.GameConstants; import emu.grasscutter.data.GameData; @@ -30,14 +32,11 @@ import emu.grasscutter.net.proto.TrialAvatarInfoOuterClass.TrialAvatarInfo; import emu.grasscutter.server.packet.send.*; import emu.grasscutter.utils.helpers.ProtoHelper; import it.unimi.dsi.fastutil.ints.*; -import lombok.*; -import org.bson.types.ObjectId; - -import javax.annotation.*; import java.util.*; import java.util.stream.Stream; - -import static emu.grasscutter.config.Configuration.GAME_OPTIONS; +import javax.annotation.*; +import lombok.*; +import org.bson.types.ObjectId; @Entity(value = "avatars", useDiscriminator = false) public class Avatar { diff --git a/src/main/java/emu/grasscutter/game/quest/GameMainQuest.java b/src/main/java/emu/grasscutter/game/quest/GameMainQuest.java index 4ecf6de2c..06acd48e3 100644 --- a/src/main/java/emu/grasscutter/game/quest/GameMainQuest.java +++ b/src/main/java/emu/grasscutter/game/quest/GameMainQuest.java @@ -16,11 +16,10 @@ import emu.grasscutter.net.proto.ChildQuestOuterClass.ChildQuest; import emu.grasscutter.net.proto.ParentQuestOuterClass.ParentQuest; import emu.grasscutter.server.packet.send.*; import emu.grasscutter.utils.*; -import lombok.*; -import org.bson.types.ObjectId; - import java.util.*; import java.util.stream.Collectors; +import lombok.*; +import org.bson.types.ObjectId; @Entity(value = "quests", useDiscriminator = false) public class GameMainQuest { @@ -329,11 +328,12 @@ public class GameMainQuest { } /** - * Checks if the quest has a teleport position. Returns true if it does and adds the target position - * and rotation to the list. + * Checks if the quest has a teleport position. Returns true if it does and adds the target + * position and rotation to the list. * * @param subId The sub-quest ID. - * @param posAndRot A list which will contain the position and rotation if the quest has a teleport. + * @param posAndRot A list which will contain the position and rotation if the quest has a + * teleport. * @return True if the quest has a teleport position. False otherwise. */ public boolean hasTeleportPosition(int subId, List posAndRot) { diff --git a/src/main/java/emu/grasscutter/game/quest/QuestManager.java b/src/main/java/emu/grasscutter/game/quest/QuestManager.java index 1e33f2212..6611da1c7 100644 --- a/src/main/java/emu/grasscutter/game/quest/QuestManager.java +++ b/src/main/java/emu/grasscutter/game/quest/QuestManager.java @@ -1,5 +1,8 @@ package emu.grasscutter.game.quest; +import static emu.grasscutter.GameConstants.DEBUG; +import static emu.grasscutter.config.Configuration.*; + import emu.grasscutter.Grasscutter; import emu.grasscutter.data.GameData; import emu.grasscutter.data.binout.*; @@ -12,16 +15,12 @@ import emu.grasscutter.net.proto.GivingRecordOuterClass.GivingRecord; import emu.grasscutter.server.packet.send.*; import io.netty.util.concurrent.FastThreadLocalThread; import it.unimi.dsi.fastutil.ints.*; -import lombok.*; - -import javax.annotation.Nonnull; import java.util.*; import java.util.concurrent.*; import java.util.function.Consumer; import java.util.stream.Collectors; - -import static emu.grasscutter.GameConstants.DEBUG; -import static emu.grasscutter.config.Configuration.*; +import javax.annotation.Nonnull; +import lombok.*; public final class QuestManager extends BasePlayerManager { @Getter private final Player player; diff --git a/src/main/java/emu/grasscutter/game/world/World.java b/src/main/java/emu/grasscutter/game/world/World.java index 5e5b11798..3b9e01ed0 100644 --- a/src/main/java/emu/grasscutter/game/world/World.java +++ b/src/main/java/emu/grasscutter/game/world/World.java @@ -1,5 +1,7 @@ package emu.grasscutter.game.world; +import static emu.grasscutter.server.event.player.PlayerTeleportEvent.TeleportType.SCRIPT; + import emu.grasscutter.data.GameData; import emu.grasscutter.data.excels.dungeon.DungeonData; import emu.grasscutter.game.entity.*; @@ -18,13 +20,10 @@ import emu.grasscutter.server.game.GameServer; import emu.grasscutter.server.packet.send.*; import emu.grasscutter.utils.ConversionUtils; import it.unimi.dsi.fastutil.ints.*; +import java.util.*; import lombok.*; import org.jetbrains.annotations.NotNull; -import java.util.*; - -import static emu.grasscutter.server.event.player.PlayerTeleportEvent.TeleportType.SCRIPT; - public class World implements Iterable { @Getter private final GameServer server; @Getter private Player host; diff --git a/src/main/java/emu/grasscutter/plugin/PluginManager.java b/src/main/java/emu/grasscutter/plugin/PluginManager.java index 717bce10e..8ca612061 100644 --- a/src/main/java/emu/grasscutter/plugin/PluginManager.java +++ b/src/main/java/emu/grasscutter/plugin/PluginManager.java @@ -1,18 +1,17 @@ package emu.grasscutter.plugin; +import static emu.grasscutter.utils.lang.Language.translate; + import emu.grasscutter.Grasscutter; import emu.grasscutter.server.event.*; import emu.grasscutter.utils.*; -import lombok.*; - -import javax.annotation.Nullable; import java.io.*; import java.lang.reflect.Method; import java.net.*; import java.util.*; import java.util.jar.*; - -import static emu.grasscutter.utils.lang.Language.translate; +import javax.annotation.Nullable; +import lombok.*; /** Manages the server's plugins and the event system. */ public final class PluginManager { diff --git a/src/main/java/emu/grasscutter/server/http/dispatch/RegionHandler.java b/src/main/java/emu/grasscutter/server/http/dispatch/RegionHandler.java index 8cef49fec..37e30a6a3 100644 --- a/src/main/java/emu/grasscutter/server/http/dispatch/RegionHandler.java +++ b/src/main/java/emu/grasscutter/server/http/dispatch/RegionHandler.java @@ -1,5 +1,7 @@ package emu.grasscutter.server.http.dispatch; +import static emu.grasscutter.config.Configuration.*; + import com.google.gson.*; import com.google.protobuf.ByteString; import emu.grasscutter.*; @@ -16,14 +18,11 @@ import emu.grasscutter.server.http.objects.QueryCurRegionRspJson; import emu.grasscutter.utils.*; import io.javalin.Javalin; import io.javalin.http.Context; -import org.slf4j.Logger; - import java.time.Instant; import java.util.*; import java.util.concurrent.ConcurrentHashMap; import java.util.regex.Pattern; - -import static emu.grasscutter.config.Configuration.*; +import org.slf4j.Logger; /** Handles requests related to region queries. */ public final class RegionHandler implements Router {