Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public class joinCommand implements CommandExecutor {
- Main plugin;
- Game game;
- public joinCommand(Main plugin) { this.plugin = plugin; }
- @Override
- public boolean onCommand(CommandSender sender, Command cmd, String label, String[] args) {
- Player player = (Player) sender;
- if(sender == null) {
- plugin.console.sendMessage(ChatColor.RED + "" + ChatColor.BOLD + "(!)" + ChatColor.RED + "Only players can execute this command.");
- }
- if (player != null) {
- if(plugin.ingame.contains(player.getUniqueId())) {
- player.sendMessage("You are already in a match. Type /blleave to leave.");
- }
- else if(!plugin.ingame.contains(player.getUniqueId())) {
- player.sendMessage("Sending you to BlockIn Practice!");
- if(player.equals(null)) {
- player.sendMessage("null");
- plugin.console.sendMessage("null (joincmd)");
- }
- game.GameAdd(null);
- }
- }
- return false;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment