mirror of
https://github.com/Melledy/Grasscutter.git
synced 2024-11-22 06:31:26 +00:00
Add !changescene command
This commit is contained in:
parent
be89a6099e
commit
7bac86ed41
@ -325,4 +325,20 @@ public class PlayerCommands {
|
||||
player.getInventory().removeItems(toRemove);
|
||||
}
|
||||
}
|
||||
|
||||
@Command(aliases = {"scene"}, helpText = "/Changescene [Scene id]")
|
||||
public static class ChangeScene extends PlayerCommand {
|
||||
@Override
|
||||
public void execute(GenshinPlayer player, String raw) {
|
||||
int sceneId = 0;
|
||||
|
||||
try {
|
||||
sceneId = Integer.parseInt(raw);
|
||||
} catch (Exception e) {
|
||||
return;
|
||||
}
|
||||
|
||||
player.getWorld().transferPlayerToScene(player, sceneId, player.getPos());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user