Fix error, make removeUser async, re-enable world saving

This commit is contained in:
yourfriend 2022-07-10 18:19:17 +03:00
parent 41a19c26a6
commit 5e3306276a
No known key found for this signature in database
GPG key ID: C28FFD8607DAC4DE
3 changed files with 19 additions and 10 deletions

View file

@ -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 {