geforkt von Mirrors/Paper
Add method to get defult leather color. Adds BUKKIT-3203
The default leather color is already used internally in place of null. The javadocs were updated appropriately to indicate as such. By: Wesley Wolfe <weswolf@aol.com>
Dieser Commit ist enthalten in:
Ursprung
ac2908b781
Commit
ba8db742e4
@ -1,5 +1,6 @@
|
|||||||
package org.bukkit.inventory;
|
package org.bukkit.inventory;
|
||||||
|
|
||||||
|
import org.bukkit.Color;
|
||||||
import org.bukkit.Material;
|
import org.bukkit.Material;
|
||||||
import org.bukkit.Server;
|
import org.bukkit.Server;
|
||||||
import org.bukkit.inventory.meta.BookMeta;
|
import org.bukkit.inventory.meta.BookMeta;
|
||||||
@ -79,4 +80,11 @@ public interface ItemFactory {
|
|||||||
* @throws IllegalArgumentException if the specified meta was not created by this factory
|
* @throws IllegalArgumentException if the specified meta was not created by this factory
|
||||||
*/
|
*/
|
||||||
ItemMeta asMetaFor(final ItemMeta meta, final Material material) throws IllegalArgumentException;
|
ItemMeta asMetaFor(final ItemMeta meta, final Material material) throws IllegalArgumentException;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Returns the default color for all leather armor.
|
||||||
|
*
|
||||||
|
* @return the default color for leather armor
|
||||||
|
*/
|
||||||
|
Color getDefaultLeatherColor();
|
||||||
}
|
}
|
||||||
|
@ -2,6 +2,7 @@ package org.bukkit.inventory.meta;
|
|||||||
|
|
||||||
import org.bukkit.Color;
|
import org.bukkit.Color;
|
||||||
import org.bukkit.Material;
|
import org.bukkit.Material;
|
||||||
|
import org.bukkit.inventory.ItemFactory;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Represents leather armor ({@link Material#LEATHER_BOOTS}, {@link Material#LEATHER_CHESTPLATE}, {@link Material#LEATHER_HELMET}, or {@link Material#LEATHER_LEGGINGS}) that can be colored.
|
* Represents leather armor ({@link Material#LEATHER_BOOTS}, {@link Material#LEATHER_CHESTPLATE}, {@link Material#LEATHER_HELMET}, or {@link Material#LEATHER_LEGGINGS}) that can be colored.
|
||||||
@ -9,16 +10,16 @@ import org.bukkit.Material;
|
|||||||
public interface LeatherArmorMeta extends ItemMeta {
|
public interface LeatherArmorMeta extends ItemMeta {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Gets the color of the armor
|
* Gets the color of the armor. If it has not been set otherwise, it will be {@link ItemFactory#getDefaultLeatherColor()}.
|
||||||
*
|
*
|
||||||
* @return the color of the armor, never null
|
* @return the color of the armor, never null
|
||||||
*/
|
*/
|
||||||
Color getColor();
|
Color getColor();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Sets the color of the armor
|
* Sets the color of the armor.
|
||||||
*
|
*
|
||||||
* @param color the color to set, null makes it the default leather color
|
* @param color the color to set. Setting it to null is equivalent to setting it to {@link ItemFactory#getDefaultLeatherColor()}.
|
||||||
*/
|
*/
|
||||||
void setColor(Color color);
|
void setColor(Color color);
|
||||||
|
|
||||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren