mirror of
https://github.com/Melledy/Grasscutter.git
synced 2024-11-23 04:57:18 +00:00
Format code [skip actions]
This commit is contained in:
parent
7b097e879e
commit
5755aa4e6c
@ -1,5 +1,8 @@
|
|||||||
package emu.grasscutter;
|
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.Level;
|
||||||
import ch.qos.logback.classic.Logger;
|
import ch.qos.logback.classic.Logger;
|
||||||
import emu.grasscutter.auth.AuthenticationSystem;
|
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.server.http.handlers.LogHandler;
|
||||||
import emu.grasscutter.tools.Tools;
|
import emu.grasscutter.tools.Tools;
|
||||||
import emu.grasscutter.utils.*;
|
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.Getter;
|
||||||
import lombok.Setter;
|
import lombok.Setter;
|
||||||
import org.jline.reader.EndOfFileException;
|
import org.jline.reader.EndOfFileException;
|
||||||
@ -35,16 +44,6 @@ import org.jline.terminal.TerminalBuilder;
|
|||||||
import org.reflections.Reflections;
|
import org.reflections.Reflections;
|
||||||
import org.slf4j.LoggerFactory;
|
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 final class Grasscutter {
|
||||||
public static final File configFile = new File("./config.json");
|
public static final File configFile = new File("./config.json");
|
||||||
public static final Reflections reflector = new Reflections("emu.grasscutter");
|
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.plugin.api.ServerHelper;
|
||||||
import emu.grasscutter.server.game.GameServer;
|
import emu.grasscutter.server.game.GameServer;
|
||||||
import emu.grasscutter.utils.FileUtils;
|
import emu.grasscutter.utils.FileUtils;
|
||||||
import org.slf4j.Logger;
|
|
||||||
import org.slf4j.LoggerFactory;
|
|
||||||
|
|
||||||
import java.io.File;
|
import java.io.File;
|
||||||
import java.io.InputStream;
|
import java.io.InputStream;
|
||||||
import java.net.URLClassLoader;
|
import java.net.URLClassLoader;
|
||||||
|
import org.slf4j.Logger;
|
||||||
|
import org.slf4j.LoggerFactory;
|
||||||
|
|
||||||
/** The base class for all plugins to extend. */
|
/** The base class for all plugins to extend. */
|
||||||
public abstract class Plugin {
|
public abstract class Plugin {
|
||||||
|
@ -30,7 +30,9 @@ public interface PlayerHook {
|
|||||||
* @param sceneId The scene to send the player to.
|
* @param sceneId The scene to send the player to.
|
||||||
*/
|
*/
|
||||||
default void changeScenes(int sceneId) {
|
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) {
|
default void teleport(Position position) {
|
||||||
this.getPlayer().getPosition().set(position);
|
this.getPlayer().getPosition().set(position);
|
||||||
this.getPlayer().sendPacket(
|
this.getPlayer()
|
||||||
new PacketPlayerEnterSceneNotify(
|
.sendPacket(
|
||||||
this.getPlayer(),
|
new PacketPlayerEnterSceneNotify(
|
||||||
EnterType.ENTER_TYPE_JUMP,
|
this.getPlayer(),
|
||||||
EnterReason.TransPoint,
|
EnterType.ENTER_TYPE_JUMP,
|
||||||
this.getPlayer().getSceneId(),
|
EnterReason.TransPoint,
|
||||||
position));
|
this.getPlayer().getSceneId(),
|
||||||
|
position));
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
Loading…
Reference in New Issue
Block a user