Search in sources :

Example 1 with UpdateManager

use of com.github.sirblobman.api.update.UpdateManager in project CombatLogX by SirBlobman.

the class CommandCombatLogXVersion method getSpigotVersion.

private String getSpigotVersion() {
    ICombatLogX combatLogX = getCombatLogX();
    JavaPlugin plugin = combatLogX.getPlugin();
    CorePlugin corePlugin = JavaPlugin.getPlugin(CorePlugin.class);
    UpdateManager updateManager = corePlugin.getUpdateManager();
    String spigotVersion = updateManager.getSpigotVersion(plugin);
    if (spigotVersion == null) {
        return "Not Available";
    }
    return spigotVersion;
}
Also used : JavaPlugin(org.bukkit.plugin.java.JavaPlugin) UpdateManager(com.github.sirblobman.api.update.UpdateManager) ICombatLogX(com.github.sirblobman.combatlogx.api.ICombatLogX) CorePlugin(com.github.sirblobman.api.core.CorePlugin)

Example 2 with UpdateManager

use of com.github.sirblobman.api.update.UpdateManager in project CombatLogX by SirBlobman.

the class CombatPlugin method onEnable.

@Override
public void onEnable() {
    new CommandCombatLogX(this).register();
    new CommandCombatTimer(this).register();
    new CommandTogglePVP(this).register();
    new ListenerConfiguration(this).register();
    new ListenerDamage(this).register();
    new ListenerPunish(this).register();
    new ListenerUntag(this).register();
    getDeathListener().register();
    this.timerUpdateTask.register();
    new UntagTask(this).register();
    ExpansionManager expansionManager = getExpansionManager();
    expansionManager.enableExpansions();
    broadcastEnableMessage();
    CorePlugin corePlugin = JavaPlugin.getPlugin(CorePlugin.class);
    UpdateManager updateManager = corePlugin.getUpdateManager();
    updateManager.addResource(this, 31689L);
}
Also used : UntagTask(com.github.sirblobman.combatlogx.task.UntagTask) CommandTogglePVP(com.github.sirblobman.combatlogx.command.CommandTogglePVP) ListenerPunish(com.github.sirblobman.combatlogx.listener.ListenerPunish) ListenerConfiguration(com.github.sirblobman.combatlogx.listener.ListenerConfiguration) CommandCombatTimer(com.github.sirblobman.combatlogx.command.CommandCombatTimer) ListenerDamage(com.github.sirblobman.combatlogx.listener.ListenerDamage) ExpansionManager(com.github.sirblobman.combatlogx.api.expansion.ExpansionManager) CommandCombatLogX(com.github.sirblobman.combatlogx.command.combatlogx.CommandCombatLogX) UpdateManager(com.github.sirblobman.api.update.UpdateManager) ListenerUntag(com.github.sirblobman.combatlogx.listener.ListenerUntag) CorePlugin(com.github.sirblobman.api.core.CorePlugin)

Aggregations

CorePlugin (com.github.sirblobman.api.core.CorePlugin)2 UpdateManager (com.github.sirblobman.api.update.UpdateManager)2 ICombatLogX (com.github.sirblobman.combatlogx.api.ICombatLogX)1 ExpansionManager (com.github.sirblobman.combatlogx.api.expansion.ExpansionManager)1 CommandCombatTimer (com.github.sirblobman.combatlogx.command.CommandCombatTimer)1 CommandTogglePVP (com.github.sirblobman.combatlogx.command.CommandTogglePVP)1 CommandCombatLogX (com.github.sirblobman.combatlogx.command.combatlogx.CommandCombatLogX)1 ListenerConfiguration (com.github.sirblobman.combatlogx.listener.ListenerConfiguration)1 ListenerDamage (com.github.sirblobman.combatlogx.listener.ListenerDamage)1 ListenerPunish (com.github.sirblobman.combatlogx.listener.ListenerPunish)1 ListenerUntag (com.github.sirblobman.combatlogx.listener.ListenerUntag)1 UntagTask (com.github.sirblobman.combatlogx.task.UntagTask)1 JavaPlugin (org.bukkit.plugin.java.JavaPlugin)1