Added Bedwars

Added ConfigurationHandler for games
Further progress
This commit is contained in:
2023-01-07 23:54:55 +01:00
parent bf4d8b97ed
commit d1432347c1
452 changed files with 671 additions and 44019 deletions

View File

@@ -0,0 +1,20 @@
package eu.mhsl.minenet.minigames.command.anonymous;
import eu.mhsl.minenet.minigames.util.MoveInstance;
import eu.mhsl.minenet.minigames.instance.hub.Hub;
import eu.mhsl.minenet.minigames.instance.room.Room;
import net.minestom.server.command.builder.Command;
import net.minestom.server.entity.Player;
public class HubCommand extends Command {
public HubCommand() {
super("hub");
setCondition((sender, commandString) -> ((Player) sender).getInstance() instanceof Room);
setDefaultExecutor((sender, context) -> {
Room.unsetRoom((Player) sender);
MoveInstance.move((Player) sender, Hub.INSTANCE);
});
}
}

View File

@@ -0,0 +1,16 @@
package eu.mhsl.minenet.minigames.command.anonymous;
import eu.mhsl.minenet.minigames.instance.game.Game;
import eu.mhsl.minenet.minigames.instance.room.Room;
import net.minestom.server.command.builder.Command;
import net.minestom.server.entity.Player;
public class LeaveCommand extends Command {
public LeaveCommand() {
super("leave");
setCondition((sender, commandString) -> ((Player) sender).getInstance() instanceof Game);
setDefaultExecutor((sender, context) -> Room.setOwnRoom((Player) sender));
}
}