@EventHandler(priority = EventPriority.HIGH) void onPlayerLeave(PlayerQuitEvent event) { if (MCMEPVP.GameStatus == 0) { MCMEPVP.unQueuePlayer(event.getPlayer()); } else { MCMEPVP.CurrentGame.onPlayerleaveServer(event); } }
@EventHandler(priority = EventPriority.HIGH) void onPlayerJoin(PlayerJoinEvent event) { if (event.getPlayer().hasPermission("mcmepvp.admin")) { if (MCMEPVP.debug) { event .getPlayer() .playSound(event.getPlayer().getLocation(), Sound.ENDERDRAGON_GROWL, 100, 100); event.getPlayer().sendMessage(MCMEPVP.highlightcolor + "Debug mode is enabled!"); event.getPlayer().sendMessage(MCMEPVP.highlightcolor + "Stats are not being recorded!"); } } if (MCMEPVP.GameStatus == 0) { event.getPlayer().teleport(MCMEPVP.Spawn); textureSwitcher.switchTP(event.getPlayer()); spectatorUtil.showAll(event.getPlayer()); } else { MCMEPVP.CurrentGame.onPlayerJoin(event); textureSwitcher.switchTP(event.getPlayer()); } }