
org.bukkit.material.Wool Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of walk-server Show documentation
Show all versions of walk-server Show documentation
A spigot fork to kotlin structure and news.
package org.bukkit.material;
import org.bukkit.DyeColor;
import org.bukkit.Material;
/**
* Represents a Wool/Cloth block
*/
public class Wool extends MaterialData implements Colorable {
public Wool() {
super(Material.WOOL);
}
public Wool(DyeColor color) {
this();
setColor(color);
}
/**
* @param type the raw type id
* @deprecated Magic value
*/
@Deprecated
public Wool(final int type) {
super(type);
}
public Wool(final Material type) {
super(type);
}
/**
* @param type the raw type id
* @param data the raw data value
* @deprecated Magic value
*/
@Deprecated
public Wool(final int type, final byte data) {
super(type, data);
}
/**
* @param type the type
* @param data the raw data value
* @deprecated Magic value
*/
@Deprecated
public Wool(final Material type, final byte data) {
super(type, data);
}
/**
* Gets the current color of this dye
*
* @return DyeColor of this dye
*/
public DyeColor getColor() {
return DyeColor.getByWoolData(getData());
}
/**
* Sets the color of this dye
*
* @param color New color of this dye
*/
public void setColor(DyeColor color) {
setData(color.getWoolData());
}
@Override
public String toString() {
return getColor() + " " + super.toString();
}
@Override
public Wool clone() {
return (Wool) super.clone();
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy