diff --git a/src/main/java/emu/grasscutter/Grasscutter.java b/src/main/java/emu/grasscutter/Grasscutter.java index dc1899d26..fbba334b4 100644 --- a/src/main/java/emu/grasscutter/Grasscutter.java +++ b/src/main/java/emu/grasscutter/Grasscutter.java @@ -1,5 +1,8 @@ package emu.grasscutter; +import static emu.grasscutter.config.Configuration.SERVER; +import static emu.grasscutter.utils.Language.translate; + import ch.qos.logback.classic.Level; import ch.qos.logback.classic.Logger; import emu.grasscutter.auth.AuthenticationSystem; @@ -24,6 +27,12 @@ import emu.grasscutter.server.http.handlers.GenericHandler; import emu.grasscutter.server.http.handlers.LogHandler; import emu.grasscutter.tools.Tools; import emu.grasscutter.utils.*; +import java.io.File; +import java.io.FileWriter; +import java.io.IOError; +import java.io.IOException; +import java.util.Calendar; +import javax.annotation.Nullable; import lombok.Getter; import lombok.Setter; import org.jline.reader.EndOfFileException; @@ -35,16 +44,6 @@ import org.jline.terminal.TerminalBuilder; import org.reflections.Reflections; import org.slf4j.LoggerFactory; -import javax.annotation.Nullable; -import java.io.File; -import java.io.FileWriter; -import java.io.IOError; -import java.io.IOException; -import java.util.Calendar; - -import static emu.grasscutter.config.Configuration.SERVER; -import static emu.grasscutter.utils.Language.translate; - public final class Grasscutter { public static final File configFile = new File("./config.json"); public static final Reflections reflector = new Reflections("emu.grasscutter"); diff --git a/src/main/java/emu/grasscutter/plugin/Plugin.java b/src/main/java/emu/grasscutter/plugin/Plugin.java index d55e23fe6..e8a1fe053 100644 --- a/src/main/java/emu/grasscutter/plugin/Plugin.java +++ b/src/main/java/emu/grasscutter/plugin/Plugin.java @@ -4,12 +4,11 @@ import emu.grasscutter.Grasscutter; import emu.grasscutter.plugin.api.ServerHelper; import emu.grasscutter.server.game.GameServer; import emu.grasscutter.utils.FileUtils; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - import java.io.File; import java.io.InputStream; import java.net.URLClassLoader; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; /** The base class for all plugins to extend. */ public abstract class Plugin { diff --git a/src/main/java/emu/grasscutter/plugin/api/PlayerHook.java b/src/main/java/emu/grasscutter/plugin/api/PlayerHook.java index 5ee8e64a7..0211c820d 100644 --- a/src/main/java/emu/grasscutter/plugin/api/PlayerHook.java +++ b/src/main/java/emu/grasscutter/plugin/api/PlayerHook.java @@ -30,7 +30,9 @@ public interface PlayerHook { * @param sceneId The scene to send the player to. */ default void changeScenes(int sceneId) { - this.getPlayer().getWorld().transferPlayerToScene(this.getPlayer(), sceneId, this.getPlayer().getPosition()); + this.getPlayer() + .getWorld() + .transferPlayerToScene(this.getPlayer(), sceneId, this.getPlayer().getPosition()); } /** @@ -78,13 +80,14 @@ public interface PlayerHook { */ default void teleport(Position position) { this.getPlayer().getPosition().set(position); - this.getPlayer().sendPacket( - new PacketPlayerEnterSceneNotify( - this.getPlayer(), - EnterType.ENTER_TYPE_JUMP, - EnterReason.TransPoint, - this.getPlayer().getSceneId(), - position)); + this.getPlayer() + .sendPacket( + new PacketPlayerEnterSceneNotify( + this.getPlayer(), + EnterType.ENTER_TYPE_JUMP, + EnterReason.TransPoint, + this.getPlayer().getSceneId(), + position)); } /**