7.5
This commit is contained in:
parent
13baf14d7d
commit
54b034fc31
@ -1,7 +1,7 @@
|
||||
<component name="ArtifactManager">
|
||||
<artifact type="jar" name="T2CodeLib_7.4">
|
||||
<artifact type="jar" name="T2CodeLib_7.5">
|
||||
<output-path>$PROJECT_DIR$/../../Plugins/T2CodeLib/.jar</output-path>
|
||||
<root id="archive" name="T2CodeLib_7.4.jar">
|
||||
<root id="archive" name="T2CodeLib_7.5.jar">
|
||||
<element id="module-output" name="T2CodeLib" />
|
||||
</root>
|
||||
</artifact>
|
@ -1,13 +1,13 @@
|
||||
<component name="libraryTable">
|
||||
<library name="Maven: org.spigotmc:spigot-api:1.18-R0.1-SNAPSHOT">
|
||||
<CLASSES>
|
||||
<root url="jar://$MAVEN_REPOSITORY$/org/spigotmc/spigot-api/1.18-R0.1-SNAPSHOT/spigot-api-1.18-R0.1-20211130.213543-3.jar!/" />
|
||||
<root url="jar://$MAVEN_REPOSITORY$/org/spigotmc/spigot-api/1.18-R0.1-SNAPSHOT/spigot-api-1.18-R0.1-20211203.212959-19.jar!/" />
|
||||
</CLASSES>
|
||||
<JAVADOC>
|
||||
<root url="jar://$MAVEN_REPOSITORY$/org/spigotmc/spigot-api/1.18-R0.1-SNAPSHOT/spigot-api-1.18-R0.1-20211130.213543-3-javadoc.jar!/" />
|
||||
<root url="jar://$MAVEN_REPOSITORY$/org/spigotmc/spigot-api/1.18-R0.1-SNAPSHOT/spigot-api-1.18-R0.1-20211203.212959-19-javadoc.jar!/" />
|
||||
</JAVADOC>
|
||||
<SOURCES>
|
||||
<root url="jar://$MAVEN_REPOSITORY$/org/spigotmc/spigot-api/1.18-R0.1-SNAPSHOT/spigot-api-1.18-R0.1-20211130.213543-3-sources.jar!/" />
|
||||
<root url="jar://$MAVEN_REPOSITORY$/org/spigotmc/spigot-api/1.18-R0.1-SNAPSHOT/spigot-api-1.18-R0.1-20211203.212959-19-sources.jar!/" />
|
||||
</SOURCES>
|
||||
</library>
|
||||
</component>
|
2
pom.xml
2
pom.xml
@ -6,7 +6,7 @@
|
||||
|
||||
<groupId>net.t2code</groupId>
|
||||
<artifactId>T2CodeLib</artifactId>
|
||||
<version>7.4</version>
|
||||
<version>7.5</version>
|
||||
<packaging>jar</packaging>
|
||||
|
||||
<name>T2CodeLib</name>
|
||||
|
@ -2,14 +2,23 @@ package net.t2code.lib.Spigot.Lib.items;
|
||||
|
||||
import net.t2code.lib.Spigot.Lib.minecraftVersion.MCVersion;
|
||||
import org.bukkit.Material;
|
||||
import org.bukkit.inventory.ItemStack;
|
||||
|
||||
public class ItemVersion {
|
||||
public static Material Head;
|
||||
private static Material Head;
|
||||
private static ItemStack HeadIS;
|
||||
public static void scan(){
|
||||
if (MCVersion.minecraft1_8 || MCVersion.minecraft1_9 || MCVersion.minecraft1_10 || MCVersion.minecraft1_11 || MCVersion.minecraft1_12) {
|
||||
Head = Material.valueOf("SKULL");
|
||||
} else Head = Material.valueOf("PLAYER_HEAD");
|
||||
HeadIS = new ItemStack(Head);
|
||||
}
|
||||
|
||||
public static Material getHead() {
|
||||
return Head;
|
||||
}
|
||||
|
||||
public static ItemStack getHeadIS() {
|
||||
return HeadIS;
|
||||
}
|
||||
}
|
||||
|
@ -5,6 +5,7 @@ import org.bukkit.entity.Player;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
|
||||
public class Replace {
|
||||
@ -37,10 +38,10 @@ public class Replace {
|
||||
public static List<String> replace(String prefix,Player player, List<String> Text) {
|
||||
List<String> output = new ArrayList();
|
||||
if (player == null) {
|
||||
return Arrays.asList("player is null");
|
||||
return Collections.singletonList("player is null");
|
||||
}
|
||||
if (Text == null) {
|
||||
return Arrays.asList("Text is null");
|
||||
return Collections.singletonList("Text is null");
|
||||
}
|
||||
for (String input : Text) {
|
||||
output.add(PlaceholderAPI.setPlaceholders(player, input.replace("[prefix]", prefix).replace("&", "§")
|
||||
@ -51,8 +52,8 @@ public class Replace {
|
||||
}
|
||||
|
||||
|
||||
public static List replacePrice(String prefix,List<String> Text, String price) {
|
||||
List rp = new ArrayList();
|
||||
public static List<String> replacePrice(String prefix,List<String> Text, String price) {
|
||||
List<String> rp = new ArrayList();
|
||||
for (String s : Text) {
|
||||
rp.add(s.replace("[prefix]", prefix).replace("&", "§")
|
||||
.replace("[ue]", "ü").replace("[UE]", "Ü").replace("[oe]", "ö")
|
||||
@ -63,8 +64,8 @@ public class Replace {
|
||||
}
|
||||
|
||||
|
||||
public static List replacePrice(String prefix,Player player, List<String> Text, String price) {
|
||||
List rp = new ArrayList();
|
||||
public static List<String> replacePrice(String prefix,Player player, List<String> Text, String price) {
|
||||
List<String> rp = new ArrayList();
|
||||
for (String s : Text) {
|
||||
rp.add(PlaceholderAPI.setPlaceholders(player, s.replace("[prefix]", prefix).replace("&", "§")
|
||||
.replace("[ue]", "ü").replace("[UE]", "Ü").replace("[oe]", "ö")
|
||||
|
@ -33,7 +33,7 @@ public class Vault {
|
||||
}
|
||||
|
||||
public static void loadVault() throws InterruptedException {
|
||||
Long long_ = Long.valueOf(System.currentTimeMillis());
|
||||
long long_ = System.currentTimeMillis();
|
||||
if (Main.plugin.getServer().getPluginManager().getPlugin("Vault") != null) {
|
||||
vaultEnable = true;
|
||||
RegisteredServiceProvider<Economy> eco = Main.plugin.getServer().getServicesManager().getRegistration(Economy.class);
|
||||
@ -41,14 +41,14 @@ public class Vault {
|
||||
Main.eco = eco.getProvider();
|
||||
if (Main.eco != null) {
|
||||
connected = true;
|
||||
send.console(Main.prefix + " §2Vault / Economy successfully connected!" + " §7- §e" + (System.currentTimeMillis() - long_.longValue()) + "ms");
|
||||
send.console(Main.prefix + " §2Vault / Economy successfully connected!" + " §7- §e" + (System.currentTimeMillis() - long_) + "ms");
|
||||
} else {
|
||||
connected = false;
|
||||
send.console(Main.prefix + " §4Economy could not be connected / found! 1" + " §7- §e" + (System.currentTimeMillis() - long_.longValue()) + "ms");
|
||||
send.console(Main.prefix + " §4Economy could not be connected / found! 1" + " §7- §e" + (System.currentTimeMillis() - long_) + "ms");
|
||||
}
|
||||
} else {
|
||||
connected = false;
|
||||
send.console(Main.prefix + " §4Economy could not be connected / found! 2" + " §7- §e" + (System.currentTimeMillis() - long_.longValue()) + "ms");
|
||||
send.console(Main.prefix + " §4Economy could not be connected / found! 2" + " §7- §e" + (System.currentTimeMillis() - long_) + "ms");
|
||||
}
|
||||
RegisteredServiceProvider<Permission> perm = Main.plugin.getServer().getServicesManager().getRegistration(Permission.class);
|
||||
if (perm != null) {
|
||||
@ -57,7 +57,7 @@ public class Vault {
|
||||
} else {
|
||||
vaultEnable = false;
|
||||
connected = false;
|
||||
send.console(Main.prefix + " §4Vault could not be connected! 3" + " §7- §e" + (System.currentTimeMillis() - long_.longValue()) + "ms");
|
||||
send.console(Main.prefix + " §4Vault could not be connected! 3" + " §7- §e" + (System.currentTimeMillis() - long_) + "ms");
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -40,7 +40,7 @@ public class Config {
|
||||
}
|
||||
}
|
||||
|
||||
public static void set(String path, List value, YamlConfiguration YamlConfiguration) {
|
||||
public static void set(String path, List<String> value, YamlConfiguration YamlConfiguration) {
|
||||
if (!YamlConfiguration.contains(path)) {
|
||||
YamlConfiguration.set(path, value);
|
||||
}
|
||||
@ -93,16 +93,7 @@ public class Config {
|
||||
SOUND = sound1_9;
|
||||
} else SOUND = sound1_13;
|
||||
|
||||
try {
|
||||
Sound sound_Buy = Sound.valueOf(selectSoundFromConfig);
|
||||
if (sound_Buy != null) {
|
||||
return sound_Buy;
|
||||
} else return null;
|
||||
} catch (Exception e) {
|
||||
send.console("§4\n§4\n§4\n" + SelectLibMsg.SoundNotFound.replace("[prefix]", prefix)
|
||||
.replace("[sound]", "§8Buy: §6" + selectSoundFromConfig) + "§4\n§4\n§4\n");
|
||||
return Sound.valueOf(SOUND);
|
||||
}
|
||||
return checkSound(SOUND, selectSoundFromConfig, prefix);
|
||||
}
|
||||
|
||||
public static Sound checkSound(String sound1_8, String sound1_13, String selectSoundFromConfig, String prefix) {
|
||||
@ -111,24 +102,12 @@ public class Config {
|
||||
SOUND = sound1_8;
|
||||
} else SOUND = sound1_13;
|
||||
|
||||
try {
|
||||
Sound sound_Buy = Sound.valueOf(selectSoundFromConfig);
|
||||
if (sound_Buy != null) {
|
||||
return sound_Buy;
|
||||
} else return null;
|
||||
} catch (Exception e) {
|
||||
send.console("§4\n§4\n§4\n" + SelectLibMsg.SoundNotFound.replace("[prefix]", prefix)
|
||||
.replace("[sound]", "§8Buy: §6" + selectSoundFromConfig) + "§4\n§4\n§4\n");
|
||||
return Sound.valueOf(SOUND);
|
||||
}
|
||||
return checkSound(SOUND, selectSoundFromConfig, prefix);
|
||||
}
|
||||
|
||||
public static Sound checkSound(String sound, String selectSoundFromConfig, String prefix) {
|
||||
try {
|
||||
Sound sound_Buy = Sound.valueOf(selectSoundFromConfig);
|
||||
if (sound_Buy != null) {
|
||||
return sound_Buy;
|
||||
} else return null;
|
||||
return Sound.valueOf(selectSoundFromConfig);
|
||||
} catch (Exception e) {
|
||||
send.console("§4\n§4\n§4\n" + SelectLibMsg.SoundNotFound.replace("[prefix]", prefix)
|
||||
.replace("[sound]", "§8Buy: §6" + selectSoundFromConfig) + "§4\n§4\n§4\n");
|
||||
@ -153,8 +132,8 @@ public class Config {
|
||||
return (yamlConfiguration.getDouble(path));
|
||||
}
|
||||
|
||||
public static List selectList(String path, YamlConfiguration yamlConfiguration) {
|
||||
return (yamlConfiguration.getList(path));
|
||||
public static List<String> selectList(String path, YamlConfiguration yamlConfiguration) {
|
||||
return (yamlConfiguration.getStringList(path));
|
||||
}
|
||||
|
||||
public static ItemStack selectItemStack(String path, YamlConfiguration yamlConfiguration) {
|
||||
@ -162,7 +141,7 @@ public class Config {
|
||||
}
|
||||
|
||||
|
||||
public static List selectList(String prefix, String path, YamlConfiguration yamlConfiguration) {
|
||||
public static List<String> selectList(String prefix, String path, YamlConfiguration yamlConfiguration) {
|
||||
List<String> output = new ArrayList<>();
|
||||
List<String> input = yamlConfiguration.getStringList(path);
|
||||
for (String st : input) {
|
||||
@ -171,7 +150,7 @@ public class Config {
|
||||
return output;
|
||||
}
|
||||
|
||||
public static void select(String prefix, List value, String path, YamlConfiguration yamlConfiguration) {
|
||||
public static void select(String prefix, List<String> value, String path, YamlConfiguration yamlConfiguration) {
|
||||
List<String> output = new ArrayList<>();
|
||||
List<String> input = yamlConfiguration.getStringList(path);
|
||||
for (String st : input) {
|
||||
|
@ -1,5 +1,5 @@
|
||||
name: T2CodeLib
|
||||
version: 7.4
|
||||
version: 7.5
|
||||
main: net.t2code.lib.Bungee.BMain
|
||||
author: JaTiTV, Jkobs
|
||||
description: Libarie from T2Code Plugins
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@ -1,5 +1,5 @@
|
||||
name: T2CodeLib
|
||||
version: 7.4
|
||||
version: 7.5
|
||||
main: net.t2code.lib.Spigot.system.Main
|
||||
api-version: 1.13
|
||||
prefix: T2CodeLib
|
||||
|
Loading…
Reference in New Issue
Block a user