mirror of
https://github.com/BentoBoxWorld/BentoBox.git
synced 2024-09-16 17:14:16 +02:00
Avoid using printStackTrace in BlueprintsManager
This commit is contained in:
parent
7dc4c88dd9
commit
7c07982669
@ -1,32 +1,14 @@
|
|||||||
package world.bentobox.bentobox.managers;
|
package world.bentobox.bentobox.managers;
|
||||||
|
|
||||||
import java.io.File;
|
import com.google.gson.Gson;
|
||||||
import java.io.FileReader;
|
import com.google.gson.GsonBuilder;
|
||||||
import java.io.FileWriter;
|
import com.google.gson.InstanceCreator;
|
||||||
import java.io.IOException;
|
|
||||||
import java.lang.reflect.ParameterizedType;
|
|
||||||
import java.lang.reflect.Type;
|
|
||||||
import java.util.Collection;
|
|
||||||
import java.util.Collections;
|
|
||||||
import java.util.EnumMap;
|
|
||||||
import java.util.HashMap;
|
|
||||||
import java.util.Locale;
|
|
||||||
import java.util.Map;
|
|
||||||
import java.util.Objects;
|
|
||||||
import java.util.TreeMap;
|
|
||||||
import java.util.jar.JarFile;
|
|
||||||
|
|
||||||
import org.bukkit.ChatColor;
|
import org.bukkit.ChatColor;
|
||||||
import org.bukkit.Material;
|
import org.bukkit.Material;
|
||||||
import org.bukkit.World;
|
import org.bukkit.World;
|
||||||
import org.bukkit.util.Vector;
|
import org.bukkit.util.Vector;
|
||||||
import org.eclipse.jdt.annotation.NonNull;
|
import org.eclipse.jdt.annotation.NonNull;
|
||||||
import org.eclipse.jdt.annotation.Nullable;
|
import org.eclipse.jdt.annotation.Nullable;
|
||||||
|
|
||||||
import com.google.gson.Gson;
|
|
||||||
import com.google.gson.GsonBuilder;
|
|
||||||
import com.google.gson.InstanceCreator;
|
|
||||||
|
|
||||||
import world.bentobox.bentobox.BentoBox;
|
import world.bentobox.bentobox.BentoBox;
|
||||||
import world.bentobox.bentobox.api.addons.Addon;
|
import world.bentobox.bentobox.api.addons.Addon;
|
||||||
import world.bentobox.bentobox.api.addons.GameModeAddon;
|
import world.bentobox.bentobox.api.addons.GameModeAddon;
|
||||||
@ -45,6 +27,22 @@ import world.bentobox.bentobox.database.objects.Island;
|
|||||||
import world.bentobox.bentobox.schems.SchemToBlueprint;
|
import world.bentobox.bentobox.schems.SchemToBlueprint;
|
||||||
import world.bentobox.bentobox.util.Util;
|
import world.bentobox.bentobox.util.Util;
|
||||||
|
|
||||||
|
import java.io.File;
|
||||||
|
import java.io.FileReader;
|
||||||
|
import java.io.FileWriter;
|
||||||
|
import java.io.IOException;
|
||||||
|
import java.lang.reflect.ParameterizedType;
|
||||||
|
import java.lang.reflect.Type;
|
||||||
|
import java.util.Collection;
|
||||||
|
import java.util.Collections;
|
||||||
|
import java.util.EnumMap;
|
||||||
|
import java.util.HashMap;
|
||||||
|
import java.util.Locale;
|
||||||
|
import java.util.Map;
|
||||||
|
import java.util.Objects;
|
||||||
|
import java.util.TreeMap;
|
||||||
|
import java.util.jar.JarFile;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Handles Blueprints
|
* Handles Blueprints
|
||||||
* @since 1.5.0
|
* @since 1.5.0
|
||||||
@ -178,7 +176,7 @@ public class BlueprintsManager {
|
|||||||
loaded = true;
|
loaded = true;
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
plugin.logError("Could not load blueprint bundle " + file.getName() + " " + e.getMessage());
|
plugin.logError("Could not load blueprint bundle " + file.getName() + " " + e.getMessage());
|
||||||
e.printStackTrace();
|
plugin.logStacktrace(e);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return loaded;
|
return loaded;
|
||||||
@ -228,7 +226,7 @@ public class BlueprintsManager {
|
|||||||
plugin.log("Loaded blueprint '" + bp.getName() + "' for " + addon.getDescription().getName());
|
plugin.log("Loaded blueprint '" + bp.getName() + "' for " + addon.getDescription().getName());
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
plugin.logError("Could not load blueprint " + fileName + " " + e.getMessage());
|
plugin.logError("Could not load blueprint " + fileName + " " + e.getMessage());
|
||||||
e.printStackTrace();
|
plugin.logStacktrace(e);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -254,9 +252,9 @@ public class BlueprintsManager {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Save blueprint bundles for game mode
|
* Save blueprint bundle for game mode
|
||||||
* @param addon - gamemode addon
|
* @param addon - gamemode addon
|
||||||
* @param bundleList - list of bundles
|
* @param bb blueprint bundle to save
|
||||||
*/
|
*/
|
||||||
public void saveBlueprintBundle(GameModeAddon addon, BlueprintBundle bb) {
|
public void saveBlueprintBundle(GameModeAddon addon, BlueprintBundle bb) {
|
||||||
File bpf = getBlueprintsFolder(addon);
|
File bpf = getBlueprintsFolder(addon);
|
||||||
|
Loading…
Reference in New Issue
Block a user