Skip to content

Commit

Permalink
Update DistortChat.java
Browse files Browse the repository at this point in the history
Allow 0% drunk players messages to be slurred.
  • Loading branch information
Feriixu committed Jan 28, 2021
1 parent cb86a90 commit 16bced4
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/com/dre/brewery/DistortChat.java
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,9 @@ public static void signWrite(SignChangeEvent event) {
// Distort players words when he talks
public static void playerChat(AsyncPlayerChatEvent event) {
BPlayer bPlayer = BPlayer.get(event.getPlayer());
if (bPlayer != null) {
if (bPlayer == null) {
bPlayer = new BPlayer(event.getPlayer().getUniqueId().toString());
}
if (!words.isEmpty()) {
String message = event.getMessage();
if (log) {
Expand All @@ -146,7 +148,6 @@ public static void playerChat(AsyncPlayerChatEvent event) {

event.setMessage(distorted);
}
}
}

// distorts a message, ignoring text enclosed in ignoreText letters
Expand Down

0 comments on commit 16bced4

Please sign in to comment.