From ee2224e68fc89087b200e148841ef1994acacec0 Mon Sep 17 00:00:00 2001 From: libraryaddict Date: Sat, 24 Apr 2021 12:34:24 +1200 Subject: [PATCH] Introduce setGlowColor and no longer have a self disguise scoreboard, instead all non-player disguises have their own uuid which is added to a scoreboard team. Downside is you can now tell if someone isn't disguised cos they can be pushed around. Might be worth doing both? --- .../disguise/DisguiseConfig.java | 16 -- .../commands/libsdisguises/LDScoreboard.java | 22 +- .../disguise/disguisetypes/Disguise.java | 18 ++ .../disguise/disguisetypes/FlagWatcher.java | 6 +- .../disguisetypes/PlayerDisguise.java | 22 +- .../disguise/utilities/DisguiseUtilities.java | 208 +++++------------- .../utilities/listeners/DisguiseListener.java | 3 +- .../packethandlers/PacketHandlerSpawn.java | 6 +- .../PacketListenerScoreboardTeam.java | 2 +- .../utilities/params/ParamInfoTypes.java | 2 + .../utilities/translations/LibsMsg.java | 7 - 11 files changed, 100 insertions(+), 212 deletions(-) diff --git a/src/main/java/me/libraryaddict/disguise/DisguiseConfig.java b/src/main/java/me/libraryaddict/disguise/DisguiseConfig.java index 75ab5b96..ff7beb2b 100644 --- a/src/main/java/me/libraryaddict/disguise/DisguiseConfig.java +++ b/src/main/java/me/libraryaddict/disguise/DisguiseConfig.java @@ -37,9 +37,6 @@ import java.util.Map.Entry; import java.util.concurrent.TimeUnit; public class DisguiseConfig { - @Getter - @Setter - private static DisguisePushing pushingOption = DisguisePushing.MODIFY_SCOREBOARD; @Getter @Setter private static HashMap customDisguises = new HashMap<>(); @@ -675,19 +672,6 @@ public class DisguiseConfig { DisguiseUtilities.getLogger().warning("Cannot parse '" + config.getString("UpdatesBranch") + "' to a valid option for UpdatesBranch"); } - try { - String option = config.getString("SelfDisguisesScoreboard", DisguisePushing.MODIFY_SCOREBOARD.name()).toUpperCase(Locale.ENGLISH); - - if (!option.endsWith("_SCOREBOARD")) { - option += "_SCOREBOARD"; - } - - pushingOption = DisguisePushing.valueOf(option); - } catch (Exception ex) { - DisguiseUtilities.getLogger() - .warning("Cannot parse '" + config.getString("SelfDisguisesScoreboard") + "' to a valid option for SelfDisguisesScoreboard"); - } - PermissionDefault commandVisibility = PermissionDefault.getByName(config.getString("Permissions.SeeCommands")); if (commandVisibility == null) { diff --git a/src/main/java/me/libraryaddict/disguise/commands/libsdisguises/LDScoreboard.java b/src/main/java/me/libraryaddict/disguise/commands/libsdisguises/LDScoreboard.java index 6fc913c5..f7e3d0f1 100644 --- a/src/main/java/me/libraryaddict/disguise/commands/libsdisguises/LDScoreboard.java +++ b/src/main/java/me/libraryaddict/disguise/commands/libsdisguises/LDScoreboard.java @@ -121,11 +121,11 @@ public class LDScoreboard implements LDCommand { } List listeners = ProtocolLibrary.getProtocolManager().getPacketListeners().stream() - .filter(listener -> listener.getPlugin() != LibsDisguises.getInstance() && listener.getSendingWhitelist().getTypes().contains(PacketType.Play.Server.SCOREBOARD_TEAM)).collect(Collectors.toList()); + .filter(listener -> listener.getPlugin() != LibsDisguises.getInstance() && + listener.getSendingWhitelist().getTypes().contains(PacketType.Play.Server.SCOREBOARD_TEAM)).collect(Collectors.toList()); if (!listeners.isEmpty()) { - ComponentBuilder builder = - new ComponentBuilder(""); + ComponentBuilder builder = new ComponentBuilder(""); builder.append("The following plugins are listening for scoreboard teams using ProtocolLib, and could be modifying collisions: "); builder.color(net.md_5.bungee.api.ChatColor.BLUE); @@ -160,9 +160,8 @@ public class LDScoreboard implements LDCommand { LibsMsg.LIBS_SCOREBOARD_IGNORE_TEST.send(sender); - if (DisguiseConfig.getPushingOption() == DisguiseConfig.DisguisePushing.IGNORE_SCOREBOARD) { - LibsMsg.LIBS_SCOREBOARD_DISABLED.send(sender); - } + sender.sendMessage(ChatColor.RED + + "This command is somewhat outdated and needs to be changed, pushing is now disabled on the entities themselves and not players"); Player player; @@ -200,18 +199,7 @@ public class LDScoreboard implements LDCommand { return; } - if (team.getOption(Team.Option.COLLISION_RULE) != Team.OptionStatus.NEVER && - team.getOption(Team.Option.COLLISION_RULE) != Team.OptionStatus.FOR_OTHER_TEAMS) { - LibsMsg.LIBS_SCOREBOARD_NO_TEAM_PUSH.send(sender, team.getName()); - return; - } - LibsMsg.LIBS_SCOREBOARD_SUCCESS.send(sender, team.getName()); - - if (Bukkit.getPluginManager().getPlugin("TAB") != null) { - LibsMsg.PLUGIN_TAB_DETECTED.send(sender); - } - } @Override diff --git a/src/main/java/me/libraryaddict/disguise/disguisetypes/Disguise.java b/src/main/java/me/libraryaddict/disguise/disguisetypes/Disguise.java index 35a4c8c7..5b05b7db 100644 --- a/src/main/java/me/libraryaddict/disguise/disguisetypes/Disguise.java +++ b/src/main/java/me/libraryaddict/disguise/disguisetypes/Disguise.java @@ -96,12 +96,22 @@ public abstract class Disguise { @Getter @Setter private String soundGroup; + private UUID uuid = ReflectionManager.getRandomUUID(); public Disguise(DisguiseType disguiseType) { this.disguiseType = disguiseType; this.disguiseName = disguiseType.toReadable(); } + public UUID getUUID() { + // Partial fix for disguises serialized in older versions + if (this.uuid == null) { + this.uuid = ReflectionManager.getRandomUUID(); + } + + return uuid; + } + public int getMultiNameLength() { return multiName.length; } @@ -939,6 +949,10 @@ public abstract class Disguise { } } + if (!isPlayerDisguise()) { + DisguiseUtilities.setGlowColor(this, null); + } + // If this disguise is active // Remove the disguise from the current disguises. if (DisguiseUtilities.removeDisguise((TargetedDisguise) this) && !disguiseBeingReplaced) { @@ -1163,6 +1177,10 @@ public abstract class Disguise { // Stick the disguise in the disguises bin DisguiseUtilities.addDisguise(entity.getEntityId(), (TargetedDisguise) this); + if (!isPlayerDisguise()) { + DisguiseUtilities.setGlowColor(this, getWatcher().getGlowColor()); + } + if (isSelfDisguiseVisible() && getEntity() instanceof Player) { DisguiseUtilities.removeSelfDisguise(this); } diff --git a/src/main/java/me/libraryaddict/disguise/disguisetypes/FlagWatcher.java b/src/main/java/me/libraryaddict/disguise/disguisetypes/FlagWatcher.java index ca09ce41..ba58c972 100644 --- a/src/main/java/me/libraryaddict/disguise/disguisetypes/FlagWatcher.java +++ b/src/main/java/me/libraryaddict/disguise/disguisetypes/FlagWatcher.java @@ -59,7 +59,7 @@ public class FlagWatcher { private transient boolean previouslySneaking; @Getter private boolean upsideDown; - private ChatColor glowColor; + private ChatColor glowColor = ChatColor.WHITE; @Getter private Float pitchLock; @Getter @@ -708,7 +708,7 @@ public class FlagWatcher { } public void setGlowColor(ChatColor glowColor) { - if (getGlowColor() == glowColor) { + if (getGlowColor() == glowColor || glowColor == null || !glowColor.isColor()) { return; } @@ -721,7 +721,7 @@ public class FlagWatcher { if (getDisguise().isPlayerDisguise()) { DisguiseUtilities.updateExtendedName((PlayerDisguise) getDisguise()); } else { - // TODO + DisguiseUtilities.setGlowColor(getDisguise(), getGlowColor()); } } diff --git a/src/main/java/me/libraryaddict/disguise/disguisetypes/PlayerDisguise.java b/src/main/java/me/libraryaddict/disguise/disguisetypes/PlayerDisguise.java index 49d285e6..d849d449 100644 --- a/src/main/java/me/libraryaddict/disguise/disguisetypes/PlayerDisguise.java +++ b/src/main/java/me/libraryaddict/disguise/disguisetypes/PlayerDisguise.java @@ -31,7 +31,6 @@ public class PlayerDisguise extends TargetedDisguise { * Has someone set name visible explicitly? */ private boolean explicitNameVisible = false; - private final UUID uuid = ReflectionManager.getRandomUUID(); private transient DisguiseUtilities.DScoreTeam scoreboardName; @Getter private boolean deadmau5Ears; @@ -77,7 +76,7 @@ public class PlayerDisguise extends TargetedDisguise { setName(gameProfile.getName()); - this.gameProfile = ReflectionManager.getGameProfileWithThisSkin(uuid, gameProfile.getName(), gameProfile); + this.gameProfile = ReflectionManager.getGameProfileWithThisSkin(getUUID(), gameProfile.getName(), gameProfile); createDisguise(); } @@ -87,7 +86,7 @@ public class PlayerDisguise extends TargetedDisguise { setName(gameProfile.getName()); - this.gameProfile = ReflectionManager.getGameProfile(uuid, gameProfile.getName()); + this.gameProfile = ReflectionManager.getGameProfile(getUUID(), gameProfile.getName()); setSkin(skinToUse); @@ -152,9 +151,6 @@ public class PlayerDisguise extends TargetedDisguise { isDeadmau5Ears() ? "deadmau5" : hasScoreboardName() ? getScoreboardName().getPlayer() : getName().isEmpty() ? "§r" : getName(); } - public UUID getUUID() { - return uuid; - } public boolean isNameVisible() { return nameVisible; @@ -250,7 +246,7 @@ public class PlayerDisguise extends TargetedDisguise { if (currentLookup == null && gameProfile != null) { disguise.skinToUse = getSkin(); - disguise.gameProfile = ReflectionManager.getGameProfileWithThisSkin(disguise.uuid, getGameProfile().getName(), getGameProfile()); + disguise.gameProfile = ReflectionManager.getGameProfileWithThisSkin(disguise.getUUID(), getGameProfile().getName(), getGameProfile()); } else { disguise.setSkin(getSkin()); } @@ -269,9 +265,9 @@ public class PlayerDisguise extends TargetedDisguise { public WrappedGameProfile getGameProfile() { if (gameProfile == null) { if (getSkin() != null) { - gameProfile = ReflectionManager.getGameProfile(uuid, getProfileName()); + gameProfile = ReflectionManager.getGameProfile(getUUID(), getProfileName()); } else { - gameProfile = ReflectionManager.getGameProfileWithThisSkin(uuid, getProfileName(), DisguiseUtilities.getProfileFromMojang(this)); + gameProfile = ReflectionManager.getGameProfileWithThisSkin(getUUID(), getProfileName(), DisguiseUtilities.getProfileFromMojang(this)); } } @@ -279,7 +275,7 @@ public class PlayerDisguise extends TargetedDisguise { } public void setGameProfile(WrappedGameProfile gameProfile) { - this.gameProfile = ReflectionManager.getGameProfileWithThisSkin(uuid, gameProfile.getName(), gameProfile); + this.gameProfile = ReflectionManager.getGameProfileWithThisSkin(getUUID(), gameProfile.getName(), gameProfile); } public String getName() { @@ -390,7 +386,7 @@ public class PlayerDisguise extends TargetedDisguise { playerName = name; if (gameProfile != null) { - gameProfile = ReflectionManager.getGameProfileWithThisSkin(uuid, getProfileName(), getGameProfile()); + gameProfile = ReflectionManager.getGameProfileWithThisSkin(getUUID(), getProfileName(), getGameProfile()); } } } @@ -410,7 +406,7 @@ public class PlayerDisguise extends TargetedDisguise { } if (gameProfile != null) { - gameProfile = ReflectionManager.getGameProfileWithThisSkin(uuid, getProfileName(), getGameProfile()); + gameProfile = ReflectionManager.getGameProfileWithThisSkin(getUUID(), getProfileName(), getGameProfile()); } if (!startDisguise()) { @@ -500,7 +496,7 @@ public class PlayerDisguise extends TargetedDisguise { currentLookup = null; this.skinToUse = gameProfile.getName(); - this.gameProfile = ReflectionManager.getGameProfileWithThisSkin(uuid, getProfileName(), gameProfile); + this.gameProfile = ReflectionManager.getGameProfileWithThisSkin(getUUID(), getProfileName(), gameProfile); refreshDisguise(); diff --git a/src/main/java/me/libraryaddict/disguise/utilities/DisguiseUtilities.java b/src/main/java/me/libraryaddict/disguise/utilities/DisguiseUtilities.java index 84c747a8..162acb97 100644 --- a/src/main/java/me/libraryaddict/disguise/utilities/DisguiseUtilities.java +++ b/src/main/java/me/libraryaddict/disguise/utilities/DisguiseUtilities.java @@ -119,13 +119,9 @@ public class DisguiseUtilities { team.setOption(Option.NAME_TAG_VISIBILITY, nameVisible ? OptionStatus.ALWAYS : OptionStatus.NEVER); } - ChatColor color = disguise.getWatcher().getGlowColor(); + team.setOption(Option.COLLISION_RULE, OptionStatus.NEVER); - if (color == null) { - color = ChatColor.WHITE; - } - - team.setColor(color); + team.setColor(disguise.getWatcher().getGlowColor()); if (NmsVersion.v1_13.isSupported()) { team.setPrefix("Colorize"); @@ -164,8 +160,6 @@ public class DisguiseUtilities { private static final HashMap> runnables = new HashMap<>(); @Getter private static final HashSet selfDisguised = new HashSet<>(); - private static final HashMap preDisguiseTeam = new HashMap<>(); - private static final HashMap disguiseTeam = new HashMap<>(); private static final File profileCache = new File("plugins/LibsDisguises/SavedSkins"); private static final File savedDisguises = new File("plugins/LibsDisguises/SavedDisguises"); @Getter @@ -1321,6 +1315,7 @@ public class DisguiseUtilities { registerAllExtendedNames(board); registerNoName(board); + registerColors(board); } if (NmsVersion.v1_13.isSupported()) { @@ -1708,8 +1703,6 @@ public class DisguiseUtilities { ex.printStackTrace(); } - removeSelfDisguiseScoreboard(player); - // player.spigot().setCollidesWithEntities(true); // Finish up // Remove the fake entity ID from the disguise bin @@ -1878,6 +1871,61 @@ public class DisguiseUtilities { } } + public static void setGlowColor(UUID uuid, ChatColor color) { + String name = color == null ? "" : getTeamName(color); + + for (Scoreboard scoreboard : getAllScoreboards()) { + Team team = scoreboard.getEntryTeam(uuid.toString()); + + if (team != null) { + if (!team.getName().startsWith("LD_Color_") || name.equals(team.getName())) { + continue; + } + + team.removeEntry(uuid.toString()); + } + + if (color == null) { + continue; + } + + team = scoreboard.getTeam(name); + + if (team == null) { + continue; + } + + team.addEntry(uuid.toString()); + } + } + + public static void setGlowColor(Disguise disguise, ChatColor color) { + setGlowColor(disguise.getUUID(), color); + } + + public static String getTeamName(ChatColor color) { + return "LD_Color_" + color.getChar(); + } + + public static void registerColors(Scoreboard scoreboard) { + for (ChatColor color : ChatColor.values()) { + if (!color.isColor()) { + continue; + } + + String name = getTeamName(color); + + Team team = scoreboard.getTeam(name); + + if (team == null) { + team = scoreboard.registerNewTeam(name); + } + + team.setColor(color); + team.setOption(Option.COLLISION_RULE, OptionStatus.NEVER); + } + } + public static String[] getExtendedNameSplit(String playerName, String name) { if (name.length() <= 16 && !DisguiseConfig.isScoreboardNames()) { throw new IllegalStateException("This can only be used for names longer than 16 characters!"); @@ -2017,144 +2065,6 @@ public class DisguiseUtilities { return board.getEntryTeam(name) == null && Bukkit.getPlayerExact(name) == null; } - public static void removeSelfDisguiseScoreboard(Player player) { - String originalTeam = preDisguiseTeam.remove(player.getUniqueId()); - String teamDisguise = disguiseTeam.remove(player.getUniqueId()); - - if (teamDisguise == null || DisguiseConfig.getPushingOption() == DisguisePushing.IGNORE_SCOREBOARD) { - return; - } - - // Code replace them back onto their original scoreboard team - Scoreboard scoreboard = player.getScoreboard(); - Team team = originalTeam == null ? null : scoreboard.getTeam(originalTeam); - Team ldTeam = null; - - for (Team t : scoreboard.getTeams()) { - if (!t.hasEntry(player.getName())) { - continue; - } - - ldTeam = t; - break; - } - - if (DisguiseConfig.isWarnScoreboardConflict()) { - if (ldTeam == null || !ldTeam.getName().equals(teamDisguise)) { - getLogger().warning("Scoreboard conflict, the self disguise player was not on the expected team!"); - } else { - OptionStatus collisions = ldTeam.getOption(Option.COLLISION_RULE); - - if (collisions != OptionStatus.NEVER && collisions != OptionStatus.FOR_OTHER_TEAMS) { - getLogger().warning("Scoreboard conflict, the collisions for a self disguise player team has been " + "unexpectedly modifed!"); - } - } - } - - if (ldTeam != null) { - if (!ldTeam.getName().equals("LD_Pushing") && !ldTeam.getName().endsWith("_LDP")) { - // Its not a team assigned by Lib's Disguises - ldTeam = null; - } - } - - if (team != null) { - team.addEntry(player.getName()); - } else if (ldTeam != null) { - ldTeam.removeEntry(player.getName()); - } - - if (ldTeam != null && ldTeam.getEntries().isEmpty()) { - ldTeam.unregister(); - } - } - - public static void setupSelfDisguiseScoreboard(Player player) { - // They're already in a disguise team - if (disguiseTeam.containsKey(player.getUniqueId())) { - return; - } - - if ((LibsPremium.getPluginInformation() != null && LibsPremium.getPluginInformation().isPremium() && !LibsPremium.getPluginInformation().isLegit()) || - (LibsPremium.getPaidInformation() != null && !LibsPremium.getPaidInformation().isLegit())) { - return; - } - - DisguisePushing pOption = DisguiseConfig.getPushingOption(); - - if (pOption == DisguisePushing.IGNORE_SCOREBOARD) { - return; - } - - // Code to stop player pushing - Scoreboard scoreboard = player.getScoreboard(); - Team prevTeam = null; - Team ldTeam = null; - String ldTeamName = "LD_Pushing"; - - for (Team t : scoreboard.getTeams()) { - if (!t.hasEntry(player.getName())) { - continue; - } - - prevTeam = t; - break; - } - - // If the player is in a team already and the team isn't one controlled by Lib's Disguises - if (prevTeam != null && !(prevTeam.getName().equals("LD_Pushing") || prevTeam.getName().endsWith("_LDP"))) { - // If we're creating a scoreboard - if (pOption == DisguisePushing.CREATE_SCOREBOARD) { - // Remember his old team so we can give him it back later - preDisguiseTeam.put(player.getUniqueId(), prevTeam.getName()); - } else { - // We're modifying the scoreboard - ldTeam = prevTeam; - } - } else { - prevTeam = null; - } - - // If we are creating a new scoreboard because the current one must not be modified - if (pOption == DisguisePushing.CREATE_SCOREBOARD) { - // If they have a team, we'll reuse that name. Otherwise go for another name - ldTeamName = (prevTeam == null ? "NoTeam" : prevTeam.getName()); - - // Give the teamname a custom name - ldTeamName = ldTeamName.substring(0, Math.min(12, ldTeamName.length())) + "_LDP"; - } - - if (ldTeam == null && (ldTeam = scoreboard.getTeam(ldTeamName)) == null) { - ldTeam = scoreboard.registerNewTeam(ldTeamName); - } - - disguiseTeam.put(player.getUniqueId(), ldTeam.getName()); - - if (!ldTeam.hasEntry(player.getName())) { - ldTeam.addEntry(player.getName()); - } - - if (pOption == DisguisePushing.CREATE_SCOREBOARD && prevTeam != null) { - ldTeam.setAllowFriendlyFire(prevTeam.allowFriendlyFire()); - ldTeam.setCanSeeFriendlyInvisibles(prevTeam.canSeeFriendlyInvisibles()); - ldTeam.setDisplayName(prevTeam.getDisplayName()); - ldTeam.setPrefix(prevTeam.getPrefix()); - ldTeam.setSuffix(prevTeam.getSuffix()); - - for (Option option : Team.Option.values()) { - ldTeam.setOption(option, prevTeam.getOption(option)); - } - } - - if (ldTeam.getOption(Option.COLLISION_RULE) != OptionStatus.NEVER && DisguiseConfig.isModifyCollisions()) { - ldTeam.setOption(Option.COLLISION_RULE, OptionStatus.NEVER); - } - - if (ldTeam.canSeeFriendlyInvisibles() && DisguiseConfig.isDisableFriendlyInvisibles()) { - ldTeam.setCanSeeFriendlyInvisibles(false); - } - } - /** * Splits a string while respecting quotes. *

@@ -2357,8 +2267,6 @@ public class DisguiseUtilities { return; } - setupSelfDisguiseScoreboard(player); - // Check for code differences in PaperSpigot vs Spigot if (!runningPaper) { // Add himself to his own entity tracker diff --git a/src/main/java/me/libraryaddict/disguise/utilities/listeners/DisguiseListener.java b/src/main/java/me/libraryaddict/disguise/utilities/listeners/DisguiseListener.java index b375c78f..4479df33 100644 --- a/src/main/java/me/libraryaddict/disguise/utilities/listeners/DisguiseListener.java +++ b/src/main/java/me/libraryaddict/disguise/utilities/listeners/DisguiseListener.java @@ -404,6 +404,7 @@ public class DisguiseListener implements Listener { if (p.getScoreboard() != Bukkit.getScoreboardManager().getMainScoreboard()) { DisguiseUtilities.registerAllExtendedNames(p.getScoreboard()); + DisguiseUtilities.registerColors(p.getScoreboard()); } if (!p.hasMetadata("forge_mods")) { @@ -486,8 +487,6 @@ public class DisguiseListener implements Listener { public void onQuit(PlayerQuitEvent event) { Player player = event.getPlayer(); - DisguiseUtilities.removeSelfDisguiseScoreboard(player); - // Removed as its not compatible with scoreboard teams /*if (player.hasPermission("libsdisguises.seethrough")) { for (Set disguises : DisguiseUtilities.getDisguises().values()) { diff --git a/src/main/java/me/libraryaddict/disguise/utilities/packets/packethandlers/PacketHandlerSpawn.java b/src/main/java/me/libraryaddict/disguise/utilities/packets/packethandlers/PacketHandlerSpawn.java index 68fdd593..f098f7aa 100644 --- a/src/main/java/me/libraryaddict/disguise/utilities/packets/packethandlers/PacketHandlerSpawn.java +++ b/src/main/java/me/libraryaddict/disguise/utilities/packets/packethandlers/PacketHandlerSpawn.java @@ -139,7 +139,7 @@ public class PacketHandlerSpawn implements IPacketHandler { StructureModifier mods = spawnPainting.getModifier(); mods.write(0, disguisedEntity.getEntityId()); - mods.write(1, disguisedEntity.getUniqueId()); + mods.write(1, disguise.getUUID()); mods.write(2, ReflectionManager.getBlockPosition(loc.getBlockX(), loc.getBlockY(), loc.getBlockZ())); mods.write(3, ReflectionManager.getEnumDirection(((int) loc.getYaw()) % 4)); @@ -257,7 +257,7 @@ public class PacketHandlerSpawn implements IPacketHandler { StructureModifier mods = spawnEntity.getModifier(); mods.write(0, disguisedEntity.getEntityId()); - mods.write(1, disguisedEntity.getUniqueId()); + mods.write(1, disguise.getUUID()); if (!disguise.getType().isCustom()) { mods.write(2, disguise.getType().getTypeId()); @@ -357,7 +357,7 @@ public class PacketHandlerSpawn implements IPacketHandler { } Object[] params = - new Object[]{disguisedEntity.getEntityId(), disguisedEntity.getUniqueId(), x, y, z, loc.getPitch(), loc.getYaw(), entityType, data, + new Object[]{disguisedEntity.getEntityId(), disguise.getUUID(), x, y, z, loc.getPitch(), loc.getYaw(), entityType, data, ReflectionManager.getVec3D(disguisedEntity.getVelocity())}; spawnEntity = ProtocolLibrary.getProtocolManager().createPacketConstructor(PacketType.Play.Server.SPAWN_ENTITY, params).createPacket(params); diff --git a/src/main/java/me/libraryaddict/disguise/utilities/packets/packetlisteners/PacketListenerScoreboardTeam.java b/src/main/java/me/libraryaddict/disguise/utilities/packets/packetlisteners/PacketListenerScoreboardTeam.java index 6ed9dddb..7417254d 100644 --- a/src/main/java/me/libraryaddict/disguise/utilities/packets/packetlisteners/PacketListenerScoreboardTeam.java +++ b/src/main/java/me/libraryaddict/disguise/utilities/packets/packetlisteners/PacketListenerScoreboardTeam.java @@ -24,7 +24,7 @@ public class PacketListenerScoreboardTeam extends PacketAdapter { PacketContainer packet = event.getPacket(); String name = packet.getStrings().read(0); - if (name == null || !name.startsWith("LD_") || name.equals("LD_NoName") || name.equals("LD_Pushing")) { + if (name == null || !name.startsWith("LD_") || name.equals("LD_NoName")) { return; } diff --git a/src/main/java/me/libraryaddict/disguise/utilities/params/ParamInfoTypes.java b/src/main/java/me/libraryaddict/disguise/utilities/params/ParamInfoTypes.java index b534dcab..bf7fdac6 100644 --- a/src/main/java/me/libraryaddict/disguise/utilities/params/ParamInfoTypes.java +++ b/src/main/java/me/libraryaddict/disguise/utilities/params/ParamInfoTypes.java @@ -128,6 +128,8 @@ public class ParamInfoTypes { "Set how long the disguise lasts,