mirror of
https://github.com/filoghost/ChestCommands.git
synced 2024-11-25 19:45:44 +01:00
Support colors in PERMISSION-MESSAGE
This commit is contained in:
parent
2ec403ba8e
commit
b90fa741c5
@ -6,18 +6,19 @@
|
||||
package me.filoghost.chestcommands.attribute;
|
||||
|
||||
import me.filoghost.chestcommands.icon.InternalConfigurableIcon;
|
||||
import me.filoghost.fcommons.Colors;
|
||||
|
||||
public class ClickPermissionMessageAttribute implements IconAttribute {
|
||||
|
||||
private final String clickPermissionMessage;
|
||||
private final String message;
|
||||
|
||||
public ClickPermissionMessageAttribute(String clickPermissionMessage, AttributeErrorHandler errorHandler) {
|
||||
this.clickPermissionMessage = clickPermissionMessage;
|
||||
public ClickPermissionMessageAttribute(String serializedMessage, AttributeErrorHandler errorHandler) {
|
||||
this.message = Colors.addColors(serializedMessage);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void apply(InternalConfigurableIcon icon) {
|
||||
icon.setNoClickPermissionMessage(clickPermissionMessage);
|
||||
icon.setNoClickPermissionMessage(message);
|
||||
}
|
||||
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user