mirror of
https://github.com/PaperMC/Paper.git
synced 2025-08-14 19:55:52 -07:00
SPIGOT-918: Add constructor for DyeColor to Dye
By: t7seven7t <t7seven7t@gmail.com>
This commit is contained in:
@@ -44,6 +44,13 @@ public class Dye extends MaterialData implements Colorable {
|
|||||||
super(type, data);
|
super(type, data);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param color color of the dye
|
||||||
|
*/
|
||||||
|
public Dye(final DyeColor color) {
|
||||||
|
super(Material.INK_SACK, color.getDyeData());
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Gets the current color of this dye
|
* Gets the current color of this dye
|
||||||
*
|
*
|
||||||
|
@@ -57,6 +57,7 @@ public class DyeColorTest {
|
|||||||
@Test
|
@Test
|
||||||
public void getDyeDyeColor() {
|
public void getDyeDyeColor() {
|
||||||
testColorable(new Dye(Material.INK_SACK, dye.getDyeData()));
|
testColorable(new Dye(Material.INK_SACK, dye.getDyeData()));
|
||||||
|
testColorable(new Dye(dye));
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
|
Reference in New Issue
Block a user