Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
ziqian zhang
Grasscutter
Commits
408fa907
Commit
408fa907
authored
Jul 20, 2022
by
Melledy
Browse files
Move config java files to their own package
parent
55541fa1
Changes
56
Show whitespace changes
Inline
Side-by-side
src/main/java/emu/grasscutter/game/managers/stamina/StaminaManager.java
View file @
408fa907
...
...
@@ -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
{
...
...
src/main/java/emu/grasscutter/game/player/Player.java
View file @
408fa907
...
...
@@ -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
;
...
...
src/main/java/emu/grasscutter/game/player/TeamInfo.java
View file @
408fa907
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
;
...
...
src/main/java/emu/grasscutter/game/player/TeamManager.java
View file @
408fa907
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
;
...
...
src/main/java/emu/grasscutter/game/shop/ShopSystem.java
View file @
408fa907
...
...
@@ -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
;
...
...
src/main/java/emu/grasscutter/game/tower/TowerSystem.java
View file @
408fa907
...
...
@@ -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
)
{
...
...
src/main/java/emu/grasscutter/plugin/Plugin.java
View file @
408fa907
...
...
@@ -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.
*/
...
...
src/main/java/emu/grasscutter/plugin/PluginManager.java
View file @
408fa907
...
...
@@ -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.
*/
...
...
src/main/java/emu/grasscutter/scripts/data/SceneBlock.java
View file @
408fa907
...
...
@@ -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
{
...
...
src/main/java/emu/grasscutter/scripts/data/SceneGroup.java
View file @
408fa907
...
...
@@ -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
{
...
...
src/main/java/emu/grasscutter/scripts/data/SceneMeta.java
View file @
408fa907
...
...
@@ -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
{
...
...
src/main/java/emu/grasscutter/server/game/GameServer.java
View file @
408fa907
...
...
@@ -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
{
...
...
src/main/java/emu/grasscutter/server/game/GameServerPacketHandler.java
View file @
408fa907
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
;
...
...
src/main/java/emu/grasscutter/server/game/GameSession.java
View file @
408fa907
...
...
@@ -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
;
...
...
src/main/java/emu/grasscutter/server/http/HttpServer.java
View file @
408fa907
...
...
@@ -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
;
/**
...
...
src/main/java/emu/grasscutter/server/http/dispatch/RegionHandler.java
View file @
408fa907
...
...
@@ -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
;
/**
...
...
src/main/java/emu/grasscutter/server/http/documentation/GachaMappingRequestHandler.java
View file @
408fa907
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
;
...
...
src/main/java/emu/grasscutter/server/http/documentation/HandbookRequestHandler.java
View file @
408fa907
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
;
...
...
src/main/java/emu/grasscutter/server/http/documentation/RootRequestHandler.java
View file @
408fa907
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
;
...
...
src/main/java/emu/grasscutter/server/http/handlers/AnnouncementsHandler.java
View file @
408fa907
...
...
@@ -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.
*/
...
...
Prev
1
2
3
Next
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment