mirror of
https://github.com/TotalFreedomMC/TF-ProjectKorra.git
synced 2025-02-11 11:40:40 +00:00
Added event for when the plugin is reloaded via /pk reload.
This commit is contained in:
parent
808ea0a27e
commit
9a9a0ffbf0
2 changed files with 24 additions and 0 deletions
|
@ -0,0 +1,21 @@
|
|||
package com.projectkorra.ProjectKorra.CustomEvents;
|
||||
|
||||
import org.bukkit.event.Event;
|
||||
import org.bukkit.event.HandlerList;
|
||||
|
||||
public class BendingReloadEvent extends Event {
|
||||
|
||||
private static final HandlerList handlers = new HandlerList();
|
||||
|
||||
public BendingReloadEvent () {
|
||||
|
||||
}
|
||||
|
||||
public HandlerList getHandlers() {
|
||||
return handlers;
|
||||
}
|
||||
|
||||
public static HandlerList getHandlerList() {
|
||||
return handlers;
|
||||
}
|
||||
}
|
|
@ -83,6 +83,7 @@ import com.projectkorra.ProjectKorra.Ability.AbilityModuleManager;
|
|||
import com.projectkorra.ProjectKorra.Ability.StockAbilities;
|
||||
import com.projectkorra.ProjectKorra.Ability.Combo.ComboAbilityModule;
|
||||
import com.projectkorra.ProjectKorra.Ability.Combo.ComboModuleManager;
|
||||
import com.projectkorra.ProjectKorra.CustomEvents.BendingReloadEvent;
|
||||
import com.projectkorra.ProjectKorra.CustomEvents.PlayerBendingDeathEvent;
|
||||
import com.projectkorra.ProjectKorra.Utilities.ParticleEffect;
|
||||
import com.projectkorra.ProjectKorra.airbending.AirCombo;
|
||||
|
@ -1446,6 +1447,8 @@ public class GeneralMethods {
|
|||
plugin.reloadConfig();
|
||||
ConfigManager.deathMsgConfig.reloadConfig();
|
||||
GeneralMethods.stopBending();
|
||||
BendingReloadEvent event = new BendingReloadEvent();
|
||||
Bukkit.getServer().getPluginManager().callEvent(event);
|
||||
new AbilityModuleManager(plugin);
|
||||
DBConnection.host = plugin.getConfig().getString("Storage.MySQL.host");
|
||||
DBConnection.port = plugin.getConfig().getInt("Storage.MySQL.port");
|
||||
|
|
Loading…
Reference in a new issue