Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
G
Grasscutter
Manage
Activity
Members
Labels
Plan
Issues
0
Issue boards
Milestones
Wiki
Code
Merge requests
0
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
ziqian zhang
Grasscutter
Commits
a5579368
Commit
a5579368
authored
2 years ago
by
AnimeGitB
Browse files
Options
Downloads
Patches
Plain Diff
Lombokify Grasscutter.java some more
parent
ae51f4c0
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/main/java/emu/grasscutter/Grasscutter.java
+11
-69
11 additions, 69 deletions
src/main/java/emu/grasscutter/Grasscutter.java
with
11 additions
and
69 deletions
src/main/java/emu/grasscutter/Grasscutter.java
+
11
−
69
View file @
a5579368
...
...
@@ -48,27 +48,27 @@ import static emu.grasscutter.config.Configuration.SERVER;
import
static
emu
.
grasscutter
.
utils
.
Language
.
translate
;
public
final
class
Grasscutter
{
private
static
final
Logger
log
=
(
Logger
)
LoggerFactory
.
getLogger
(
Grasscutter
.
class
);
@Getter
private
static
final
Logger
log
ger
=
(
Logger
)
LoggerFactory
.
getLogger
(
Grasscutter
.
class
);
private
static
LineReader
consoleLineReader
=
null
;
private
static
Language
language
;
@Getter
@Setter
private
static
Language
language
;
public
static
final
File
configFile
=
new
File
(
"./config.json"
);
@Setter
private
static
ServerRunMode
runModeOverride
=
null
;
// Config override for run mode
private
static
int
day
;
// Current day of w
eek
.
@Getter
private
static
int
currentDayOfW
eek
;
@Getter
@Setter
private
static
String
preferredLanguage
;
private
static
HttpServer
httpServer
;
private
static
GameServer
gameServer
;
private
static
PluginManager
pluginManager
;
@Getter
private
static
HttpServer
httpServer
;
@Getter
private
static
GameServer
gameServer
;
@Getter
private
static
PluginManager
pluginManager
;
@Getter
private
static
CommandMap
commandMap
;
private
static
AuthenticationSystem
authenticationSystem
;
private
static
PermissionHandler
permissionHandler
;
@Getter
@Setter
private
static
AuthenticationSystem
authenticationSystem
;
@Getter
@Setter
private
static
PermissionHandler
permissionHandler
;
public
static
final
Reflections
reflector
=
new
Reflections
(
"emu.grasscutter"
);
public
static
ConfigContainer
config
;
@Getter
public
static
ConfigContainer
config
;
static
{
// Declare logback configuration.
...
...
@@ -230,18 +230,6 @@ public final class Grasscutter {
* Getters for the various server components.
*/
public
static
ConfigContainer
getConfig
()
{
return
config
;
}
public
static
Language
getLanguage
()
{
return
language
;
}
public
static
void
setLanguage
(
Language
language
)
{
Grasscutter
.
language
=
language
;
}
public
static
Language
getLanguage
(
String
langCode
)
{
return
Language
.
getLanguage
(
langCode
);
}
...
...
@@ -250,10 +238,6 @@ public final class Grasscutter {
return
Grasscutter
.
runModeOverride
!=
null
?
Grasscutter
.
runModeOverride
:
SERVER
.
runMode
;
}
public
static
Logger
getLogger
()
{
return
log
;
}
public
static
LineReader
getConsole
()
{
if
(
consoleLineReader
==
null
)
{
Terminal
terminal
=
null
;
...
...
@@ -274,38 +258,14 @@ public final class Grasscutter {
return
consoleLineReader
;
}
public
static
HttpServer
getHttpServer
()
{
return
httpServer
;
}
public
static
GameServer
getGameServer
()
{
return
gameServer
;
}
public
static
PluginManager
getPluginManager
()
{
return
pluginManager
;
}
public
static
AuthenticationSystem
getAuthenticationSystem
()
{
return
authenticationSystem
;
}
public
static
PermissionHandler
getPermissionHandler
()
{
return
permissionHandler
;
}
public
static
int
getCurrentDayOfWeek
()
{
return
day
;
}
/*
* Utility methods.
*/
public
static
void
updateDayOfWeek
()
{
Calendar
calendar
=
Calendar
.
getInstance
();
day
=
calendar
.
get
(
Calendar
.
DAY_OF_WEEK
);
Grasscutter
.
getLogger
().
debug
(
"Set day of week to "
+
day
);
Grasscutter
.
currentDayOfWeek
=
calendar
.
get
(
Calendar
.
DAY_OF_WEEK
);
Grasscutter
.
getLogger
().
debug
(
"Set day of week to "
+
currentDayOfWeek
);
}
public
static
void
startConsole
()
{
...
...
@@ -346,24 +306,6 @@ public final class Grasscutter {
}
}
/**
* Sets the authentication system for the server.
*
* @param authenticationSystem The authentication system to use.
*/
public
static
void
setAuthenticationSystem
(
AuthenticationSystem
authenticationSystem
)
{
Grasscutter
.
authenticationSystem
=
authenticationSystem
;
}
/**
* Sets the permission handler for the server.
*
* @param permissionHandler The permission handler to use.
*/
public
static
void
setPermissionHandler
(
PermissionHandler
permissionHandler
)
{
Grasscutter
.
permissionHandler
=
permissionHandler
;
}
/*
* Enums for the configuration.
*/
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment