mirror of
https://github.com/Melledy/Grasscutter.git
synced 2024-11-26 14:17:58 +00:00
Format code [skip actions]
This commit is contained in:
parent
7b097e879e
commit
5755aa4e6c
@ -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");
|
||||
|
@ -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 {
|
||||
|
@ -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,
|
||||
|
Loading…
Reference in New Issue
Block a user