Strip all non digits from the chat message when typing the price

This commit is contained in:
Kai committed 2016-08-23 09:49:07 +02:00
1 parent 2b084cd35a
commit 672a3c0433
1 file changed
+1 -1
@@ -254,7 +254,7 @@ public class ShopManager {
}
public void handleChat(final Player p, String msg) {
final String message = ChatColor.stripColor(msg);
final String message = ChatColor.stripColor(msg).replaceAll("[^\\d]+", "");
// Use from the main thread, because Bukkit hates life
Bukkit.getScheduler().scheduleSyncDelayedTask(plugin, new Runnable() {
@SuppressWarnings("deprecation")