2022-04-17 20:43:07 +08:00
package emu.grasscutter ;
2022-04-18 13:11:27 +08:00
public final class Config {
2022-04-21 13:53:50 +08:00
2022-04-17 20:43:07 +08:00
public String DatabaseUrl = " mongodb://localhost:27017 " ;
public String DatabaseCollection = " grasscutter " ;
2022-04-21 22:06:25 +08:00
2022-04-17 20:43:07 +08:00
public String RESOURCE_FOLDER = " ./resources/ " ;
public String DATA_FOLDER = " ./data/ " ;
public String PACKETS_FOLDER = " ./packets/ " ;
public String DUMPS_FOLDER = " ./dumps/ " ;
public String KEY_FOLDER = " ./keys/ " ;
2022-04-29 13:19:14 +08:00
public String SCRIPTS_FOLDER = " ./resources/Scripts/ " ;
2022-04-23 09:45:44 +08:00
public String PLUGINS_FOLDER = " ./plugins/ " ;
2022-04-20 16:05:53 +08:00
2022-04-21 18:04:00 +08:00
public String RunMode = " HYBRID " ; // HYBRID, DISPATCH_ONLY, GAME_ONLY
2022-04-21 13:53:50 +08:00
public GameServerOptions GameServer = new GameServerOptions ( ) ;
public DispatchServerOptions DispatchServer = new DispatchServerOptions ( ) ;
public GameServerOptions getGameServerOptions ( ) {
return GameServer ;
2022-04-17 20:43:07 +08:00
}
2022-04-21 13:53:50 +08:00
public DispatchServerOptions getDispatchOptions ( ) { return DispatchServer ; }
public static class DispatchServerOptions {
2022-04-22 01:04:03 +08:00
public String Ip = " 0.0.0.0 " ;
public String PublicIp = " 127.0.0.1 " ;
2022-04-21 13:53:50 +08:00
public int Port = 443 ;
2022-04-23 01:16:55 +08:00
public int PublicPort = 0 ;
2022-04-21 13:53:50 +08:00
public String KeystorePath = " ./keystore.p12 " ;
2022-04-23 12:55:31 +08:00
public String KeystorePassword = " 123456 " ;
2022-04-21 13:53:50 +08:00
public Boolean UseSSL = true ;
2022-04-22 21:25:58 +08:00
public Boolean FrontHTTPS = true ;
2022-04-21 13:53:50 +08:00
public boolean AutomaticallyCreateAccounts = false ;
2022-04-28 06:10:46 +08:00
public String [ ] defaultPermissions = new String [ ] { " " } ;
2022-04-21 18:04:00 +08:00
public RegionInfo [ ] GameServers = { } ;
public RegionInfo [ ] getGameServers ( ) {
return GameServers ;
}
public static class RegionInfo {
public String Name = " os_usa " ;
public String Title = " Test " ;
public String Ip = " 127.0.0.1 " ;
public int Port = 22102 ;
}
2022-04-17 20:43:07 +08:00
}
2022-04-21 13:53:50 +08:00
public static class GameServerOptions {
public String Name = " Test " ;
2022-04-22 01:04:03 +08:00
public String Ip = " 0.0.0.0 " ;
public String PublicIp = " 127.0.0.1 " ;
2022-04-21 13:53:50 +08:00
public int Port = 22102 ;
2022-04-23 01:42:04 +08:00
public int PublicPort = 0 ;
2022-04-21 13:53:50 +08:00
2022-04-21 18:04:00 +08:00
public String DispatchServerDatabaseUrl = " mongodb://localhost:27017 " ;
public String DispatchServerDatabaseCollection = " grasscutter " ;
2022-04-21 13:53:50 +08:00
public boolean LOG_PACKETS = false ;
2022-04-19 17:22:21 +08:00
public int InventoryLimitWeapon = 2000 ;
public int InventoryLimitRelic = 2000 ;
public int InventoryLimitMaterial = 2000 ;
public int InventoryLimitFurniture = 2000 ;
public int InventoryLimitAll = 30000 ;
public int MaxAvatarsInTeam = 4 ;
public int MaxAvatarsInTeamMultiplayer = 4 ;
2022-04-18 13:11:27 +08:00
public int MaxEntityLimit = 1000 ; // Max entity limit per world. // TODO: Enforce later.
2022-04-20 16:05:53 +08:00
public boolean WatchGacha = false ;
2022-04-29 19:37:51 +08:00
public String ServerNickname = " Server " ;
2022-04-29 18:04:20 +08:00
public int ServerAvatarId = 10000007 ;
2022-04-17 20:43:07 +08:00
public int [ ] WelcomeEmotes = { 2007 , 1002 , 4010 } ;
public String WelcomeMotd = " Welcome to Grasscutter emu " ;
2022-04-29 04:42:59 +08:00
public String WelcomeMailContent = " Hi there! \ r \ nFirst of all, welcome to Grasscutter. If you have any issues, please let us know so that Lawnmower can help you! \ r \ n \ r \ nCheck out our: \ r \ n<type= \" browser \" text= \" Discord \" href= \" https://discord.gg/T5vZU6UyeG \" /> <type= \" browser \" text= \" GitHub \" href= \" https://github.com/Melledy/Grasscutter \" /> " ;
public int [ ] WelcomeMailItems = { 13509 } ;
2022-04-21 13:53:50 +08:00
2022-04-29 00:46:19 +08:00
public boolean EnableOfficialShop = true ;
2022-04-21 13:53:50 +08:00
public GameRates Game = new GameRates ( ) ;
public GameRates getGameRates ( ) { return Game ; }
public static class GameRates {
public float ADVENTURE_EXP_RATE = 1 . 0f ;
public float MORA_RATE = 1 . 0f ;
public float DOMAIN_DROP_RATE = 1 . 0f ;
}
2022-04-17 20:43:07 +08:00
}
}