From 578f2ce5045a9a908959b01e5f912d3424afa350 Mon Sep 17 00:00:00 2001 From: libraryaddict Date: Fri, 9 May 2014 16:28:35 +1200 Subject: [PATCH] Add disguiseToPlayers player... to DisguiseAPI. I can't add List<> because of conflicts --- src/me/libraryaddict/disguise/DisguiseAPI.java | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/src/me/libraryaddict/disguise/DisguiseAPI.java b/src/me/libraryaddict/disguise/DisguiseAPI.java index b7b1f7f5..d61cbc6a 100644 --- a/src/me/libraryaddict/disguise/DisguiseAPI.java +++ b/src/me/libraryaddict/disguise/DisguiseAPI.java @@ -1,6 +1,7 @@ package me.libraryaddict.disguise; import java.lang.reflect.Field; +import java.util.ArrayList; import java.util.Arrays; import java.util.List; import java.util.UUID; @@ -61,6 +62,14 @@ public class DisguiseAPI { disguiseEntity(entity, disguise); } + public static void disguiseIgnorePlayers(Entity entity, Disguise disguise, Player... playersToNotSeeDisguise) { + ArrayList names = new ArrayList(); + for (Player p : playersToNotSeeDisguise) { + names.add(p.getName()); + } + disguiseIgnorePlayers(entity, disguise, names); + } + public static void disguiseIgnorePlayers(Entity entity, Disguise disguise, String... playersToNotSeeDisguise) { disguiseIgnorePlayers(entity, disguise, Arrays.asList(playersToNotSeeDisguise)); } @@ -111,6 +120,14 @@ public class DisguiseAPI { disguiseEntity(entity, disguise); } + public static void disguiseToPlayers(Entity entity, Disguise disguise, Player... playersToViewDisguise) { + ArrayList names = new ArrayList(); + for (Player p : playersToViewDisguise) { + names.add(p.getName()); + } + disguiseToPlayers(entity, disguise, names); + } + public static void disguiseToPlayers(Entity entity, Disguise disguise, String... playersToViewDisguise) { disguiseToPlayers(entity, disguise, Arrays.asList(playersToViewDisguise)); }