Fix error, make removeUser async, re-enable world saving
This commit is contained in:
parent
41a19c26a6
commit
5e3306276a
3 changed files with 19 additions and 10 deletions
|
|
@ -26,9 +26,12 @@ export default class CommandPlugin extends Plugin {
|
|||
});
|
||||
this.on("command", async (command, player, args) => {
|
||||
if (command == "g") {
|
||||
await server.worlds.find(e => e.name == player.world)!.save();
|
||||
|
||||
const requestedWorld = server.worlds.find((e) =>
|
||||
e.name.toLowerCase() == args.join(" ").toLowerCase()
|
||||
);
|
||||
|
||||
if (requestedWorld) {
|
||||
player.toWorld(requestedWorld);
|
||||
} else {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue