From 2e6bfbb749894deab52fbf8ffed6cf8463eec7bc Mon Sep 17 00:00:00 2001 From: github-actions <41898282+github-actions[bot]@users.noreply.github.com> Date: Thu, 1 Jun 2023 02:46:57 +0000 Subject: [PATCH] Format code [skip actions] --- .../ability/actions/ActionAvatarSkillStart.java | 12 ++++++++---- .../game/player/PlayerProgressManager.java | 7 +++---- .../grasscutter/scripts/SceneScriptManager.java | 15 +++++++-------- 3 files changed, 18 insertions(+), 16 deletions(-) diff --git a/src/main/java/emu/grasscutter/game/ability/actions/ActionAvatarSkillStart.java b/src/main/java/emu/grasscutter/game/ability/actions/ActionAvatarSkillStart.java index 54f58650b..165a693a8 100644 --- a/src/main/java/emu/grasscutter/game/ability/actions/ActionAvatarSkillStart.java +++ b/src/main/java/emu/grasscutter/game/ability/actions/ActionAvatarSkillStart.java @@ -1,7 +1,6 @@ package emu.grasscutter.game.ability.actions; import com.google.protobuf.ByteString; - import emu.grasscutter.Grasscutter; import emu.grasscutter.data.binout.AbilityModifier.AbilityModifierAction; import emu.grasscutter.game.ability.Ability; @@ -12,12 +11,17 @@ import emu.grasscutter.game.quest.enums.QuestContent; @AbilityAction(AbilityModifierAction.Type.AvatarSkillStart) public class ActionAvatarSkillStart extends AbilityActionHandler { @Override - public boolean execute(Ability ability, AbilityModifierAction action, ByteString abilityData, GameEntity target) { + public boolean execute( + Ability ability, AbilityModifierAction action, ByteString abilityData, GameEntity target) { var owner = ability.getOwner(); if (owner instanceof EntityAvatar avatar) { - avatar.getPlayer().getQuestManager().queueEvent(QuestContent.QUEST_CONTENT_SKILL, action.skillID); + avatar + .getPlayer() + .getQuestManager() + .queueEvent(QuestContent.QUEST_CONTENT_SKILL, action.skillID); } else { - Grasscutter.getLogger().warn("AvatarSkillStart not implemented for other entities than EntityAvatar right now"); + Grasscutter.getLogger() + .warn("AvatarSkillStart not implemented for other entities than EntityAvatar right now"); return false; } diff --git a/src/main/java/emu/grasscutter/game/player/PlayerProgressManager.java b/src/main/java/emu/grasscutter/game/player/PlayerProgressManager.java index ddf8b62ed..82ed2372d 100644 --- a/src/main/java/emu/grasscutter/game/player/PlayerProgressManager.java +++ b/src/main/java/emu/grasscutter/game/player/PlayerProgressManager.java @@ -1,5 +1,8 @@ package emu.grasscutter.game.player; +import static emu.grasscutter.config.Configuration.GAME_OPTIONS; +import static emu.grasscutter.scripts.constants.EventType.EVENT_UNLOCK_TRANS_POINT; + import emu.grasscutter.data.GameData; import emu.grasscutter.data.binout.ScenePointEntry; import emu.grasscutter.data.excels.OpenStateData; @@ -9,13 +12,9 @@ import emu.grasscutter.game.quest.enums.*; import emu.grasscutter.net.proto.RetcodeOuterClass.Retcode; import emu.grasscutter.scripts.data.ScriptArgs; import emu.grasscutter.server.packet.send.*; - import java.util.Set; import java.util.stream.Collectors; -import static emu.grasscutter.config.Configuration.GAME_OPTIONS; -import static emu.grasscutter.scripts.constants.EventType.EVENT_UNLOCK_TRANS_POINT; - // @Entity public final class PlayerProgressManager extends BasePlayerDataManager { /****************************************************************************************************************** diff --git a/src/main/java/emu/grasscutter/scripts/SceneScriptManager.java b/src/main/java/emu/grasscutter/scripts/SceneScriptManager.java index cb2b03ea3..bd492d76f 100644 --- a/src/main/java/emu/grasscutter/scripts/SceneScriptManager.java +++ b/src/main/java/emu/grasscutter/scripts/SceneScriptManager.java @@ -1,5 +1,7 @@ package emu.grasscutter.scripts; +import static emu.grasscutter.scripts.constants.EventType.EVENT_TIMER_EVENT; + import com.github.davidmoten.rtreemulti.RTree; import com.github.davidmoten.rtreemulti.geometry.Geometry; import emu.grasscutter.Grasscutter; @@ -19,20 +21,17 @@ import emu.grasscutter.server.packet.send.PacketGroupSuiteNotify; import emu.grasscutter.utils.*; import io.netty.util.concurrent.FastThreadLocalThread; import it.unimi.dsi.fastutil.ints.*; -import kotlin.Pair; -import lombok.val; -import org.luaj.vm2.*; -import org.luaj.vm2.lib.jse.CoerceJavaToLua; - -import javax.annotation.*; import java.io.*; import java.nio.file.Files; import java.util.*; import java.util.concurrent.*; import java.util.concurrent.atomic.AtomicInteger; import java.util.stream.Collectors; - -import static emu.grasscutter.scripts.constants.EventType.EVENT_TIMER_EVENT; +import javax.annotation.*; +import kotlin.Pair; +import lombok.val; +import org.luaj.vm2.*; +import org.luaj.vm2.lib.jse.CoerceJavaToLua; public class SceneScriptManager { private final Scene scene;