Format code [skip actions]

This commit is contained in:
github-actions 2023-05-13 04:59:12 +00:00
parent 7b097e879e
commit 5755aa4e6c
3 changed files with 22 additions and 21 deletions

View File

@ -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");

View File

@ -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 {

View File

@ -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,7 +80,8 @@ public interface PlayerHook {
*/
default void teleport(Position position) {
this.getPlayer().getPosition().set(position);
this.getPlayer().sendPacket(
this.getPlayer()
.sendPacket(
new PacketPlayerEnterSceneNotify(
this.getPlayer(),
EnterType.ENTER_TYPE_JUMP,