<commit_before>package me.stefvanschie;


import org.bukkit.ChatColor;
import org.bukkit.Location;
import org.bukkit.World;
import org.bukkit.entity.Player;

import me.stefvanschie.BuildingGame;

public class Join
{
	public static void joinGame (Player player, String arena)
	{
		if (player.hasPermission("join"))
		{
			if (!BuildingGame.main.players.containsKey(player))
			{
				if (BuildingGame.main.arenas.contains(arena))
				{
					if (!BuildingGame.main.playersInArena.containsKey(arena))
					{
						BuildingGame.main.playersInArena.put(arena, 0);
					}
					if (BuildingGame.main.playersInArena.get(arena) < BuildingGame.main.arenas.getInt(arena + ".maxplayers"))
					{
						World lobbyworld = BuildingGame.main.getServer().getWorld(BuildingGame.main.arenas.getString(arena + ".lobby.world"));
						Location lobbylocation = new Location(lobbyworld, BuildingGame.main.arenas.getInt(arena + ".lobby.x"), BuildingGame.main.arenas.getInt(arena + ".lobby.y"), BuildingGame.main.arenas.getInt(arena + ".lobby.z"));
						player.teleport(lobbylocation);
						player.sendMessage(BuildingGame.main.messages.getString("global.prefix").replaceAll("&", "§") + BuildingGame.main.messages.getString("join.message")
								.replaceAll("&", "§"));
						for (Player pl : BuildingGame.main.players.keySet())
						{
							if (BuildingGame.main.players.get(pl).equals(arena))
							{
								pl.sendMessage(BuildingGame.main.messages.getString("global.prefix").replaceAll("&", "§") + BuildingGame.main.messages.getString("join.otherPlayers")
										.replace("%player%", player.getName())
										.replaceAll("&", "§"));
							}
						}
						BuildingGame.main.playersInArena.put(arena, BuildingGame.main.playersInArena.get(arena) + 1);
						BuildingGame.main.players.put(player, arena);
						BuildingGame.main.votes.put(player, 0);
						
						//update all signs
						SignUpdate.update();
						
						if (BuildingGame.main.playersInArena.get(arena) == BuildingGame.main.arenas.getInt(arena + ".minplayers"))
						{
							GameStartCountdown.gamestartcountdown(arena);
						}
						if (BuildingGame.main.playersInArena.get(arena) == BuildingGame.main.arenas.getInt(arena + ".maxplayers"))
						{
							GameStartCountdown.seconds = 0;
						}
					}
					else if (BuildingGame.main.playersInArena.get(arena) >= BuildingGame.main.config.getInt(arena + ".maxplayers"))
					{
						player.sendMessage(ChatColor.RED + "This arena is currently full");
					}
					else
					{
						player.sendMessage(ChatColor.RED + "An unexpected error occured: Error: bg.join.playersingame");
					}
				}
				else if (!BuildingGame.main.arenas.contains(arena))
				{
					player.sendMessage(ChatColor.RED + "This arena does not exists!");
				}
				else
				{
					player.sendMessage(ChatColor.RED + "An unexpected error occured. Error: bg.join.arenas.contains");
				}
			}
			else if (BuildingGame.main.players.containsKey(player))
			{
				player.sendMessage(ChatColor.RED + "You're already in a game!");
			}
			else
			{
				player.sendMessage(ChatColor.RED + "An unexpected error occured. Error: bg.join.joinGame.BuildingGame.main.players.containskey");
			}
		}
		else if (!player.hasPermission("join"))
		{
			player.sendMessage(BuildingGame.main.messages.getString("global.prefix").replaceAll("&", "§") + BuildingGame.main.messages.getString("global.permissionNode")
					.replaceAll("&", "§"));
		}
		else
		{
			player.sendMessage(ChatColor.RED + "An unexpected error occured: Error: bg.join.permission");
		}
	}
}
<commit_msg>Update Join.java<commit_after>package me.stefvanschie;


import org.bukkit.ChatColor;
import org.bukkit.GameMode;
import org.bukkit.Location;
import org.bukkit.World;
import org.bukkit.entity.Player;

