From 792b962e492f976a39d8ca49d58d0fc400978a3e Mon Sep 17 00:00:00 2001 From: Pyrbu Date: Mon, 24 Jul 2023 02:04:56 +0200 Subject: [PATCH] rename method to what it actually does --- .../main/java/lol/pyr/znpcsplus/entity/EntityPropertyImpl.java | 2 +- .../main/java/lol/pyr/znpcsplus/packets/V1_8PacketFactory.java | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/plugin/src/main/java/lol/pyr/znpcsplus/entity/EntityPropertyImpl.java b/plugin/src/main/java/lol/pyr/znpcsplus/entity/EntityPropertyImpl.java index 3261e2f..ffe4f48 100644 --- a/plugin/src/main/java/lol/pyr/znpcsplus/entity/EntityPropertyImpl.java +++ b/plugin/src/main/java/lol/pyr/znpcsplus/entity/EntityPropertyImpl.java @@ -48,7 +48,7 @@ public abstract class EntityPropertyImpl implements EntityProperty { abstract public void apply(T value, Player player, PacketEntity entity, boolean isSpawned, Map properties); @SuppressWarnings("unchecked") - public void UNSAFE_update(Object value, Player player, PacketEntity entity, boolean isSpawned, Map properties) { + public void UNSAFE_apply(Object value, Player player, PacketEntity entity, boolean isSpawned, Map properties) { apply((T) value, player, entity, isSpawned, properties); } } \ No newline at end of file diff --git a/plugin/src/main/java/lol/pyr/znpcsplus/packets/V1_8PacketFactory.java b/plugin/src/main/java/lol/pyr/znpcsplus/packets/V1_8PacketFactory.java index 2437955..f416195 100644 --- a/plugin/src/main/java/lol/pyr/znpcsplus/packets/V1_8PacketFactory.java +++ b/plugin/src/main/java/lol/pyr/znpcsplus/packets/V1_8PacketFactory.java @@ -250,7 +250,7 @@ public class V1_8PacketFactory implements PacketFactory { public void sendAllMetadata(Player player, PacketEntity entity, PropertyHolder properties) { Map datas = new HashMap<>(); for (EntityProperty property : properties.getAppliedProperties()) - ((EntityPropertyImpl) property).UNSAFE_update(properties.getProperty(property), player, entity, false, datas); + ((EntityPropertyImpl) property).UNSAFE_apply(properties.getProperty(property), player, entity, false, datas); sendMetadata(player, entity, new ArrayList<>(datas.values())); }