From d658367be7ba7ae1f272a12b5e1f1286c1d9c770 Mon Sep 17 00:00:00 2001 From: Anuken Date: Fri, 31 Jul 2020 16:29:37 -0400 Subject: [PATCH] Fixed #2290 --- core/src/mindustry/ui/fragments/ChatFragment.java | 2 +- core/src/mindustry/ui/fragments/PlacementFragment.java | 2 +- core/src/mindustry/ui/fragments/ScriptConsoleFragment.java | 2 +- gradle.properties | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/core/src/mindustry/ui/fragments/ChatFragment.java b/core/src/mindustry/ui/fragments/ChatFragment.java index 55cb2af28d..a48e5116a2 100644 --- a/core/src/mindustry/ui/fragments/ChatFragment.java +++ b/core/src/mindustry/ui/fragments/ChatFragment.java @@ -171,7 +171,7 @@ public class ChatFragment extends Table{ String message = chatfield.getText(); clearChatInput(); - if(message.replaceAll(" ", "").isEmpty()) return; + if(message.replace(" ", "").isEmpty()) return; history.insert(1, message); diff --git a/core/src/mindustry/ui/fragments/PlacementFragment.java b/core/src/mindustry/ui/fragments/PlacementFragment.java index 26f4bdc014..186f0c2aea 100644 --- a/core/src/mindustry/ui/fragments/PlacementFragment.java +++ b/core/src/mindustry/ui/fragments/PlacementFragment.java @@ -160,7 +160,7 @@ public class PlacementFragment extends Fragment{ blockSelectEnd = true; } Seq blocks = getByCategory(currentCategory); - if(!unlocked(blocks.get(i))) return true; + if(i >= blocks.size || !unlocked(blocks.get(i))) return true; input.block = (i < blocks.size) ? blocks.get(i) : null; selectedBlocks.put(currentCategory, input.block); blockSelectSeqMillis = Time.millis(); diff --git a/core/src/mindustry/ui/fragments/ScriptConsoleFragment.java b/core/src/mindustry/ui/fragments/ScriptConsoleFragment.java index 2d8b88b813..b33fd014b1 100644 --- a/core/src/mindustry/ui/fragments/ScriptConsoleFragment.java +++ b/core/src/mindustry/ui/fragments/ScriptConsoleFragment.java @@ -159,7 +159,7 @@ public class ScriptConsoleFragment extends Table{ String message = chatfield.getText(); clearChatInput(); - if(message.replaceAll(" ", "").isEmpty()) return; + if(message.replace(" ", "").isEmpty()) return; //special case for 'clear' command if(message.equals("clear")){ diff --git a/gradle.properties b/gradle.properties index 46bd763afb..6f31d71c9c 100644 --- a/gradle.properties +++ b/gradle.properties @@ -1,3 +1,3 @@ org.gradle.daemon=true org.gradle.jvmargs=-Xms256m -Xmx1024m -archash=1f28caadca013e38e2922f6835961500907bcafc +archash=a57382410169d73ada6bc54bdb02fa709aa90558