Added Bedwars
Added ConfigurationHandler for games Further progress
This commit is contained in:
@@ -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);
|
||||
});
|
||||
}
|
||||
}
|
||||
@@ -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));
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user