@@ -12,6 +12,9 @@ A WIP server reimplementation for *some anime game* 2.3-2.6
...
@@ -12,6 +12,9 @@ A WIP server reimplementation for *some anime game* 2.3-2.6
* Friends list
* Friends list
* Co-op *partially* work
* Co-op *partially* work
# Quick setup guide
# Quick setup guide
### Note
* If you update from an older version, delete `config.json` for regeneration
### Prerequisites
### Prerequisites
* JDK-8u202 ([mirror link](https://mirrors.huaweicloud.com/java/jdk/8u202-b08/) since Oracle required an account to download old builds)
* JDK-8u202 ([mirror link](https://mirrors.huaweicloud.com/java/jdk/8u202-b08/) since Oracle required an account to download old builds)
* Mongodb (recommended 4.0+)
* Mongodb (recommended 4.0+)
...
@@ -26,7 +29,7 @@ A WIP server reimplementation for *some anime game* 2.3-2.6
...
@@ -26,7 +29,7 @@ A WIP server reimplementation for *some anime game* 2.3-2.6
### Connecting with the client
### Connecting with the client
½. Create an account using *server console command* below
½. Create an account using *server console command* below
1. Run a proxy daemon: (choose either one)
1. Run a proxy daemon: (choose either one)
- mitmdump: `mitmdump -s proxy.py --ssl-insecure`
- mitmdump: `mitmdump -s proxy.py -k`
- Fiddler Classic: Run Fiddler Classic, turn on `Decrypt https traffic` in setting and change the default port there (Tools -> Options -> Connections) to anything other than `8888`, and load [this script](https://github.lunatic.moe/fiddlerscript).
- Fiddler Classic: Run Fiddler Classic, turn on `Decrypt https traffic` in setting and change the default port there (Tools -> Options -> Connections) to anything other than `8888`, and load [this script](https://github.lunatic.moe/fiddlerscript).
@@ -37,32 +40,33 @@ A WIP server reimplementation for *some anime game* 2.3-2.6
...
@@ -37,32 +40,33 @@ A WIP server reimplementation for *some anime game* 2.3-2.6
* or you can use `run.cmd` to start Server & Proxy daemon with one click
* or you can use `run.cmd` to start Server & Proxy daemon with one click
# Grasscutter commands
# Grasscutter commands
### Server console commands
There is a dummy user named "Server" in every player's friends list that you can message to use commands. Commands also work in other chat rooms, such as private/team chats.
`account create [username] {playerid}` - Creates an account with the specified username and the in-game uid for that account. The playerid parameter is optional and will be auto generated if not set.
`account create [username] {playerid}` - Creates an account with the specified username and the in-game uid for that account. The playerid parameter is optional and will be auto generated if not set.
### In-Game commands
`spawn [monster id] [level] [amount]`
There is a dummy user named "Server" in every player's friends list that you can message to use commands. Commands also work in other chat rooms, such as private/team chats.
`give [item id] [amount]`
`!spawn [monster id] [level] [amount]`
`givechar [avatar id] [level]`
`!give [item id] [amount]`
`drop [item id] [amount]`
`!givechar [avatar id] [level]`
`killall`
`!drop [item id] [amount]`
`setworldlevel [level]` - Relog to see effects properly
`!killall`
`godmode` - Prevents you from taking damage
`!setworldlevel [level]` - Relog to see effects properly
`resetconst` - Resets the constellation level on your current active character, will need to relog after using the command to see any changes.
`!godmode` - Prevents you from taking damage
`setstats [stats] [amount]` - Changes the current character's specified stat.
`!resetconst` - Resets the constellation level on your current active character, will need to relog after using the command to see any changes.
`clearartifacts` - Deletes all unequipped and unlocked level 0 artifacts, **including yellow rarity ones** from your inventory
`!sethp [hp]`
`pos` - Gets your current coordinate.
`!clearartifacts` - Deletes all unequipped and unlocked level 0 artifacts, **including yellow rarity ones** from your inventory
`weather [weather id] [climate id]` - Changes the current weather.
*More commands will be updated in the [wiki](https://github.com/Melledy/Grasscutter/wiki/).*
*More commands will be updated in the [wiki](https://github.com/Melledy/Grasscutter/wiki/).*
@@ -22,7 +22,7 @@ public final class KickCommand implements CommandHandler {
...
@@ -22,7 +22,7 @@ public final class KickCommand implements CommandHandler {
}
}
if(sender!=null){
if(sender!=null){
CommandHandler.sendMessage(sender,String.format("Player [%s:%s] has kicked player [%s:%s]",sender.getAccount().getPlayerId(),sender.getAccount().getUsername(),target,targetPlayer.getAccount().getUsername()));
CommandHandler.sendMessage(sender,String.format("Player [%s:%s] has kicked player [%s:%s]",sender.getAccount().getPlayerUid(),sender.getAccount().getUsername(),target,targetPlayer.getAccount().getUsername()));
}
}
CommandHandler.sendMessage(sender,String.format("Kicking player [%s:%s]",target,targetPlayer.getAccount().getUsername()));
CommandHandler.sendMessage(sender,String.format("Kicking player [%s:%s]",target,targetPlayer.getAccount().getUsername()));