import me.stefvanschie.BuildingGame;

public class Join
{
	//public static Join join;
	public static void joinGame (Player player, String arena)
	{
		if (player.hasPermission("bg.join"))
		{
			if (!BuildingGame.main.players.containsKey(player))
			{
				if (BuildingGame.main.arenas.contains(arena))
				{
					if (!BuildingGame.main.playersInArena.containsKey(arena))
					{
						BuildingGame.main.playersInArena.put(arena, 0);
					}
					if (BuildingGame.main.playersInArena.get(arena) < BuildingGame.main.arenas.getInt(arena + ".maxplayers"))
					{
						player.setGameMode(GameMode.ADVENTURE);
						World lobbyworld = BuildingGame.main.getServer().getWorld(BuildingGame.main.arenas.getString(arena + ".lobby.world"));
						Location lobbylocation = new Location(lobbyworld, BuildingGame.main.arenas.getInt(arena + ".lobby.x"), BuildingGame.main.arenas.getInt(arena + ".lobby.y"), BuildingGame.main.arenas.getInt(arena + ".lobby.z"));
						player.teleport(lobbylocation);
						player.sendMessage(BuildingGame.main.messages.getString("global.prefix").replaceAll("&", "§") + BuildingGame.main.messages.getString("join.message")
								.replaceAll("&", "§"));
						for (Player pl : BuildingGame.main.players.keySet())
						{
							if (BuildingGame.main.players.get(pl).equals(arena))
							{
								pl.sendMessage(BuildingGame.main.messages.getString("global.prefix").replaceAll("&", "§") + BuildingGame.main.messages.getString("join.otherPlayers")
										.replace("%player%", player.getName())
										.replaceAll("&", "§"));
							}
						}
						BuildingGame.main.playersInArena.put(arena, BuildingGame.main.playersInArena.get(arena) + 1);
						BuildingGame.main.players.put(player, arena);
						BuildingGame.main.votes.put(player, 0);
						
						//update all signs
						SignUpdate.update();
						
						if (BuildingGame.main.playersInArena.get(arena) == BuildingGame.main.arenas.getInt(arena + ".minplayers"))
						{
							GameStartCountdown.gamestartcountdown(arena);
						}
						if (BuildingGame.main.playersInArena.get(arena) == BuildingGame.main.arenas.getInt(arena + ".maxplayers"))
						{
							GameStartCountdown.seconds = 0;
						}
					}
					else if (BuildingGame.main.playersInArena.get(arena) >= BuildingGame.main.config.getInt(arena + ".maxplayers"))
					{
						player.sendMessage(ChatColor.RED + "This arena is currently full");
					}
					else
					{
						player.sendMessage(ChatColor.RED + "An unexpected error occured: Error: bg.join.playersingame");
					}
				}
				else if (!BuildingGame.main.arenas.contains(arena))
				{
					player.sendMessage(ChatColor.RED + "This arena does not exists!");
				}
				else
				{
					player.sendMessage(ChatColor.RED + "An unexpected error occured. Error: bg.join.arenas.contains");
				}
			}
			else if (BuildingGame.main.players.containsKey(player))
			{
				player.sendMessage(ChatColor.RED + "You're already in a game!");
			}
			else
			{
				player.sendMessage(ChatColor.RED + "An unexpected error occured. Error: bg.join.joinGame.BuildingGame.main.players.containskey");
			}
		}
		else if (!player.hasPermission("bg.join"))
		{
			player.sendMessage(BuildingGame.main.messages.getString("global.prefix").replaceAll("&", "§") + BuildingGame.main.messages.getString("global.permissionNode")
					.replaceAll("&", "§"));
		}
		else
		{
			player.sendMessage(ChatColor.RED + "An unexpected error occured: Error: bg.join.permission");
		}
	}
}

{'fraction_non_alphanumeric': 0.1481687787216265, 'fraction_numerical': 0.0011140509678317784, 'mean_word_length': 3.4971822166562303, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2109457', 'n_tokens_mistral': 2976, 'n_tokens_neox': 2320, 'n_words': 330}