[Bleeding] Added Sheep, Shear and EntityChangeBlock API. Thanks tips48! Closes BUKKIT-512
This commit is contained in:
58
src/main/java/org/bukkit/event/entity/SheepDyeWoolEvent.java
Normal file
58
src/main/java/org/bukkit/event/entity/SheepDyeWoolEvent.java
Normal file
@@ -0,0 +1,58 @@
|
||||
package org.bukkit.event.entity;
|
||||
|
||||
import org.bukkit.DyeColor;
|
||||
import org.bukkit.entity.Entity;
|
||||
import org.bukkit.event.Cancellable;
|
||||
import org.bukkit.event.HandlerList;
|
||||
|
||||
@SuppressWarnings("serial")
|
||||
/**
|
||||
* Called when a sheep's wool is dyed
|
||||
*/
|
||||
public class SheepDyeWoolEvent extends EntityEvent implements Cancellable {
|
||||
private static final HandlerList handlers = new HandlerList();
|
||||
private boolean cancel;
|
||||
private DyeColor color;
|
||||
|
||||
public SheepDyeWoolEvent(Entity what, DyeColor color) {
|
||||
super(Type.SHEEP_DYE_WOOL, what);
|
||||
this.cancel = false;
|
||||
this.color = color;
|
||||
}
|
||||
|
||||
public boolean isCancelled() {
|
||||
return cancel;
|
||||
}
|
||||
|
||||
public void setCancelled(boolean cancel) {
|
||||
this.cancel = cancel;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the DyeColor the sheep is being dyed
|
||||
*
|
||||
* @return the DyeColor the sheep is being dyed
|
||||
*/
|
||||
public DyeColor getColor() {
|
||||
return color;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the DyeColor the sheep is being dyed
|
||||
*
|
||||
* @param color the DyeColor the sheep will be dyed
|
||||
*/
|
||||
public void setColor(DyeColor color) {
|
||||
this.color = color;
|
||||
}
|
||||
|
||||
@Override
|
||||
public HandlerList getHandlers() {
|
||||
return handlers;
|
||||
}
|
||||
|
||||
public static HandlerList getHandlerList() {
|
||||
return handlers;
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user