<commit_before>package com.applenick.Wait;

import org.bukkit.ChatColor;
import org.bukkit.event.EventHandler;
import org.bukkit.event.Listener;
import org.bukkit.event.player.PlayerJoinEvent;
import org.bukkit.event.server.PluginEnableEvent;
import org.bukkit.plugin.java.JavaPlugin;

/************************************************
			 Created By AppleNick
Copyright © 2016 , AppleNick, All rights reserved.
			http://applenick.com
 *************************************************/
public class Wait extends JavaPlugin implements Listener {
	
	private boolean canLogin = false; // If players can login
	private boolean waitForAll = false; // If the server should wait for all plugins to load
	private String waitForPlugin = "none"; //The name of a specfic plugin to wait for
	private String kickMessage;// The message sent when a player tries to login
	
	@Override
	public void onEnable(){
		//Save Config
		this.saveDefaultConfig();
		
		//Check if blocking All
		waitForAll = this.getConfig().getString("wait-for").equalsIgnoreCase("waitForAll");
		
		//Get name of single plugin if in single mode
		if(!(waitForAll)){
			waitForPlugin = this.getConfig().getString("wait-for");
		}	
		
		//Get the kick message
		kickMessage = ChatColor.translateAlternateColorCodes('&', this.getConfig().getString("kick-message"));
				
		//Register Listener
		this.getServer().getPluginManager().registerEvents(this, this);
		
		if(waitForAll){
			//Schedule the server to allow login after everything is loaded.
			this.getServer().getScheduler().scheduleSyncDelayedTask(this, new Runnable(){
				public void run() {
					canLogin = true;
				}
			}, 0L);
		}
	}
	
	@EventHandler
	public void onPluginEnable(PluginEnableEvent event){
		//Enable logins after the specfic plugin is enabled.
		if(!(waitForAll)){
			if(event.getPlugin().getName().equalsIgnoreCase(waitForPlugin)){
				canLogin = true;
			}
		}
	}
	
	
	@EventHandler<commit_msg>Add a message when logins are enabled<commit_after>package com.applenick.Wait;

import org.bukkit.ChatColor;
import org.bukkit.event.EventHandler;
import org.bukkit.event.Listener;
import org.bukkit.event.player.PlayerJoinEvent;
import org.bukkit.event.server.PluginEnableEvent;
import org.bukkit.plugin.java.JavaPlugin;

/************************************************
			 Created By AppleNick
Copyright © 2016 , AppleNick, All rights reserved.
			http://applenick.com
 *************************************************/
public class Wait extends JavaPlugin implements Listener {
	
	private String PREFIX = ChatColor.GRAY + "[" + ChatColor.DARK_RED + "Wait" + ChatColor.GRAY + "]";
	
	private boolean canLogin = false; // If players can login
	private boolean waitForAll = false; // If the server should wait for all plugins to load
	private String waitForPlugin = "none"; //The name of a specific plugin to wait for
	private String kickMessage;// The message sent when a player tries to login
	
	@Override
	public void onEnable(){
		//Save Config
		this.saveDefaultConfig();
		
		//Check if blocking All
		waitForAll = this.getConfig().getString("wait-for").equalsIgnoreCase("waitForAll");
		
		//Get name of single plugin if in single mode
		if(!(waitForAll)){
			waitForPlugin = this.getConfig().getString("wait-for");
		}	
		
		//Get the kick message
		kickMessage = ChatColor.translateAlternateColorCodes('&', this.getConfig().getString("kick-message"));
				
		//Register Listener
		this.getServer().getPluginManager().registerEvents(this, this);
		
		if(waitForAll){
			//Schedule the server to allow login after everything is loaded.
			this.getServer().getScheduler().scheduleSyncDelayedTask(this, new Runnable(){
				public void run() {
					canLogin = true;
					getServer().getConsoleSender().sendMessage(PREFIX + ChatColor.GREEN + "Players can now login");
				}
			}, 0L);
		}
	}
	
	@EventHandler
	public void onPluginEnable(PluginEnableEvent event){
		//Enable logins after the specific plugin is enabled.
		if(!(waitForAll)){
			if(event.getPlugin().getName().equalsIgnoreCase(waitForPlugin)){
				canLogin = true;
				getServer().getConsoleSender().sendMessage(PREFIX + ChatColor.GREEN + "Players can now login");
			}
		}
	}
	
	
	@EventHandler
{'fraction_non_alphanumeric': 0.15336984996427722, 'fraction_numerical': 0.0023815194093831865, 'mean_word_length': 4.336721728081321, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, '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': '1073017', 'n_tokens_mistral': 1343, 'n_tokens_neox': 1156, 'n_words': 330}