<commit_before>package com.github.games647.scoreboardstats.variables.defaults;

import com.github.games647.scoreboardstats.Version;
import com.github.games647.scoreboardstats.variables.UnsupportedPluginException;
import com.github.games647.scoreboardstats.variables.VariableReplaceAdapter;

import org.bukkit.plugin.Plugin;

public abstract class DefaultReplaceAdapter<P extends Plugin> extends VariableReplaceAdapter<P> {

    public DefaultReplaceAdapter(P plugin, String... variables) {
        super(plugin, variables);
    }

    public DefaultReplaceAdapter(P plugin, String description, boolean global, boolean async, boolean constant
            , String... variables) {
        super(plugin, description, global, async, constant, variables);
    }

    public boolean isNewer(String minVersion) {
        String version = getPlugin().getDescription().getVersion();
        return Version.compare(version, minVersion) >= 0;
    }

    public void checkVersionException(String minVersion) {
        String version = getPlugin().getDescription().getVersion();
        if (Version.compare(version, minVersion) < 0) {
            throw new UnsupportedPluginException("You have an outdated version of " + getPlugin().getName()
                + "Please update it");
        }
    }
}<commit_msg>Fixed version check<commit_after>package com.github.games647.scoreboardstats.variables.defaults;

import com.github.games647.scoreboardstats.Version;
import com.github.games647.scoreboardstats.variables.UnsupportedPluginException;
import com.github.games647.scoreboardstats.variables.VariableReplaceAdapter;

import org.bukkit.plugin.Plugin;

public abstract class DefaultReplaceAdapter<P extends Plugin> extends VariableReplaceAdapter<P> {

    public DefaultReplaceAdapter(P plugin, String... variables) {
        super(plugin, variables);
    }

    public DefaultReplaceAdapter(P plugin, String description, boolean global, boolean async, boolean constant
            , String... variables) {
        super(plugin, description, global, async, constant, variables);
    }

    public boolean isNewer(String minVersion) {
        String version = getPlugin().getDescription().getVersion();
        return Version.compare(minVersion, version) >= 0;
    }

    public void checkVersionException(String minVersion) {
        String version = getPlugin().getDescription().getVersion();
        if (Version.compare(minVersion, version) < 0) {
            throw new UnsupportedPluginException("You have an outdated version of " + getPlugin().getName()
                + "Please update it");
        }
    }
}
{'fraction_non_alphanumeric': 0.09684857801691008, 'fraction_numerical': 0.010760953112990008, 'mean_word_length': 3.8472998137802605, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 9, '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': '5222324', 'n_tokens_mistral': 675, 'n_tokens_neox': 629, 'n_words': 158}