Now using ASM manipulation to remove invalid methods on load Fixed imports Fixed Chat Components being used in 1.12 Fixed tab complete showing args for disguise options you can't use Disguise option permissions now demand a parameter to be the method name Falling block disguises are now only usable with blocks LibsDisguises command now tab completes the new options Libs Disguises command lets you create a vanilla compatible item string If a vehicle is disguised as a vehicle, don't give no gravity Fixed horse disguise using almost random values for its flagwatcher settings Renamed horse disguise setMouthOpen to setEating Slightly better string for premium info jar location Skip attributes packets if using older ProtocolLib jar Don't cancel entity death if entity is dead Improved disguise permissions checking Fixed time parameter not being attributed properly
49 lines
1.1 KiB
Java
49 lines
1.1 KiB
Java
package me.libraryaddict.disguise.events;
|
|
|
|
import me.libraryaddict.disguise.disguisetypes.Disguise;
|
|
import org.bukkit.entity.Entity;
|
|
import org.bukkit.event.Cancellable;
|
|
import org.bukkit.event.Event;
|
|
import org.bukkit.event.HandlerList;
|
|
|
|
public class DisguiseEvent extends Event implements Cancellable {
|
|
|
|
private static final HandlerList handlers = new HandlerList();
|
|
|
|
public static HandlerList getHandlerList() {
|
|
return handlers;
|
|
}
|
|
|
|
private Disguise disguise;
|
|
private Entity disguised;
|
|
private boolean isCancelled;
|
|
|
|
public DisguiseEvent(Entity entity, Disguise disguise) {
|
|
this.disguised = entity;
|
|
this.disguise = disguise;
|
|
}
|
|
|
|
public Disguise getDisguise() {
|
|
return disguise;
|
|
}
|
|
|
|
public Entity getEntity() {
|
|
return disguised;
|
|
}
|
|
|
|
@Override
|
|
public HandlerList getHandlers() {
|
|
return handlers;
|
|
}
|
|
|
|
@Override
|
|
public boolean isCancelled() {
|
|
return isCancelled;
|
|
}
|
|
|
|
@Override
|
|
public void setCancelled(boolean cancelled) {
|
|
isCancelled = cancelled;
|
|
}
|
|
}
|