mirror of
https://github.com/PaperMC/Paper.git
synced 2025-01-20 23:46:57 +01:00
SPIGOT-918: Add constructor for DyeColor to Dye
By: t7seven7t <t7seven7t@gmail.com>
This commit is contained in:
parent
5ec19def07
commit
5232a2cbba
2 changed files with 8 additions and 0 deletions
|
@ -44,6 +44,13 @@ public class Dye extends MaterialData implements Colorable {
|
|||
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
|
||||
*
|
||||
|
|
|
@ -57,6 +57,7 @@ public class DyeColorTest {
|
|||
@Test
|
||||
public void getDyeDyeColor() {
|
||||
testColorable(new Dye(Material.INK_SACK, dye.getDyeData()));
|
||||
testColorable(new Dye(dye));
|
||||
}
|
||||
|
||||
@Test
|
||||
|
|
Loading…
Reference in a new issue