Commit 408fa907 authored by Melledy's avatar Melledy
Browse files

Move config java files to their own package

parent 55541fa1
......@@ -22,9 +22,9 @@ import emu.grasscutter.server.packet.send.*;
import emu.grasscutter.utils.Position;
import org.jetbrains.annotations.NotNull;
import java.util.*;
import static emu.grasscutter.config.Configuration.GAME_OPTIONS;
import static emu.grasscutter.Configuration.GAME_OPTIONS;
import java.util.*;
public class StaminaManager extends BasePlayerManager {
......
......@@ -76,6 +76,8 @@ import it.unimi.dsi.fastutil.ints.Int2ObjectMap;
import it.unimi.dsi.fastutil.ints.Int2ObjectOpenHashMap;
import lombok.Getter;
import static emu.grasscutter.config.Configuration.*;
import java.time.DayOfWeek;
import java.time.Instant;
import java.time.LocalDate;
......@@ -83,8 +85,6 @@ import java.time.ZoneId;
import java.util.*;
import java.util.concurrent.LinkedBlockingQueue;
import static emu.grasscutter.Configuration.*;
@Entity(value = "players", useDiscriminator = false)
public class Player {
@Id private int id;
......
package emu.grasscutter.game.player;
import static emu.grasscutter.config.Configuration.*;
import java.util.ArrayList;
import java.util.List;
import dev.morphia.annotations.Entity;
import emu.grasscutter.game.avatar.Avatar;
import static emu.grasscutter.Configuration.*;
@Entity
public class TeamInfo {
private String name;
......
package emu.grasscutter.game.player;
import static emu.grasscutter.config.Configuration.*;
import java.util.*;
import dev.morphia.annotations.Entity;
......@@ -38,8 +40,6 @@ import it.unimi.dsi.fastutil.ints.Int2ObjectOpenHashMap;
import it.unimi.dsi.fastutil.ints.IntOpenHashSet;
import it.unimi.dsi.fastutil.ints.IntSet;
import static emu.grasscutter.Configuration.*;
@Entity
public class TeamManager extends BasePlayerDataManager {
@Transient private Player player;
......
......@@ -12,6 +12,8 @@ import emu.grasscutter.utils.Utils;
import it.unimi.dsi.fastutil.ints.Int2ObjectMap;
import it.unimi.dsi.fastutil.ints.Int2ObjectOpenHashMap;
import static emu.grasscutter.config.Configuration.*;
import java.io.FileReader;
import java.io.InputStreamReader;
import java.io.Reader;
......@@ -20,8 +22,6 @@ import java.util.Collection;
import java.util.Iterator;
import java.util.List;
import static emu.grasscutter.Configuration.*;
public class ShopSystem extends BaseGameSystem {
private final Int2ObjectMap<List<ShopInfo>> shopData;
private final List<ShopChestTable> shopChestData;
......
......@@ -7,14 +7,14 @@ import emu.grasscutter.data.excels.TowerScheduleData;
import emu.grasscutter.server.game.BaseGameSystem;
import emu.grasscutter.server.game.GameServer;
import static emu.grasscutter.config.Configuration.*;
import java.io.FileReader;
import java.io.InputStreamReader;
import java.io.Reader;
import java.util.ArrayList;
import java.util.List;
import static emu.grasscutter.Configuration.*;
public class TowerSystem extends BaseGameSystem {
public TowerSystem(GameServer server) {
......
......@@ -6,12 +6,12 @@ import emu.grasscutter.server.game.GameServer;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import static emu.grasscutter.config.Configuration.*;
import java.io.File;
import java.io.InputStream;
import java.net.URLClassLoader;
import static emu.grasscutter.Configuration.*;
/**
* The base class for all plugins to extend.
*/
......
......@@ -6,14 +6,15 @@ import emu.grasscutter.utils.Utils;
import lombok.*;
import javax.annotation.Nullable;
import static emu.grasscutter.config.Configuration.PLUGIN;
import java.io.*;
import java.lang.reflect.Method;
import java.net.*;
import java.util.*;
import java.util.jar.*;
import static emu.grasscutter.Configuration.PLUGIN;
/**
* Manages the server's plugins and the event system.
*/
......
......@@ -13,11 +13,12 @@ import lombok.ToString;
import javax.script.Bindings;
import javax.script.CompiledScript;
import javax.script.ScriptException;
import static emu.grasscutter.config.Configuration.SCRIPT;
import java.util.Map;
import java.util.stream.Collectors;
import static emu.grasscutter.Configuration.SCRIPT;
@ToString
@Setter
public class SceneBlock {
......
......@@ -10,13 +10,14 @@ import org.luaj.vm2.LuaValue;
import javax.script.Bindings;
import javax.script.CompiledScript;
import javax.script.ScriptException;
import static emu.grasscutter.config.Configuration.SCRIPT;
import java.util.List;
import java.util.Map;
import java.util.Optional;
import java.util.stream.Collectors;
import static emu.grasscutter.Configuration.SCRIPT;
@ToString
@Setter
public class SceneGroup {
......
......@@ -11,12 +11,13 @@ import lombok.ToString;
import javax.script.Bindings;
import javax.script.CompiledScript;
import javax.script.ScriptException;
import static emu.grasscutter.config.Configuration.SCRIPT;
import java.util.List;
import java.util.Map;
import java.util.stream.Collectors;
import static emu.grasscutter.Configuration.SCRIPT;
@ToString
@Setter
public class SceneMeta {
......
......@@ -44,8 +44,8 @@ import java.time.OffsetDateTime;
import java.util.*;
import java.util.concurrent.ConcurrentHashMap;
import static emu.grasscutter.config.Configuration.*;
import static emu.grasscutter.utils.Language.translate;
import static emu.grasscutter.Configuration.*;
@Getter
public final class GameServer extends KcpServer {
......
package emu.grasscutter.server.game;
import static emu.grasscutter.config.Configuration.*;
import java.util.Set;
import emu.grasscutter.server.event.game.ReceivePacketEvent;
......@@ -14,8 +16,6 @@ import emu.grasscutter.server.game.GameSession.SessionState;
import it.unimi.dsi.fastutil.ints.Int2ObjectMap;
import it.unimi.dsi.fastutil.ints.Int2ObjectOpenHashMap;
import static emu.grasscutter.Configuration.*;
@SuppressWarnings("unchecked")
public class GameServerPacketHandler {
private final Int2ObjectMap<PacketHandler> handlers;
......
......@@ -17,8 +17,8 @@ import emu.grasscutter.utils.Utils;
import io.netty.buffer.ByteBuf;
import io.netty.buffer.Unpooled;
import static emu.grasscutter.config.Configuration.*;
import static emu.grasscutter.utils.Language.translate;
import static emu.grasscutter.Configuration.*;
public class GameSession implements GameSessionManager.KcpChannel {
private final GameServer server;
......
......@@ -13,7 +13,7 @@ import org.eclipse.jetty.util.ssl.SslContextFactory;
import java.io.File;
import java.io.UnsupportedEncodingException;
import static emu.grasscutter.Configuration.*;
import static emu.grasscutter.config.Configuration.*;
import static emu.grasscutter.utils.Language.translate;
/**
......
......@@ -29,8 +29,7 @@ import java.util.*;
import java.util.concurrent.ConcurrentHashMap;
import java.security.Signature;
import static emu.grasscutter.Configuration.*;
import static emu.grasscutter.config.Configuration.*;
import static emu.grasscutter.net.proto.QueryRegionListHttpRspOuterClass.QueryRegionListHttpRsp;
/**
......
package emu.grasscutter.server.http.documentation;
import static emu.grasscutter.Configuration.RESOURCE;
import com.google.gson.reflect.TypeToken;
import emu.grasscutter.Grasscutter;
import emu.grasscutter.data.GameData;
import emu.grasscutter.data.excels.AvatarData;
import emu.grasscutter.data.excels.ItemData;
import emu.grasscutter.utils.Utils;
import static emu.grasscutter.Configuration.DOCUMENT_LANGUAGE;
import express.http.Request;
import express.http.Response;
import static emu.grasscutter.config.Configuration.DOCUMENT_LANGUAGE;
import static emu.grasscutter.config.Configuration.RESOURCE;
import java.io.FileInputStream;
import java.io.IOException;
import java.io.InputStreamReader;
......
package emu.grasscutter.server.http.documentation;
import static emu.grasscutter.Configuration.*;
import static emu.grasscutter.config.Configuration.*;
import static emu.grasscutter.utils.Language.translate;
import com.google.gson.reflect.TypeToken;
......
package emu.grasscutter.server.http.documentation;
import static emu.grasscutter.Configuration.DATA;
import static emu.grasscutter.config.Configuration.DATA;
import static emu.grasscutter.utils.Language.translate;
import emu.grasscutter.Grasscutter;
......
......@@ -12,6 +12,8 @@ import express.http.Request;
import express.http.Response;
import io.javalin.Javalin;
import static emu.grasscutter.config.Configuration.*;
import java.io.File;
import java.io.FileInputStream;
import java.io.IOException;
......@@ -19,8 +21,6 @@ import java.io.InputStream;
import java.nio.charset.StandardCharsets;
import java.util.Objects;
import static emu.grasscutter.Configuration.*;
/**
* Handles requests related to the announcements page.
*/
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment