51 lines
1.6 KiB
Java
51 lines
1.6 KiB
Java
package net.t2code.commandguiv2;
|
|
|
|
import lombok.Getter;
|
|
import net.t2code.commandguiv2.Spigot.config.config.Config;
|
|
import net.t2code.t2codelib.SPIGOT.api.messages.T2C_Replace;
|
|
import net.t2code.t2codelib.util.T2C_ConfigItem;
|
|
import net.t2code.t2codelib.util.T2C_Util;
|
|
|
|
import java.util.ArrayList;
|
|
import java.util.Arrays;
|
|
import java.util.List;
|
|
|
|
public class Util {
|
|
|
|
@Getter
|
|
private static final String infoText = "";
|
|
|
|
@Getter
|
|
private static final String requiredT2CodeLibVersion = "16.7";
|
|
|
|
@Getter
|
|
private static final String prefix = "§8[§4C§9GUI§8]";
|
|
|
|
@Getter
|
|
private static final Integer spigotID = 90671;
|
|
|
|
@Getter
|
|
private static final String git = "JaTiTV/T2C-CommandGUI";
|
|
|
|
@Getter
|
|
private static final Integer bstatsID = 10840;
|
|
|
|
@Getter
|
|
private static final String spigot = "https://www.spigotmc.org/resources/" + getSpigotID();
|
|
|
|
@Getter
|
|
private static final String discord = "http://dc.t2code.net";
|
|
|
|
public static String[] getConfigLogo() {
|
|
ArrayList<String> arrayList = new ArrayList<>(T2C_Util.getConfigT2CodeLogo());
|
|
arrayList.addAll(Arrays.asList("", "# Spigot: " + spigot));
|
|
return arrayList.toArray(new String[0]);
|
|
}
|
|
|
|
public static void replace(T2C_ConfigItem item) {
|
|
if (item.getValue() instanceof List) {
|
|
item.setValue(T2C_Replace.replace(Config.VALUES.prefix.getValue().toString(), (List<String>) item.getValue()));
|
|
} else item.setValue(T2C_Replace.replace(Config.VALUES.prefix.getValue().toString(), item.getValue().toString()));
|
|
}
|
|
}
|