HungerGames icon indicating copy to clipboard operation
HungerGames copied to clipboard

add look player camera on wait game

Open FoGTeR opened this issue 11 months ago • 0 comments

@EventHandler
	private void onMove(PlayerMoveEvent event) {
		Game game = plugin.getPlayerManager().getGame(event.getPlayer());
		if (game == null) return;

		Status status = game.getGameArenaData().getStatus();
		if (status == Status.COUNTDOWN || status == Status.WAITING) {
			Location from = event.getFrom();
			Location to = event.getTo();

			if (from.getX() == to.getX() && from.getY() == to.getY() && from.getZ() == to.getZ()) {
				return;
			}
			event.setCancelled(true);
		}
	}

FoGTeR avatar Jan 10 '25 23:01 FoGTeR