Sort by name
This commit is contained in:
parent
293b4f7de1
commit
53b5be001d
@ -153,30 +153,6 @@ public enum DisguiseSound {
|
|||||||
return cancelSounds;
|
return cancelSounds;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setSound(SoundType type, Sound sound) {
|
|
||||||
setSound(type, CraftSound.getSound(sound));
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setSound(SoundType type, String sound) {
|
|
||||||
if (type == SoundType.CANCEL)
|
|
||||||
cancelSounds.add(sound);
|
|
||||||
else {
|
|
||||||
disguiseSounds.put(type, sound);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public void removeSound(SoundType type, Sound sound) {
|
|
||||||
removeSound(type, CraftSound.getSound(sound));
|
|
||||||
}
|
|
||||||
|
|
||||||
public void removeSound(SoundType type, String sound) {
|
|
||||||
if (type == SoundType.CANCEL)
|
|
||||||
cancelSounds.remove(sound);
|
|
||||||
else {
|
|
||||||
disguiseSounds.remove(type);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Used to check if this sound name is owned by this disguise sound.
|
* Used to check if this sound name is owned by this disguise sound.
|
||||||
*/
|
*/
|
||||||
@ -206,7 +182,31 @@ public enum DisguiseSound {
|
|||||||
return getSoundsToCancel().contains(sound);
|
return getSoundsToCancel().contains(sound);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void removeSound(SoundType type, Sound sound) {
|
||||||
|
removeSound(type, CraftSound.getSound(sound));
|
||||||
|
}
|
||||||
|
|
||||||
|
public void removeSound(SoundType type, String sound) {
|
||||||
|
if (type == SoundType.CANCEL)
|
||||||
|
cancelSounds.remove(sound);
|
||||||
|
else {
|
||||||
|
disguiseSounds.remove(type);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
public void setDamageSoundVolume(float strength) {
|
public void setDamageSoundVolume(float strength) {
|
||||||
this.damageSoundVolume = strength;
|
this.damageSoundVolume = strength;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void setSound(SoundType type, Sound sound) {
|
||||||
|
setSound(type, CraftSound.getSound(sound));
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setSound(SoundType type, String sound) {
|
||||||
|
if (type == SoundType.CANCEL)
|
||||||
|
cancelSounds.add(sound);
|
||||||
|
else {
|
||||||
|
disguiseSounds.put(type, sound);
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
@ -161,14 +161,6 @@ public enum DisguiseType {
|
|||||||
return defaultData;
|
return defaultData;
|
||||||
}
|
}
|
||||||
|
|
||||||
public Class getWatcherClass() {
|
|
||||||
return watcherClass;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setWatcherClass(Class c) {
|
|
||||||
watcherClass = c;
|
|
||||||
}
|
|
||||||
|
|
||||||
public int getDefaultId() {
|
public int getDefaultId() {
|
||||||
return defaultId;
|
return defaultId;
|
||||||
}
|
}
|
||||||
@ -177,6 +169,14 @@ public enum DisguiseType {
|
|||||||
return entityId;
|
return entityId;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public EntityType getEntityType() {
|
||||||
|
return entityType;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Class getWatcherClass() {
|
||||||
|
return watcherClass;
|
||||||
|
}
|
||||||
|
|
||||||
public boolean isMisc() {
|
public boolean isMisc() {
|
||||||
return !entityType.isAlive();
|
return !entityType.isAlive();
|
||||||
}
|
}
|
||||||
@ -189,7 +189,7 @@ public enum DisguiseType {
|
|||||||
return entityType == EntityType.PLAYER;
|
return entityType == EntityType.PLAYER;
|
||||||
}
|
}
|
||||||
|
|
||||||
public EntityType getEntityType() {
|
public void setWatcherClass(Class c) {
|
||||||
return entityType;
|
watcherClass = c;
|
||||||
}
|
}
|
||||||
}
|
}
|
@ -7,6 +7,10 @@ public class MobDisguise extends Disguise {
|
|||||||
|
|
||||||
private boolean isAdult;
|
private boolean isAdult;
|
||||||
|
|
||||||
|
public MobDisguise(DisguiseType disguiseType) {
|
||||||
|
this(disguiseType, true);
|
||||||
|
}
|
||||||
|
|
||||||
public MobDisguise(DisguiseType disguiseType, boolean isAdult) {
|
public MobDisguise(DisguiseType disguiseType, boolean isAdult) {
|
||||||
this(disguiseType, isAdult, true);
|
this(disguiseType, isAdult, true);
|
||||||
}
|
}
|
||||||
@ -16,10 +20,6 @@ public class MobDisguise extends Disguise {
|
|||||||
this.isAdult = isAdult;
|
this.isAdult = isAdult;
|
||||||
}
|
}
|
||||||
|
|
||||||
public MobDisguise(DisguiseType disguiseType) {
|
|
||||||
this(disguiseType, true);
|
|
||||||
}
|
|
||||||
|
|
||||||
public MobDisguise clone() {
|
public MobDisguise clone() {
|
||||||
MobDisguise disguise = new MobDisguise(getType(), isAdult(), replaceSounds());
|
MobDisguise disguise = new MobDisguise(getType(), isAdult(), replaceSounds());
|
||||||
return disguise;
|
return disguise;
|
||||||
|
@ -9,8 +9,12 @@ import org.bukkit.event.HandlerList;
|
|||||||
|
|
||||||
public class DisguisedEvent extends Event implements Cancellable {
|
public class DisguisedEvent extends Event implements Cancellable {
|
||||||
private static final HandlerList handlers = new HandlerList();
|
private static final HandlerList handlers = new HandlerList();
|
||||||
|
public static HandlerList getHandlerList() {
|
||||||
|
return handlers;
|
||||||
|
}
|
||||||
private Disguise disguise;
|
private Disguise disguise;
|
||||||
private Entity disguised;
|
private Entity disguised;
|
||||||
|
|
||||||
private boolean isCancelled;
|
private boolean isCancelled;
|
||||||
|
|
||||||
public DisguisedEvent(Entity entity, Disguise disguise) {
|
public DisguisedEvent(Entity entity, Disguise disguise) {
|
||||||
@ -26,10 +30,6 @@ public class DisguisedEvent extends Event implements Cancellable {
|
|||||||
return disguised;
|
return disguised;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static HandlerList getHandlerList() {
|
|
||||||
return handlers;
|
|
||||||
}
|
|
||||||
|
|
||||||
public HandlerList getHandlers() {
|
public HandlerList getHandlers() {
|
||||||
return handlers;
|
return handlers;
|
||||||
}
|
}
|
||||||
|
@ -9,10 +9,14 @@ import org.bukkit.event.HandlerList;
|
|||||||
|
|
||||||
public class RedisguisedEvent extends Event implements Cancellable {
|
public class RedisguisedEvent extends Event implements Cancellable {
|
||||||
private static final HandlerList handlers = new HandlerList();
|
private static final HandlerList handlers = new HandlerList();
|
||||||
private Disguise oldDisguise;
|
public static HandlerList getHandlerList() {
|
||||||
private Disguise newDisguise;
|
return handlers;
|
||||||
|
}
|
||||||
private Entity disguised;
|
private Entity disguised;
|
||||||
private boolean isCancelled;
|
private boolean isCancelled;
|
||||||
|
private Disguise newDisguise;
|
||||||
|
|
||||||
|
private Disguise oldDisguise;
|
||||||
|
|
||||||
public RedisguisedEvent(Entity entity, Disguise oldDisguise, Disguise newDisguise) {
|
public RedisguisedEvent(Entity entity, Disguise oldDisguise, Disguise newDisguise) {
|
||||||
this.disguised = entity;
|
this.disguised = entity;
|
||||||
@ -20,24 +24,20 @@ public class RedisguisedEvent extends Event implements Cancellable {
|
|||||||
this.newDisguise = newDisguise;
|
this.newDisguise = newDisguise;
|
||||||
}
|
}
|
||||||
|
|
||||||
public Disguise getOldDisguise() {
|
public Entity getDisguised() {
|
||||||
return oldDisguise;
|
return disguised;
|
||||||
|
}
|
||||||
|
|
||||||
|
public HandlerList getHandlers() {
|
||||||
|
return handlers;
|
||||||
}
|
}
|
||||||
|
|
||||||
public Disguise getNewDisguise() {
|
public Disguise getNewDisguise() {
|
||||||
return newDisguise;
|
return newDisguise;
|
||||||
}
|
}
|
||||||
|
|
||||||
public Entity getDisguised() {
|
public Disguise getOldDisguise() {
|
||||||
return disguised;
|
return oldDisguise;
|
||||||
}
|
|
||||||
|
|
||||||
public static HandlerList getHandlerList() {
|
|
||||||
return handlers;
|
|
||||||
}
|
|
||||||
|
|
||||||
public HandlerList getHandlers() {
|
|
||||||
return handlers;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -9,8 +9,12 @@ import org.bukkit.event.HandlerList;
|
|||||||
|
|
||||||
public class UndisguisedEvent extends Event implements Cancellable {
|
public class UndisguisedEvent extends Event implements Cancellable {
|
||||||
private static final HandlerList handlers = new HandlerList();
|
private static final HandlerList handlers = new HandlerList();
|
||||||
|
public static HandlerList getHandlerList() {
|
||||||
|
return handlers;
|
||||||
|
}
|
||||||
private Disguise disguise;
|
private Disguise disguise;
|
||||||
private Entity disguised;
|
private Entity disguised;
|
||||||
|
|
||||||
private boolean isCancelled;
|
private boolean isCancelled;
|
||||||
|
|
||||||
public UndisguisedEvent(Entity entity, Disguise disguise) {
|
public UndisguisedEvent(Entity entity, Disguise disguise) {
|
||||||
@ -26,10 +30,6 @@ public class UndisguisedEvent extends Event implements Cancellable {
|
|||||||
return disguised;
|
return disguised;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static HandlerList getHandlerList() {
|
|
||||||
return handlers;
|
|
||||||
}
|
|
||||||
|
|
||||||
public HandlerList getHandlers() {
|
public HandlerList getHandlers() {
|
||||||
return handlers;
|
return handlers;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user