Make MultiNames a premium feature
This commit is contained in:
parent
3591c3bcf8
commit
c9a3c125a5
@ -2721,12 +2721,21 @@ public class DisguiseUtilities {
|
||||
|
||||
public static ArrayList<PacketContainer> getNamePackets(Disguise disguise, String[] internalOldNames) {
|
||||
ArrayList<PacketContainer> packets = new ArrayList<>();
|
||||
String[] newNames =
|
||||
(disguise instanceof PlayerDisguise && !((PlayerDisguise) disguise).isNameVisible()) ? new String[0] :
|
||||
reverse(disguise.getMultiName());
|
||||
String[] newNames = new String[0];
|
||||
int[] standIds = disguise.getArmorstandIds();
|
||||
int[] destroyIds = new int[0];
|
||||
|
||||
if (!LibsPremium.isPremium()) {
|
||||
internalOldNames = new String[]{StringUtils.join(internalOldNames, "\\n")};
|
||||
|
||||
if (!disguise.isPlayerDisguise() || ((PlayerDisguise) disguise).isNameVisible()) {
|
||||
newNames = new String[]{StringUtils.join(newNames, "\\n")};
|
||||
}
|
||||
} else {
|
||||
newNames = (disguise instanceof PlayerDisguise && !((PlayerDisguise) disguise).isNameVisible()) ?
|
||||
new String[0] : reverse(disguise.getMultiName());
|
||||
}
|
||||
|
||||
if (internalOldNames.length > newNames.length) {
|
||||
// Destroy packet
|
||||
destroyIds = Arrays.copyOfRange(standIds, newNames.length, internalOldNames.length);
|
||||
|
Loading…
Reference in New Issue
Block a user