From 8db5f34082dd2d259972acc658c6606721bd2c2b Mon Sep 17 00:00:00 2001 From: Nao Pross Date: Tue, 20 Nov 2018 14:10:48 +0100 Subject: Separate MapLoader constructors --- src/subconscious/MapLoader.java | 12 ++++++------ 1 file 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() { -- cgit v1.2.1