diff --git a/build.gradle b/build.gradle
index 7c417ac59..520a0f5da 100644
--- a/build.gradle
+++ b/build.gradle
@@ -1 +1 @@
-allprojects {
apply plugin: 'java'
apply plugin: 'eclipse'
apply plugin: 'idea'
group = 'be.isach'
version = '2.4.9-RELEASE'
compileJava.options.encoding = 'UTF-8'
sourceCompatibility = 1.8
targetCompatibility = 1.8
configurations {
shaded
compile.extendsFrom shaded
}
afterEvaluate {
jar {
dependsOn configurations.shaded
from configurations.shaded.collect {
it.isDirectory() ?
it :
zipTree(it)
}
}
}
}
boolean local = false
if (local) libsDirName = '/Users/sacha/Documents/Development/Java/UC_1_11/testserver/plugins'
dependencies {
subprojects.each { p ->
shaded(p) {
transitive false
}
}
}
subprojects {
repositories {
mavenLocal()
mavenCentral()
// Vault
maven {
url 'http://nexus.hc.to/content/repositories/pub_releases'
}
// Lib's Disguises
maven {
url 'http://repo.md-5.net/content/groups/public/'
}
// Use BuildTools to download Spigot to your local maven repository. More information: https://www.spigotmc.org/wiki/buildtools/
// BungeeCord
maven {
url 'https://oss.sonatype.org/content/repositories/snapshots'
}
}
}
\ No newline at end of file
+allprojects {
apply plugin: 'java'
apply plugin: 'eclipse'
apply plugin: 'idea'
group = 'be.isach'
version = '2.5.0-RELEASE'
compileJava.options.encoding = 'UTF-8'
sourceCompatibility = 1.8
targetCompatibility = 1.8
configurations {
shaded
compile.extendsFrom shaded
}
afterEvaluate {
jar {
dependsOn configurations.shaded
from configurations.shaded.collect {
it.isDirectory() ?
it :
zipTree(it)
}
}
}
}
boolean local = false
if (local) libsDirName = '/Users/sacha/Documents/Development/Java/UC_1_11/testserver/plugins'
dependencies {
subprojects.each { p ->
shaded(p) {
transitive false
}
}
}
subprojects {
repositories {
mavenLocal()
mavenCentral()
// Vault
maven {
url 'http://nexus.hc.to/content/repositories/pub_releases'
}
// Lib's Disguises
maven {
url 'http://repo.md-5.net/content/groups/public/'
}
// Use BuildTools to download Spigot to your local maven repository. More information: https://www.spigotmc.org/wiki/buildtools/
// BungeeCord
maven {
url 'https://oss.sonatype.org/content/repositories/snapshots'
}
}
}
\ No newline at end of file
diff --git a/core/build.gradle b/core/build.gradle
index 3f58b8c42..5fdf3f550 100644
--- a/core/build.gradle
+++ b/core/build.gradle
@@ -1,6 +1,6 @@
dependencies {
compile 'org.spigotmc:spigot:1.12-R0.1-SNAPSHOT'
- compile('LibsDisguises:LibsDisguises:9.0.7') {
+ compile('LibsDisguises:LibsDisguises:9.4.0') {
exclude group: 'org.spigotmc'
exclude group: 'com.comphenix.protocol'
}
diff --git a/core/src/main/java/be/isach/ultracosmetics/CosmeticManager.java b/core/src/main/java/be/isach/ultracosmetics/CosmeticManager.java
index 10b7702b0..e51ae143a 100644
--- a/core/src/main/java/be/isach/ultracosmetics/CosmeticManager.java
+++ b/core/src/main/java/be/isach/ultracosmetics/CosmeticManager.java
@@ -1,14 +1,8 @@
package be.isach.ultracosmetics;
import be.isach.ultracosmetics.cosmetics.Category;
-import be.isach.ultracosmetics.cosmetics.type.EmoteType;
-import be.isach.ultracosmetics.cosmetics.type.GadgetType;
-import be.isach.ultracosmetics.cosmetics.type.HatType;
-import be.isach.ultracosmetics.cosmetics.type.MorphType;
-import be.isach.ultracosmetics.cosmetics.type.MountType;
-import be.isach.ultracosmetics.cosmetics.type.ParticleEffectType;
-import be.isach.ultracosmetics.cosmetics.type.PetType;
-import be.isach.ultracosmetics.cosmetics.type.SuitType;
+import be.isach.ultracosmetics.cosmetics.Cosmetic;
+import be.isach.ultracosmetics.cosmetics.type.*;
import java.io.IOException;
import java.util.ArrayList;
@@ -45,14 +39,16 @@ public void setupCosmeticsConfigs() {
ultraCosmetics.getConfig().addDefault("Ammo-System-For-Gadgets.Show-Ammo-In-Menu-As-Item-Amount", true, "Do you want that in the gadgets menu", "each gadget item has an amount", "corresponding to your ammo.");
// CALL STATIC BLOCK.
- GadgetType.ANTIGRAVITY.getConfigName();
- MountType.DRAGON.getConfigName();
- ParticleEffectType.ANGELWINGS.getConfigName();
- PetType.CHICK.getConfigName();
- SuitType.ASTRONAUT.getConfigName();
+ GadgetType.register();
+ MountType.register();
+ ParticleEffectType.register();
+ PetType.register();
+ HatType.register();
+ SuitType.register();
EmoteType.ANGRY.getConfigName();
if (Category.MORPHS.isEnabled()) {
- MorphType.BAT.getConfigName();
+ MorphType.register();
+ // MorphType.valueOf("bat").getConfigName();
}
for (GadgetType gadgetType : GadgetType.values()) {
@@ -60,7 +56,7 @@ public void setupCosmeticsConfigs() {
ultraCosmetics.getConfig().addDefault("Gadgets." + gadgetType.getConfigName() + ".Enabled", true, "if true, the gadget will be enabled.");
ultraCosmetics.getConfig().addDefault("Gadgets." + gadgetType.getConfigName() + ".Show-Description", true, "if true, the description of gadget will be showed.");
ultraCosmetics.getConfig().addDefault("Gadgets." + gadgetType.getConfigName() + ".Can-Be-Found-In-Treasure-Chests", true, "if true, it'll be possible to find", "it in treasure chests");
- if (gadgetType == GadgetType.PAINTBALLGUN) {
+ if (gadgetType == GadgetType.valueOf("paintballgun")) {
ultraCosmetics.getConfig().addDefault("Gadgets." + gadgetType.getConfigName() + ".Block-Type", "STAINED_CLAY", "With what block will it paint?");
ultraCosmetics.getConfig().addDefault("Gadgets." + gadgetType.getConfigName() + ".Particle.Enabled", false, "Should it display particles?");
ultraCosmetics.getConfig().addDefault("Gadgets." + gadgetType.getConfigName() + ".Particle.Effect", "FIREWORKS_SPARK", "what particles? (List: http://pastebin.com/CVKkufck)");
diff --git a/core/src/main/java/be/isach/ultracosmetics/command/subcommands/SubCommandClear.java b/core/src/main/java/be/isach/ultracosmetics/command/subcommands/SubCommandClear.java
index d493cdbc0..00de0c5a1 100644
--- a/core/src/main/java/be/isach/ultracosmetics/command/subcommands/SubCommandClear.java
+++ b/core/src/main/java/be/isach/ultracosmetics/command/subcommands/SubCommandClear.java
@@ -2,6 +2,7 @@
import be.isach.ultracosmetics.UltraCosmetics;
import be.isach.ultracosmetics.command.SubCommand;
+import be.isach.ultracosmetics.cosmetics.suits.ArmorSlot;
import be.isach.ultracosmetics.player.UltraPlayer;
import org.bukkit.Bukkit;
import org.bukkit.ChatColor;
@@ -57,12 +58,13 @@ private void common(CommandSender sender, String... args) {
else if (s.startsWith("pa")) up.removeParticleEffect();
else if (s.startsWith("pe")) up.removePet();
else if (s.startsWith("h")) up.removeHat();
- else if (s.startsWith("s")) up.removeSuit();
+ else if (s.startsWith("s") && !s.contains(":")) up.removeSuit();
+ else if (s.startsWith("s") && s.contains(":")) up.removeSuit(ArmorSlot.getByName(s.split(":")[1]));
else if (s.startsWith("mor")) up.removeMorph();
else if (s.startsWith("mou")) up.removeMount();
else if (s.startsWith("e")) up.removeEmote();
else {
- sender.sendMessage(ChatColor.RED + "" + ChatColor.BOLD + "/uc menu