Skip to content

Commit

Permalink
Merge branch '1.20.4' of github.com:XiaMoZhiShi/MorphPlugin into 1.20.4
Browse files Browse the repository at this point in the history
  • Loading branch information
MATRIX-feather committed Jan 12, 2024
2 parents b87ebfe + 0edc261 commit c48ecfb
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 5 deletions.
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
project_version=1.0.0
project_version=1.0.1

# FM Protocols
protocols_version=09b2b0a077
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -107,8 +107,12 @@ private void onHeadRotation(ClientboundRotateHeadPacket packet, PacketEvent even
var sourceNmsEntity = packet.getEntity(NmsUtils.getNmsLevel(event.getPlayer().getWorld()));
if (sourceNmsEntity == null)
{
logger.warn("A packet from a player that doesn't exist in its world?!");
logger.warn("Packet: " + event.getPacketType());
if (isDebugEnabled())
{
logger.warn("A packet from a player that doesn't exist in its world?!");
logger.warn("Packet: " + event.getPacketType());
}

return;
}

Expand All @@ -134,8 +138,12 @@ private void onLookPacket(ClientboundMoveEntityPacket packet, PacketEvent event)
var sourceNmsEntity = packet.getEntity(NmsUtils.getNmsLevel(event.getPlayer().getWorld()));
if (sourceNmsEntity == null)
{
logger.warn("A packet from a player that doesn't exist in its world?!");
logger.warn("Packet: " + event.getPacketType());
if (isDebugEnabled())
{
logger.warn("A packet from a player that doesn't exist in its world?!");
logger.warn("Packet: " + event.getPacketType());
}

return;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,11 @@ public org.bukkit.plugin.Plugin getPlugin()

private final Bindable<Boolean> debugOutput = new Bindable<>(false);

protected boolean isDebugEnabled()
{
return debugOutput.get();
}

@Initializer
private void load(MorphConfigManager configManager)
{
Expand Down

0 comments on commit c48ecfb

Please sign in to comment.