mirror of
https://github.com/Minestom/Minestom.git
synced 2024-11-05 18:32:28 +01:00
Added LeatherArmorMeta getter for color
This commit is contained in:
parent
6cc315fe78
commit
4c10418bf8
@ -132,7 +132,9 @@ public class ChatHoverEvent {
|
||||
{
|
||||
if (hasMeta && itemMeta instanceof LeatherArmorMeta) {
|
||||
final LeatherArmorMeta leatherArmorMeta = (LeatherArmorMeta) itemMeta;
|
||||
// TODO: Color
|
||||
if (leatherArmorMeta.isModified()) {
|
||||
// TODO: Color
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -25,9 +25,48 @@ public class LeatherArmorMeta implements ItemMeta {
|
||||
* Reset the color to the default leather one
|
||||
*/
|
||||
public void reset() {
|
||||
this.r = 0;
|
||||
this.g = 0;
|
||||
this.b = 0;
|
||||
this.modified = false;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the red component
|
||||
*
|
||||
* @return the red component
|
||||
*/
|
||||
public int getRed() {
|
||||
return r;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the green component
|
||||
*
|
||||
* @return the green component
|
||||
*/
|
||||
public int getGreen() {
|
||||
return g;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the blue component
|
||||
*
|
||||
* @return the blue component
|
||||
*/
|
||||
public int getBlue() {
|
||||
return b;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get if the color of this armor piece have been changed
|
||||
*
|
||||
* @return true if the color has been changed, false otherwise
|
||||
*/
|
||||
public boolean isModified() {
|
||||
return modified;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean hasNbt() {
|
||||
return modified;
|
||||
|
Loading…
Reference in New Issue
Block a user