mirror of
https://github.com/Aust1n46/VentureChat.git
synced 2025-05-22 18:09:06 +00:00
Re-initialize data structures on plugin reload.
This commit is contained in:
parent
63bb3939f0
commit
5e101d4291
@ -9,7 +9,7 @@ import mineverse.Aust1n46.chat.MineverseChat;
|
||||
|
||||
public class Alias {
|
||||
private static MineverseChat plugin = MineverseChat.getInstance();
|
||||
private static List<Alias> aliases = new ArrayList<Alias>();
|
||||
private static List<Alias> aliases;
|
||||
|
||||
private String name;
|
||||
private int arguments;
|
||||
@ -24,6 +24,7 @@ public class Alias {
|
||||
}
|
||||
|
||||
public static void initialize() {
|
||||
aliases = new ArrayList<Alias>();
|
||||
ConfigurationSection cs = plugin.getConfig().getConfigurationSection("alias");
|
||||
for(String key : cs.getKeys(false)) {
|
||||
String name = key;
|
||||
|
@ -30,7 +30,7 @@ public class ChatChannel {
|
||||
private static ChatChannel[] channels;
|
||||
|
||||
private static String defaultColor;
|
||||
private static HashMap<String, ChatChannel> chatChannels = new HashMap<String, ChatChannel>();
|
||||
private static HashMap<String, ChatChannel> chatChannels;
|
||||
|
||||
private String name;
|
||||
private String permission;
|
||||
@ -51,6 +51,7 @@ public class ChatChannel {
|
||||
* Read chat channels from config file and initialize channel array.
|
||||
*/
|
||||
public static void initialize(boolean aliasesRegisteredAsCommands) {
|
||||
chatChannels = new HashMap<String, ChatChannel>();
|
||||
ChatChannel.aliasesRegisteredAsCommands = aliasesRegisteredAsCommands;
|
||||
ConfigurationSection cs = plugin.getConfig().getConfigurationSection("channels");
|
||||
int len = (cs.getKeys(false)).size();
|
||||
|
@ -10,7 +10,7 @@ import mineverse.Aust1n46.chat.MineverseChat;
|
||||
|
||||
public class GuiSlot {
|
||||
private static MineverseChat plugin = MineverseChat.getInstance();
|
||||
private static List<GuiSlot> guiSlots = new ArrayList<GuiSlot>();
|
||||
private static List<GuiSlot> guiSlots;
|
||||
|
||||
private String text;
|
||||
private String command;
|
||||
@ -31,6 +31,7 @@ public class GuiSlot {
|
||||
}
|
||||
|
||||
public static void initialize() {
|
||||
guiSlots = new ArrayList<GuiSlot>();
|
||||
ConfigurationSection cs = plugin.getConfig().getConfigurationSection("venturegui");
|
||||
for (String key : cs.getKeys(false)) {
|
||||
String name = key;
|
||||
|
@ -10,7 +10,7 @@ import mineverse.Aust1n46.chat.MineverseChat;
|
||||
|
||||
public class JsonFormat {
|
||||
private static MineverseChat plugin = MineverseChat.getInstance();
|
||||
private static HashMap<String, JsonFormat> jsonFormats = new HashMap<String, JsonFormat>();
|
||||
private static HashMap<String, JsonFormat> jsonFormats;
|
||||
|
||||
private List<String> hoverTextName;
|
||||
private List<String> hoverTextPrefix;
|
||||
@ -39,6 +39,7 @@ public class JsonFormat {
|
||||
}
|
||||
|
||||
public static void initialize() {
|
||||
jsonFormats = new HashMap<String, JsonFormat>();
|
||||
ConfigurationSection cs = plugin.getConfig().getConfigurationSection("jsonformatting");
|
||||
for(String key : cs.getKeys(false)) {
|
||||
String name = key;
|
||||
|
Loading…
x
Reference in New Issue
Block a user