From 8c0032fc7567ff1563792e5fdaa40c84ccc88619 Mon Sep 17 00:00:00 2001 From: KingRainbow44 Date: Sun, 27 Aug 2023 23:36:41 -0400 Subject: [PATCH] Run formatter on new events --- .../emu/grasscutter/game/achievement/Achievements.java | 7 +++---- .../emu/grasscutter/game/dungeons/DungeonManager.java | 10 +++------- .../java/emu/grasscutter/game/quest/GameQuest.java | 5 ++--- .../emu/grasscutter/game/systems/InventorySystem.java | 3 +-- .../server/event/player/PlayerFinishDungeonEvent.java | 3 +-- 5 files changed, 10 insertions(+), 18 deletions(-) diff --git a/src/main/java/emu/grasscutter/game/achievement/Achievements.java b/src/main/java/emu/grasscutter/game/achievement/Achievements.java index 77db3627a..929c382cb 100644 --- a/src/main/java/emu/grasscutter/game/achievement/Achievements.java +++ b/src/main/java/emu/grasscutter/game/achievement/Achievements.java @@ -12,13 +12,12 @@ import emu.grasscutter.game.props.ActionReason; import emu.grasscutter.net.proto.AchievementOuterClass.Achievement.Status; import emu.grasscutter.server.event.player.PlayerCompleteAchievementEvent; import emu.grasscutter.server.packet.send.*; -import lombok.*; -import org.bson.types.ObjectId; - -import javax.annotation.Nullable; import java.util.*; import java.util.concurrent.atomic.AtomicInteger; import java.util.function.IntSupplier; +import javax.annotation.Nullable; +import lombok.*; +import org.bson.types.ObjectId; @Entity("achievements") @Data diff --git a/src/main/java/emu/grasscutter/game/dungeons/DungeonManager.java b/src/main/java/emu/grasscutter/game/dungeons/DungeonManager.java index f742a2cbd..714ceb9b2 100644 --- a/src/main/java/emu/grasscutter/game/dungeons/DungeonManager.java +++ b/src/main/java/emu/grasscutter/game/dungeons/DungeonManager.java @@ -18,11 +18,10 @@ import emu.grasscutter.server.event.player.PlayerFinishDungeonEvent; import emu.grasscutter.server.packet.send.*; import emu.grasscutter.utils.Utils; import it.unimi.dsi.fastutil.ints.*; -import lombok.*; - -import javax.annotation.Nullable; import java.util.*; import java.util.stream.*; +import javax.annotation.Nullable; +import lombok.*; /** * TODO handle time limits TODO handle respawn points TODO handle team wipes and respawns TODO check @@ -282,10 +281,7 @@ public final class DungeonManager { this.endDungeon(BaseDungeonResult.DungeonEndReason.COMPLETED); // Call PlayerFinishDungeonEvent. - new PlayerFinishDungeonEvent( - this.getScene().getPlayers(), - this.getScene(), this - ).call(); + new PlayerFinishDungeonEvent(this.getScene().getPlayers(), this.getScene(), this).call(); } public void quitDungeon() { diff --git a/src/main/java/emu/grasscutter/game/quest/GameQuest.java b/src/main/java/emu/grasscutter/game/quest/GameQuest.java index 2cf59fd2e..c62b3c0ef 100644 --- a/src/main/java/emu/grasscutter/game/quest/GameQuest.java +++ b/src/main/java/emu/grasscutter/game/quest/GameQuest.java @@ -16,10 +16,9 @@ import emu.grasscutter.server.event.player.PlayerCompleteQuestEvent; import emu.grasscutter.server.packet.send.*; import emu.grasscutter.utils.Utils; import it.unimi.dsi.fastutil.ints.IntIntImmutablePair; -import lombok.*; - -import javax.script.Bindings; import java.util.*; +import javax.script.Bindings; +import lombok.*; @Entity public class GameQuest { diff --git a/src/main/java/emu/grasscutter/game/systems/InventorySystem.java b/src/main/java/emu/grasscutter/game/systems/InventorySystem.java index 04f990d82..3072eebab 100644 --- a/src/main/java/emu/grasscutter/game/systems/InventorySystem.java +++ b/src/main/java/emu/grasscutter/game/systems/InventorySystem.java @@ -18,10 +18,9 @@ import emu.grasscutter.server.game.*; import emu.grasscutter.server.packet.send.*; import emu.grasscutter.utils.Utils; import it.unimi.dsi.fastutil.ints.*; -import lombok.val; - import java.util.*; import java.util.stream.Stream; +import lombok.val; public class InventorySystem extends BaseGameSystem { private static final Int2IntMap weaponRefundMaterials = new Int2IntArrayMap(); diff --git a/src/main/java/emu/grasscutter/server/event/player/PlayerFinishDungeonEvent.java b/src/main/java/emu/grasscutter/server/event/player/PlayerFinishDungeonEvent.java index afcb75daf..fc1063635 100644 --- a/src/main/java/emu/grasscutter/server/event/player/PlayerFinishDungeonEvent.java +++ b/src/main/java/emu/grasscutter/server/event/player/PlayerFinishDungeonEvent.java @@ -4,9 +4,8 @@ import emu.grasscutter.game.dungeons.DungeonManager; import emu.grasscutter.game.player.Player; import emu.grasscutter.game.world.Scene; import emu.grasscutter.server.event.Event; -import lombok.*; - import java.util.List; +import lombok.*; @Getter @RequiredArgsConstructor