mirror of
https://github.com/libraryaddict/LibsDisguises.git
synced 2024-12-16 15:38:14 +01:00
Make private method public. Remove the error being thrown for temperary player
This commit is contained in:
parent
9fd631d397
commit
55427dc1fe
@ -28,7 +28,7 @@ public class DisguiseAPI {
|
||||
return hearSelfDisguise;
|
||||
}
|
||||
|
||||
private static void disguiseEntity(Entity entity, Disguise disguise) {
|
||||
public static void disguiseEntity(Entity entity, Disguise disguise) {
|
||||
// If they are trying to disguise a null entity or use a null disguise
|
||||
// Just return.
|
||||
if (entity == null || disguise == null)
|
||||
|
@ -770,7 +770,8 @@ public class PacketsManager {
|
||||
@Override
|
||||
public void onPacketSending(PacketEvent event) {
|
||||
// If the inventory is the players inventory
|
||||
if (event.getPlayer().getVehicle() == null && event.getPacket().getIntegers().read(0) == 0) {
|
||||
if (event.getPlayer().isOnline() && event.getPlayer().getVehicle() == null
|
||||
&& event.getPacket().getIntegers().read(0) == 0) {
|
||||
Disguise disguise = DisguiseAPI.getDisguise(event.getPlayer(), event.getPlayer());
|
||||
// If the player is disguised, views self disguises and is hiding a item.
|
||||
if (disguise != null && disguise.isSelfDisguiseVisible()
|
||||
|
Loading…
Reference in New Issue
Block a user