mirror of
https://github.com/HibiscusMC/HMCCosmetics.git
synced 2025-12-23 08:59:20 +00:00
fix: bump HMCColor & implement API-changes
This commit is contained in:
@@ -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")
|
||||||
|
|||||||
@@ -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);
|
||||||
|
|||||||
@@ -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
BIN
lib/HMCColor-0.8.6.jar
Normal file
Binary file not shown.
Reference in New Issue
Block a user