Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
f1496dd
commit a183066
Showing
2 changed files
with
25 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
17 changes: 17 additions & 0 deletions
17
plugin/src/main/java/net/aufdemrand/denizen/utilities/ParrotHelper.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
package net.aufdemrand.denizen.utilities; | ||
|
||
import net.aufdemrand.denizen.objects.dEntity; | ||
import net.aufdemrand.denizencore.objects.Mechanism; | ||
import org.bukkit.entity.Parrot; | ||
|
||
public class ParrotHelper { | ||
|
||
public static String parrotColor(dEntity colored) { | ||
return ((Parrot) colored.getBukkitEntity()).getVariant().name(); | ||
} | ||
|
||
public static void setParrotColor(dEntity colored, Mechanism mechanism) { | ||
((Parrot) colored.getBukkitEntity()) | ||
.setVariant(Parrot.Variant.valueOf(mechanism.getValue().asString().toUpperCase())); | ||
} | ||
} |