summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNao Pross <naopross@thearcway.org>2018-11-20 14:10:48 +0100
committerNao Pross <naopross@thearcway.org>2018-11-20 14:10:48 +0100
commit8db5f34082dd2d259972acc658c6606721bd2c2b (patch)
treec40d9c855b4b8c5db6e62a29d2ed30cbc47e7d36
parentImplement unbreakable weapons (diff)
downloadSubconscious-java-8db5f34082dd2d259972acc658c6606721bd2c2b.tar.gz
Subconscious-java-8db5f34082dd2d259972acc658c6606721bd2c2b.zip
Separate MapLoader constructors
-rw-r--r--src/subconscious/MapLoader.java12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/subconscious/MapLoader.java b/src/subconscious/MapLoader.java
index 2233a8d..2bc320c 100644
--- a/src/subconscious/MapLoader.java
+++ b/src/subconscious/MapLoader.java
@@ -18,12 +18,12 @@ import com.google.gson.Gson;
public class MapLoader {
File path;
- public MapLoader(Object path) {
- if (path instanceof java.io.File) {
- this.path = (File) path;
- } else {
- this.path = new File((String) path);
- }
+ public MapLoader(String path) {
+ this.path = new File(path);
+ }
+
+ public MapLoader(File file) {
+ this.path = file;
}
public Map getMap() {