9
0
mirror of https://github.com/HibiscusMC/HMCCosmetics.git synced 2025-12-23 00:49:28 +00:00

fix: bump HMCColor & implement API-changes

This commit is contained in:
Boy
2024-01-14 01:45:44 +01:00
parent 442cddb81e
commit 485f5837f4
5 changed files with 3 additions and 5 deletions

View File

@@ -8,7 +8,7 @@ plugins {
} }
group = "com.hibiscusmc" group = "com.hibiscusmc"
version = "2.7.0" version = "2.7.1"
allprojects { allprojects {
apply(plugin = "java") apply(plugin = "java")

View File

@@ -113,9 +113,7 @@ public class CosmeticCommand implements CommandExecutor {
if (!textColor.contains("#") && Hooks.isActiveHook("HMCColor")) { if (!textColor.contains("#") && Hooks.isActiveHook("HMCColor")) {
HMCColorConfig.Colors colors = HMCColorContextKt.getHmcColor().getConfig().getColors().get(textColor); HMCColorConfig.Colors colors = HMCColorContextKt.getHmcColor().getConfig().getColors().get(textColor);
if (colors != null) { if (colors != null) {
String hmccolor = colors.getBaseColor().getColor(); color = colors.getBaseColor().getColor();
if (hmccolor.contains("#")) color = HMCCServerUtils.hex2Rgb(hmccolor);
else color = HMCCServerUtils.rgbToRgb(hmccolor);
} }
} else { } else {
color = HMCCServerUtils.hex2Rgb(textColor); color = HMCCServerUtils.hex2Rgb(textColor);

View File

@@ -31,7 +31,7 @@ public class DyeMenu {
ItemStack originalItem = user.getUserCosmeticItem(cosmetic); ItemStack originalItem = user.getUserCosmeticItem(cosmetic);
if (originalItem == null || !cosmetic.isDyable()) return; if (originalItem == null || !cosmetic.isDyable()) return;
Gui gui = HMCColorApi.INSTANCE.colorMenu(player); Gui gui = HMCColorApi.createColorMenu(player);
gui.updateTitle(Hooks.processPlaceholders(player, Settings.getDyeMenuName())); gui.updateTitle(Hooks.processPlaceholders(player, Settings.getDyeMenuName()));
gui.setItem(Settings.getDyeMenuInputSlot(), new GuiItem(originalItem)); gui.setItem(Settings.getDyeMenuInputSlot(), new GuiItem(originalItem));
gui.setDefaultTopClickAction(event -> { gui.setDefaultTopClickAction(event -> {

Binary file not shown.

BIN
lib/HMCColor-0.8.6.jar Normal file

Binary file not shown.