Level up broadcasts should be visible to the player of origin

This commit is contained in:
nossr50 2022-06-09 22:50:36 -07:00
parent 444e1532f2
commit fa82fe8e67
3 changed files with 3 additions and 2 deletions

View File

@ -1,5 +1,6 @@
Version 2.1.214 Version 2.1.214
Temporarily removed FakePlayerAnimationEvent (see notes) Temporarily removed FakePlayerAnimationEvent (see notes)
Players can now see their own level up broadcasts
NOTES: NOTES:
Spigot updated PlayerAnimationEvent with an API break between versions 1.18 and 1.19, as a temporary fix for mcMMO to be able to support both of these Spigot updated PlayerAnimationEvent with an API break between versions 1.18 and 1.19, as a temporary fix for mcMMO to be able to support both of these

View File

@ -74,7 +74,7 @@ public class LevelUpBroadcastPredicate<T extends CommandSender> implements Predi
} }
//Visibility checks //Visibility checks
if(!listeningPlayer.canSee(mmoBroadcastingPlayer.getPlayer())) { if(!listeningPlayer.canSee(mmoBroadcastingPlayer.getPlayer()) && listeningPlayer != mmoBroadcastingPlayer.getPlayer()) {
return false; //Player who leveled should be invisible to this player so don't send the message return false; //Player who leveled should be invisible to this player so don't send the message
} }

View File

@ -74,7 +74,7 @@ public class PowerLevelUpBroadcastPredicate<T extends CommandSender> implements
} }
//Visibility checks //Visibility checks
if(!listeningPlayer.canSee(mmoBroadcastingPlayer.getPlayer())) { if(!listeningPlayer.canSee(mmoBroadcastingPlayer.getPlayer()) && listeningPlayer != mmoBroadcastingPlayer.getPlayer()) {
return false; //Player who leveled should be invisible to this player so don't send the message return false; //Player who leveled should be invisible to this player so don't send the message
} }