Sort by name
This commit is contained in:
parent
1c056089bc
commit
e6457d0bb4
@ -36,10 +36,6 @@ public class DisguiseAPI {
|
|||||||
private static JavaPlugin plugin;
|
private static JavaPlugin plugin;
|
||||||
private static boolean soundsEnabled;
|
private static boolean soundsEnabled;
|
||||||
|
|
||||||
private static void put(Object obj, Disguise disguise) {
|
|
||||||
access(obj, disguise);
|
|
||||||
}
|
|
||||||
|
|
||||||
private synchronized static Disguise access(Object obj, Disguise... object) {
|
private synchronized static Disguise access(Object obj, Disguise... object) {
|
||||||
if (object.length == 0)
|
if (object.length == 0)
|
||||||
return disguises.get(obj);
|
return disguises.get(obj);
|
||||||
@ -50,10 +46,6 @@ public class DisguiseAPI {
|
|||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
private static Disguise get(Object obj) {
|
|
||||||
return access(obj);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param Player
|
* @param Player
|
||||||
* - The player to disguise
|
* - The player to disguise
|
||||||
@ -79,6 +71,10 @@ public class DisguiseAPI {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private static Disguise get(Object obj) {
|
||||||
|
return access(obj);
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param Disguiser
|
* @param Disguiser
|
||||||
* @return Disguise
|
* @return Disguise
|
||||||
@ -184,6 +180,10 @@ public class DisguiseAPI {
|
|||||||
return get(disguiser) != null;
|
return get(disguiser) != null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private static void put(Object obj, Disguise disguise) {
|
||||||
|
access(obj, disguise);
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param Resends
|
* @param Resends
|
||||||
* the entity to all the watching players, which is where the magic begins
|
* the entity to all the watching players, which is where the magic begins
|
||||||
|
@ -8,6 +8,10 @@ public class MiscDisguise extends Disguise {
|
|||||||
this(disguiseType, true, -1, -1);
|
this(disguiseType, true, -1, -1);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public MiscDisguise(DisguiseType disguiseType, boolean replaceSounds) {
|
||||||
|
this(disguiseType, replaceSounds, -1, -1);
|
||||||
|
}
|
||||||
|
|
||||||
public MiscDisguise(DisguiseType disguiseType, boolean replaceSounds, int id, int data) {
|
public MiscDisguise(DisguiseType disguiseType, boolean replaceSounds, int id, int data) {
|
||||||
super(disguiseType, replaceSounds);
|
super(disguiseType, replaceSounds);
|
||||||
if (id == -1)
|
if (id == -1)
|
||||||
@ -18,10 +22,6 @@ public class MiscDisguise extends Disguise {
|
|||||||
this.data = data;
|
this.data = data;
|
||||||
}
|
}
|
||||||
|
|
||||||
public MiscDisguise(DisguiseType disguiseType, boolean replaceSounds) {
|
|
||||||
this(disguiseType, replaceSounds, -1, -1);
|
|
||||||
}
|
|
||||||
|
|
||||||
public MiscDisguise(DisguiseType disguiseType, int id, int data) {
|
public MiscDisguise(DisguiseType disguiseType, int id, int data) {
|
||||||
this(disguiseType, true, id, data);
|
this(disguiseType, true, id, data);
|
||||||
}
|
}
|
||||||
|
@ -56,6 +56,11 @@ public class WolfWatcher extends AgeableWatcher {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void setHealth(float newHealth) {
|
||||||
|
setValue(18, newHealth);
|
||||||
|
sendData(18);
|
||||||
|
}
|
||||||
|
|
||||||
public void setSitting(boolean sitting) {
|
public void setSitting(boolean sitting) {
|
||||||
if (isSitting != sitting) {
|
if (isSitting != sitting) {
|
||||||
isSitting = sitting;
|
isSitting = sitting;
|
||||||
@ -70,11 +75,6 @@ public class WolfWatcher extends AgeableWatcher {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setHealth(float newHealth) {
|
|
||||||
setValue(18, newHealth);
|
|
||||||
sendData(18);
|
|
||||||
}
|
|
||||||
|
|
||||||
private void updateStatus() {
|
private void updateStatus() {
|
||||||
setValue(16, (byte) ((isTamed ? 4 : 0) + (isSitting ? 1 : 0) + (isAgressive ? 2 : 0)));
|
setValue(16, (byte) ((isTamed ? 4 : 0) + (isSitting ? 1 : 0) + (isAgressive ? 2 : 0)));
|
||||||
sendData(16);
|
sendData(16);
|
||||||
|
@ -34,8 +34,8 @@ import com.comphenix.protocol.events.PacketEvent;
|
|||||||
import com.comphenix.protocol.reflect.StructureModifier;
|
import com.comphenix.protocol.reflect.StructureModifier;
|
||||||
|
|
||||||
public class LibsDisguises extends JavaPlugin implements Listener {
|
public class LibsDisguises extends JavaPlugin implements Listener {
|
||||||
private String latestVersion;
|
|
||||||
private String currentVersion;
|
private String currentVersion;
|
||||||
|
private String latestVersion;
|
||||||
private String permission;
|
private String permission;
|
||||||
private String updateMessage = ChatColor.RED + "[LibsDisguises] " + ChatColor.DARK_RED
|
private String updateMessage = ChatColor.RED + "[LibsDisguises] " + ChatColor.DARK_RED
|
||||||
+ "There is a update ready to be downloaded! You are using " + ChatColor.RED + "%s" + ChatColor.DARK_RED
|
+ "There is a update ready to be downloaded! You are using " + ChatColor.RED + "%s" + ChatColor.DARK_RED
|
||||||
|
Loading…
Reference in New Issue
Block a user