mirror of
https://github.com/HibiscusMC/HMCCosmetics.git
synced 2025-12-26 02:19:25 +00:00
Compare commits
10 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
0a488a6791 | ||
|
|
1c9989e64a | ||
|
|
17179cbe35 | ||
|
|
f589696d19 | ||
|
|
68e87cba6f | ||
|
|
63a0bdd0d5 | ||
|
|
a607f2dcbd | ||
|
|
7a9a002e25 | ||
|
|
fd50cd058a | ||
|
|
970ca8227b |
@@ -8,7 +8,7 @@ plugins {
|
|||||||
}
|
}
|
||||||
|
|
||||||
group = "com.hibiscusmc"
|
group = "com.hibiscusmc"
|
||||||
version = "2.2.0"
|
version = "2.2.1"
|
||||||
|
|
||||||
allprojects {
|
allprojects {
|
||||||
apply(plugin = "java")
|
apply(plugin = "java")
|
||||||
|
|||||||
@@ -25,6 +25,8 @@ public class Settings {
|
|||||||
private static final String PARTICLE_COUNT = "particle-count";
|
private static final String PARTICLE_COUNT = "particle-count";
|
||||||
private static final String DYE_MENU_PATH = "dye-menu";
|
private static final String DYE_MENU_PATH = "dye-menu";
|
||||||
private static final String DYE_MENU_NAME = "title";
|
private static final String DYE_MENU_NAME = "title";
|
||||||
|
private static final String DYE_MENU_INPUT_SLOT = "input-slot";
|
||||||
|
private static final String DYE_MENU_OUTPUT_SLOT = "output-slot";
|
||||||
private static final String DEBUG_ENABLE_PETH = "debug-mode";
|
private static final String DEBUG_ENABLE_PETH = "debug-mode";
|
||||||
private static final String TICK_PERIOD_PATH = "tick-period";
|
private static final String TICK_PERIOD_PATH = "tick-period";
|
||||||
private static final String UNAPPLY_DEATH_PATH = "unapply-on-death";
|
private static final String UNAPPLY_DEATH_PATH = "unapply-on-death";
|
||||||
@@ -33,6 +35,8 @@ public class Settings {
|
|||||||
|
|
||||||
private static String defaultMenu;
|
private static String defaultMenu;
|
||||||
private static String dyeMenuName;
|
private static String dyeMenuName;
|
||||||
|
private static int dyeMenuInputSlot;
|
||||||
|
private static int dyeMenuOutputSlot;
|
||||||
private static int configVersion;
|
private static int configVersion;
|
||||||
private static boolean requireEmptyHelmet;
|
private static boolean requireEmptyHelmet;
|
||||||
private static boolean requireEmptyOffHand;
|
private static boolean requireEmptyOffHand;
|
||||||
@@ -85,6 +89,8 @@ public class Settings {
|
|||||||
ConfigurationNode dyeMenuSettings = source.node(DYE_MENU_PATH);
|
ConfigurationNode dyeMenuSettings = source.node(DYE_MENU_PATH);
|
||||||
|
|
||||||
dyeMenuName = dyeMenuSettings.node(DYE_MENU_NAME).getString("Dye Menu");
|
dyeMenuName = dyeMenuSettings.node(DYE_MENU_NAME).getString("Dye Menu");
|
||||||
|
dyeMenuInputSlot = dyeMenuSettings.node(DYE_MENU_INPUT_SLOT).getInt(19);
|
||||||
|
dyeMenuOutputSlot = dyeMenuSettings.node(DYE_MENU_OUTPUT_SLOT).getInt(25);
|
||||||
}
|
}
|
||||||
|
|
||||||
private static Vector loadVector(final ConfigurationNode config) {
|
private static Vector loadVector(final ConfigurationNode config) {
|
||||||
@@ -178,6 +184,8 @@ public class Settings {
|
|||||||
public static String getDyeMenuName() {
|
public static String getDyeMenuName() {
|
||||||
return dyeMenuName;
|
return dyeMenuName;
|
||||||
}
|
}
|
||||||
|
public static int getDyeMenuInputSlot() { return dyeMenuInputSlot; }
|
||||||
|
public static int getDyeMenuOutputSlot() { return dyeMenuOutputSlot; }
|
||||||
|
|
||||||
public static boolean isDebugEnabled() {
|
public static boolean isDebugEnabled() {
|
||||||
return debugMode;
|
return debugMode;
|
||||||
|
|||||||
@@ -30,10 +30,10 @@ public class DyeMenu {
|
|||||||
Player player = user.getPlayer();
|
Player player = user.getPlayer();
|
||||||
Gui gui = HMCColorApi.INSTANCE.colorMenu();
|
Gui gui = HMCColorApi.INSTANCE.colorMenu();
|
||||||
gui.updateTitle(Placeholder.applyPapiPlaceholders(player, Settings.getDyeMenuName()));
|
gui.updateTitle(Placeholder.applyPapiPlaceholders(player, Settings.getDyeMenuName()));
|
||||||
gui.setItem(19, new GuiItem(originalItem));
|
gui.setItem(Settings.getDyeMenuInputSlot(), new GuiItem(originalItem));
|
||||||
gui.setDefaultTopClickAction(event -> {
|
gui.setDefaultTopClickAction(event -> {
|
||||||
if (event.getSlot() == 25) {
|
if (event.getSlot() == Settings.getDyeMenuOutputSlot()) {
|
||||||
ItemStack item = event.getInventory().getItem(25);
|
ItemStack item = event.getInventory().getItem(Settings.getDyeMenuOutputSlot());
|
||||||
if (item == null) return;
|
if (item == null) return;
|
||||||
ItemMeta meta = item.getItemMeta();
|
ItemMeta meta = item.getItemMeta();
|
||||||
if (meta == null) return;
|
if (meta == null) return;
|
||||||
|
|||||||
@@ -16,6 +16,7 @@ public class Hooks {
|
|||||||
private static HashMap<String, Hook> hooks = new HashMap<>();
|
private static HashMap<String, Hook> hooks = new HashMap<>();
|
||||||
private static HookOraxen ORAXEN_HOOK = new HookOraxen();
|
private static HookOraxen ORAXEN_HOOK = new HookOraxen();
|
||||||
private static HookItemAdder ITEMADDER_HOOK = new HookItemAdder();
|
private static HookItemAdder ITEMADDER_HOOK = new HookItemAdder();
|
||||||
|
private static HookLooty LOOTY_HOOK = new HookLooty();
|
||||||
private static HookMythic MYTHIC_HOOK = new HookMythic();
|
private static HookMythic MYTHIC_HOOK = new HookMythic();
|
||||||
private static HookHMCCosmetics HMCCOSMETIC_HOOK = new HookHMCCosmetics();
|
private static HookHMCCosmetics HMCCOSMETIC_HOOK = new HookHMCCosmetics();
|
||||||
private static HookPlaceholderAPI PAPI_HOOK = new HookPlaceholderAPI();
|
private static HookPlaceholderAPI PAPI_HOOK = new HookPlaceholderAPI();
|
||||||
@@ -65,7 +66,8 @@ public class Hooks {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public static boolean isActiveHook(String id) {
|
public static boolean isActiveHook(String id) {
|
||||||
if (!hooks.containsKey(getHook(id))) return false;
|
Hook hook = getHook(id);
|
||||||
return hooks.get(getHook(id)).getActive();
|
if (hook == null) return false;
|
||||||
|
return hook.getActive();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ import com.hibiscusmc.hmccosmetics.hooks.Hook;
|
|||||||
public class HookPlaceholderAPI extends Hook {
|
public class HookPlaceholderAPI extends Hook {
|
||||||
|
|
||||||
public HookPlaceholderAPI() {
|
public HookPlaceholderAPI() {
|
||||||
super("placeholderapi");
|
super("PlaceholderAPI");
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|||||||
@@ -38,6 +38,8 @@ dye-menu:
|
|||||||
# If you use ItemsAdder, set this to "§f:offset_-8::cosmetics_gui:"
|
# If you use ItemsAdder, set this to "§f:offset_-8::cosmetics_gui:"
|
||||||
# If you use Oraxen, set this to "<glyph:neg_shift_8><glyph:dye_menu>"
|
# If you use Oraxen, set this to "<glyph:neg_shift_8><glyph:dye_menu>"
|
||||||
title: "§f"
|
title: "§f"
|
||||||
|
input-slot: 19
|
||||||
|
output-slot: 25
|
||||||
wardrobe:
|
wardrobe:
|
||||||
# spawn static wardrobe if in this radius of wardrobe-location
|
# spawn static wardrobe if in this radius of wardrobe-location
|
||||||
static-radius: 10
|
static-radius: 10
|
||||||
@@ -81,4 +83,4 @@ wardrobe:
|
|||||||
y: 5
|
y: 5
|
||||||
z: 5
|
z: 5
|
||||||
yaw: 0
|
yaw: 0
|
||||||
pitch: 0
|
pitch: 0
|
||||||
|
|||||||
@@ -101,4 +101,13 @@ meditate:
|
|||||||
animation: meditate
|
animation: meditate
|
||||||
thinking:
|
thinking:
|
||||||
slot: EMOTE
|
slot: EMOTE
|
||||||
animation: thinking
|
animation: thinking
|
||||||
|
explorer_backpack:
|
||||||
|
slot: BACKPACK
|
||||||
|
permission: "hmccosmetics.explorer_backpack"
|
||||||
|
dyeable: true
|
||||||
|
item:
|
||||||
|
material: LEATHER_HORSE_ARMOR
|
||||||
|
model-data: 3
|
||||||
|
name: "<white>Explorer's Backpack"
|
||||||
|
amount: 1
|
||||||
@@ -156,4 +156,15 @@ items:
|
|||||||
material: PAPER
|
material: PAPER
|
||||||
name: "<blue>Thinking Emote"
|
name: "<blue>Thinking Emote"
|
||||||
type: cosmetic
|
type: cosmetic
|
||||||
cosmetic: thinking
|
cosmetic: thinking
|
||||||
|
explorer_backpack:
|
||||||
|
slots:
|
||||||
|
- 15
|
||||||
|
item:
|
||||||
|
material: hmccosmetics:explorer_backpack
|
||||||
|
lore:
|
||||||
|
- ""
|
||||||
|
- "<gray>Enabled: <#6D9DC5>%HMCCosmetics_equipped_explorer_backpack%"
|
||||||
|
- "<gray>Allowed: <#6D9DC5>%HMCCosmetics_unlocked_explorer_backpack%"
|
||||||
|
type: cosmetic
|
||||||
|
cosmetic: explorer_backpack
|
||||||
@@ -4,6 +4,7 @@ pluginManagement {
|
|||||||
maven("https://repo.papermc.io/repository/maven-public/")
|
maven("https://repo.papermc.io/repository/maven-public/")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
rootProject.name = "HMCCosmetics"
|
rootProject.name = "HMCCosmetics"
|
||||||
include(
|
include(
|
||||||
"common",
|
"common",
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
plugins {
|
plugins {
|
||||||
id("java")
|
id("java")
|
||||||
id("io.papermc.paperweight.userdev") version "1.3.8"
|
id("io.papermc.paperweight.userdev") version "1.5.1"
|
||||||
}
|
}
|
||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
plugins {
|
plugins {
|
||||||
id("java")
|
id("java")
|
||||||
id("io.papermc.paperweight.userdev") version "1.3.8"
|
id("io.papermc.paperweight.userdev") version "1.5.1"
|
||||||
}
|
}
|
||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
plugins {
|
plugins {
|
||||||
id("java")
|
id("java")
|
||||||
id("io.papermc.paperweight.userdev") version "1.3.8"
|
id("io.papermc.paperweight.userdev") version "1.5.1"
|
||||||
}
|
}
|
||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
plugins {
|
plugins {
|
||||||
id("java")
|
id("java")
|
||||||
id("io.papermc.paperweight.userdev") version "1.3.8"
|
id("io.papermc.paperweight.userdev") version "1.5.1"
|
||||||
}
|
}
|
||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
|
|||||||
Reference in New Issue
Block a user