mirror of
https://github.com/libraryaddict/LibsDisguises.git
synced 2024-09-12 01:48:07 +02:00
Add disguiseToPlayers player... to DisguiseAPI. I can't add List<> because of conflicts
This commit is contained in:
parent
23da447d7b
commit
578f2ce504
@ -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<String> names = new ArrayList<String>();
|
||||
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<String> names = new ArrayList<String>();
|
||||
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));
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user