Skip to content

Commit 36764ff

Browse files
committed
Also strip under BungeeChat mode to support ChatColor plugin etc.
1 parent 8a752c2 commit 36764ff

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

src/main/java/org/maxgamer/quickshop/shop/ShopManager.java

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -485,8 +485,10 @@ public void handleChat(@NotNull Player p, @NotNull String msg, boolean bypassPro
485485
if (!plugin.getShopManager().getActions().containsKey(p.getUniqueId())) {
486486
return;
487487
}
488-
final String message = ChatColor.stripColor(msg);
488+
String message = net.md_5.bungee.api.ChatColor.stripColor(msg);
489+
message = ChatColor.stripColor(message);
489490
// Use from the main thread, because Bukkit hates life
491+
String finalMessage = message;
490492
Util.mainThreadRun(() -> {
491493
Map<UUID, Info> actions = getActions();
492494
// They wanted to do something.
@@ -500,10 +502,10 @@ public void handleChat(@NotNull Player p, @NotNull String msg, boolean bypassPro
500502
return;
501503
}
502504
if (info.getAction() == ShopAction.CREATE) {
503-
actionCreate(p, info, message, bypassProtectionChecks);
505+
actionCreate(p, info, finalMessage, bypassProtectionChecks);
504506
}
505507
if (info.getAction() == ShopAction.BUY) {
506-
actionTrade(p, info, message);
508+
actionTrade(p, info, finalMessage);
507509
}
508510
});
509511
}

0 commit comments

Comments
 (0)