From 638b3d908e16ecfdc8f1133e88f38fefe86abe61 Mon Sep 17 00:00:00 2001 From: rbluer <665978+rbluer@users.noreply.github.com> Date: Sun, 28 Apr 2024 11:41:19 -0400 Subject: [PATCH] Auto features: Inventory full chat notification: bug fix. This fixes using the wrong player object. It now use prison's player object so the color codes are properly translated. --- docs/changelog_v3.3.x.md | 4 ++++ .../prison/spigot/autofeatures/AutoManagerFeatures.java | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/docs/changelog_v3.3.x.md b/docs/changelog_v3.3.x.md index 3de04fb6e..0dbd1770c 100644 --- a/docs/changelog_v3.3.x.md +++ b/docs/changelog_v3.3.x.md @@ -17,6 +17,10 @@ These change logs represent the work that has been going on within prison. # 3.3.0-alpha.17 2024-04-28 +* **Auto features: Inventory full chat notification: bug fix. This fixes using the wrong player object.** +It now use prison's player object so the color codes are properly translated. + + * **Placeholders: bug fix: When using a search from the console which included a player name, it was generating an invalid cast to a SpigotPlayer object when it wasn't related to that class due to the player being offline.** diff --git a/prison-spigot/src/main/java/tech/mcprison/prison/spigot/autofeatures/AutoManagerFeatures.java b/prison-spigot/src/main/java/tech/mcprison/prison/spigot/autofeatures/AutoManagerFeatures.java index 587cf4839..d7da40c9b 100644 --- a/prison-spigot/src/main/java/tech/mcprison/prison/spigot/autofeatures/AutoManagerFeatures.java +++ b/prison-spigot/src/main/java/tech/mcprison/prison/spigot/autofeatures/AutoManagerFeatures.java @@ -1711,7 +1711,7 @@ else if ( new BluesSpigetSemVerComparator().compareMCVersionTo( "1.13.0" ) < 0 ) } else { - player.sendMessage( message ); + (new SpigotPlayer( player )).sendMessage( message ); } // holographic display for showing full inventory does not work well.