Correct config value name for action bar, fix attributes error
This commit is contained in:
parent
dc066a07dd
commit
9bf3e81ded
@ -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"));
|
||||||
|
@ -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;
|
||||||
|
|
||||||
|
@ -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);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user