You can find the output jar in the root of the project folder.
You can find the output jar in the root of the project folder.
## Commands
### Commands have moved to the [wiki](https://github.com/Grasscutters/Grasscutter/wiki/Commands)!
You might want to use this command (`java -jar grasscutter.jar -handbook`) in a cmd that is in the grasscutter folder. It will create a handbook file (GM Handbook.txt) where you can find the item IDs for stuff you want
You may want to use this command (`java -jar grasscutter.jar -gachamap`) to generate a mapping file for the gacha record subsystem. The file will be generated to `GRASSCUTTER_RESOURCE/gcstatic` folder. Otherwise you may only see number IDs in the gacha record page.
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. to run commands ingame, you need to add prefix `/` or `!` such as `/pos`
### Targeting
1. For commands that target a Player, you can specify a target UID with `@UID` as an argument in any position to the command.
2. If you message a valid command at another player (instead of at the "Server" virtual player), they will be the target for that command if you didn't set one above.
3. If none of the above, it will default to a persistent target player you previously set using the command `/target <UID>`.
4. If none of the above, you will be the target of the command. If you are entering the command from the Server console, **it will not work!**
Note that performing commands on other players will usually require different a permission to the base permission node. e.g. `player.give` becomes `player.give.others` if used on another player.
| account | Creates an account with the specified username, and the in-game UID if specified. | | Server only | account \<create\|delete> \<username> [UID] | |
| broadcast | Sends a message to all the players. | b | None | broadcast \<message> | server.broadcast |
| coop | Forces someone to join the world of others. | | Online Player | coop [host UID (default self)] | server.coop |
| changescene | Switch scenes by scene ID. | scene | Online Player | changescene \<scene id> | player.changescene |
| clear | Deletes all unequipped and unlocked lvl0 artifacts(art)/weapons(wp)/material(mat) from inventory. | | Online Player | clear \<all\|wp\|art\|mat> | player.clearinv |
| drop | Drops an item around you. | d dropitem | Online Player | drop \<itemID\|itemName> [amount] | server.drop |
| enterdungeon | Enter a dungeon by dungeon ID. | | Online Player | enterdungeon \<dungeon id> | player.enterdungeon |
| give | Gives item(s) to you or the specified player. | g item giveitem | Online Player | give \<itemId\|itemName> [amount] [level] [refinement] | player.give |
| giveall | Gives all items. | givea | Online Player | giveall [amount] | player.giveall |
| giveart | Gives the player a specified artifact. | gart | Online Player | giveart \<artifactId> \<mainPropId> [\<appendPropId>[,\<times>]]... [level] | player.giveart |
| givechar | Gives the player a specified character. | givec | Online Player | givechar \<avatarId> | player.givechar |
| godmode | Prevents you from taking damage. | | Online Player | godmode | player.godmode |
| heal | Heals all characters in your current team. | h | Online Player | heal | player.heal |
| help | Sends the help message or shows information about a specified command. | | None | help [command] | |
| kick | Kicks the specified player from the server. | k | Online Player | kick | server.kick |
| killall | Kills all entities in the current scene or specified scene of the corresponding player. | | Online Player | killall [sceneId] | server.killall |
| list | Lists online players. | | None | list | |
| permission | Grants or removes a permission for a user. | | Online Player | permission \<add\|remove> \<permission> | permission |
| position | Sends your current coordinates. | pos | Online Player | position | |
| reload | Reloads the server config. | | None | reload | server.reload |
| resetconst | Resets currently selected (or all) character(s) to C0. Relog to see proper effects. | resetconstellation | Online Player | resetconst [all] | player.resetconstellation |
| restart | Restarts the current session. | | None | restart | |
| sendmessage | Sends a message to a player as the server. | say | Online Player | say \<message> | server.sendmessage |
| setfetterlevel | Sets the friendship level for your currently selected character. | setfetterlvl | Online Player | setfetterlevel \<level> | player.setfetterlevel |
| setstats | Sets a stat for your currently selected character. | stats | Online Player | setstats \<stat> \<value> | player.setstats |
| setworldlevel | Sets your world level. Relog to see proper effects. | setworldlvl | Online Player | setworldlevel \<level> | player.setworldlevel |
| spawn | Spawns some entities around you. | | Online Player | spawn \<entityId> [amount] [level(monster only)] | server.spawn |
| talent | Sets talent level for your currently selected character | | Online Player | talent \<talentID> \<value> | player.settalent |
| team | Add, remove, or swap avatars in your current team. Index start from 1. | | Online Player | team \<add\|remove\|set> [avatarId,...] [index|first|last|index-index,...] | player.team |