Correct config value name for action bar, fix attributes error

This commit is contained in:
libraryaddict 2020-02-03 17:42:47 +13:00
parent dc066a07dd
commit 9bf3e81ded
No known key found for this signature in database
GPG Key ID: 052E4FBCD257AEA4
3 changed files with 6 additions and 6 deletions

View File

@ -207,7 +207,7 @@ public class DisguiseConfig {
private static boolean retaliationCombat; private static boolean retaliationCombat;
@Getter @Getter
@Setter @Setter
private static boolean actionBarDisguised; private static boolean notifyPlayerDisguised;
private DisguiseConfig() { private DisguiseConfig() {
} }
@ -358,7 +358,7 @@ public class DisguiseConfig {
setMovementPacketsEnabled(config.getBoolean("PacketsEnabled.Movement")); setMovementPacketsEnabled(config.getBoolean("PacketsEnabled.Movement"));
setNameAboveHeadAlwaysVisible(config.getBoolean("NameAboveHeadAlwaysVisible")); setNameAboveHeadAlwaysVisible(config.getBoolean("NameAboveHeadAlwaysVisible"));
setNameOfPlayerShownAboveDisguise(config.getBoolean("ShowNamesAboveDisguises")); setNameOfPlayerShownAboveDisguise(config.getBoolean("ShowNamesAboveDisguises"));
setActionBarDisguised(config.getBoolean("ActionBarDisguised")); setNotifyPlayerDisguised(config.getBoolean("NotifyPlayerDisguised"));
setPlayerDisguisesTablistExpires(config.getInt("PlayerDisguisesTablistExpires")); setPlayerDisguisesTablistExpires(config.getInt("PlayerDisguisesTablistExpires"));
setPlayerHideArmor(config.getBoolean("PlayerHideArmor")); setPlayerHideArmor(config.getBoolean("PlayerHideArmor"));
setRetaliationCombat(config.getBoolean("RetaliationCombat")); setRetaliationCombat(config.getBoolean("RetaliationCombat"));

View File

@ -174,7 +174,7 @@ public abstract class Disguise {
@Override @Override
public void run() { public void run() {
if (DisguiseConfig.isActionBarDisguised() && getEntity() instanceof Player && if (DisguiseConfig.isNotifyPlayerDisguised() && getEntity() instanceof Player &&
actionBarTicks++ % 20 == 0) { actionBarTicks++ % 20 == 0) {
actionBarTicks = 0; actionBarTicks = 0;

View File

@ -63,10 +63,10 @@ public class PacketHandlerAttributes implements IPacketHandler {
} }
if (!attributes.isEmpty()) { if (!attributes.isEmpty()) {
packets.getPackets().get(0).getIntegers().write(0, entity.getEntityId());
packets.getPackets().get(0).getAttributeCollectionModifier().write(0, attributes);
packets.addPacket(updateAttributes); packets.addPacket(updateAttributes);
updateAttributes.getIntegers().write(0, entity.getEntityId());
updateAttributes.getAttributeCollectionModifier().write(0, attributes);
} }
} }
} }