<commit_before>package com.ttaylorr.uhc.pvp.services.core;

/**
 * Created by Dykam on 16-12-13.
 */
public class UHCGameModeBase {
}
<commit_msg>Base file for UHC Game Modes, like in a lobby or in PVP<commit_after>package com.ttaylorr.uhc.pvp.services.core;

import com.ttaylorr.uhc.pvp.PVPManagerPlugin;
import com.ttaylorr.uhc.pvp.services.GameMode;
import org.bukkit.entity.Player;

import java.util.HashSet;
import java.util.Set;

public abstract class UHCGameModeBase extends UHCServiceBase implements GameMode {
    private Set<Player> players;
    protected abstract void onEnter(Player p);
    protected abstract boolean onExit(Player p);

    protected UHCGameModeBase(PVPManagerPlugin plugin) {
        super(plugin);
        players = new HashSet<>();
    }

    @Override
    public void enter(Player player) {
        onEnter(player);
        players.add(player);
    }

    @Override
    public boolean exit(Player player) {
        if(!onExit(player)) return false;
        players.remove(player);
        return true;
    }
}

{'fraction_non_alphanumeric': 0.0987535953978907, 'fraction_numerical': 0.005752636625119847, 'mean_word_length': 3.4050632911392404, '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': '1116916', 'n_tokens_mistral': 338, 'n_tokens_neox': 332, 'n_words': 80}