Search in sources :

Example 1 with UChatReloadEvent

use of br.net.fabiozumbi12.UltimateChat.Bukkit.API.UChatReloadEvent in project UltimateChat by FabioZumbi12.

the class UChat method reload.

public void reload() {
    this.getServer().getScheduler().cancelTasks(this);
    try {
        this.config = new UCConfig(this);
    } catch (IOException e) {
        e.printStackTrace();
    }
    this.lang = new UCLang();
    this.registerAliases();
    this.registerJDA();
    this.registerJedis();
    this.initAutomessage();
    // ping other plugins when uchat reload
    UChatReloadEvent reloadEvent = new UChatReloadEvent();
    Bukkit.getPluginManager().callEvent(reloadEvent);
}
Also used : UCConfig(br.net.fabiozumbi12.UltimateChat.Bukkit.config.UCConfig) IOException(java.io.IOException) UCLang(br.net.fabiozumbi12.UltimateChat.Bukkit.config.UCLang) UChatReloadEvent(br.net.fabiozumbi12.UltimateChat.Bukkit.API.UChatReloadEvent)

Example 2 with UChatReloadEvent

use of br.net.fabiozumbi12.UltimateChat.Bukkit.API.UChatReloadEvent in project UltimateChat by FabioZumbi12.

the class UChat method reload.

public void reload() throws IOException {
    this.cmds.removeCmds();
    this.channels = null;
    this.config = new UCConfig(factory);
    this.lang = new UCLang();
    try {
        setCompatperms();
    } catch (Exception ex) {
        ex.printStackTrace();
    }
    this.cmds = new UCCommands(this);
    registerJedis();
    registerJDA();
    // fire event
    UChatReloadEvent event = new UChatReloadEvent();
    Sponge.getEventManager().post(event);
}
Also used : UCConfig(br.net.fabiozumbi12.UltimateChat.Sponge.config.UCConfig) UCLang(br.net.fabiozumbi12.UltimateChat.Sponge.config.UCLang) IOException(java.io.IOException) InvocationTargetException(java.lang.reflect.InvocationTargetException) UChatReloadEvent(br.net.fabiozumbi12.UltimateChat.Sponge.API.UChatReloadEvent)

Aggregations

IOException (java.io.IOException)2 UChatReloadEvent (br.net.fabiozumbi12.UltimateChat.Bukkit.API.UChatReloadEvent)1 UCConfig (br.net.fabiozumbi12.UltimateChat.Bukkit.config.UCConfig)1 UCLang (br.net.fabiozumbi12.UltimateChat.Bukkit.config.UCLang)1 UChatReloadEvent (br.net.fabiozumbi12.UltimateChat.Sponge.API.UChatReloadEvent)1 UCConfig (br.net.fabiozumbi12.UltimateChat.Sponge.config.UCConfig)1 UCLang (br.net.fabiozumbi12.UltimateChat.Sponge.config.UCLang)1 InvocationTargetException (java.lang.reflect.InvocationTargetException)1