Fixing AutoCheck for new Schematic in dbs
Dieser Commit ist enthalten in:
Ursprung
35a227864a
Commit
ea312f88a2
@ -1,17 +1,15 @@
|
||||
package de.steamwar.schematicsystem;
|
||||
|
||||
import com.boydti.fawe.FaweAPI;
|
||||
import com.sk89q.jnbt.CompoundTag;
|
||||
import com.sk89q.worldedit.Vector;
|
||||
import com.sk89q.worldedit.blocks.BaseBlock;
|
||||
import com.sk89q.worldedit.extent.clipboard.Clipboard;
|
||||
import com.sk89q.worldedit.regions.Region;
|
||||
import de.steamwar.sql.NoClipboardException;
|
||||
import de.steamwar.sql.Schematic;
|
||||
import de.steamwar.sql.SteamwarUser;
|
||||
import org.bukkit.Bukkit;
|
||||
import org.bukkit.Material;
|
||||
|
||||
import java.io.File;
|
||||
import java.io.IOException;
|
||||
import java.util.HashSet;
|
||||
import java.util.List;
|
||||
@ -68,12 +66,12 @@ class CheckSchemType_12 {
|
||||
|
||||
static void autoCheck(Schematic schematic, List<String> errors, List<String> warnings, ICheckSchemType type) {
|
||||
Clipboard clipboard;
|
||||
|
||||
try {
|
||||
clipboard = FaweAPI.load(new File(Constants.SCHEM_DIR + SteamwarUser.get(schematic.getSchemOwner()).getUUID(), schematic.getSchemName() + ".schematic")).getClipboard();
|
||||
if(clipboard == null)
|
||||
throw new IOException();
|
||||
} catch (IOException e) {
|
||||
clipboard = schematic.load();
|
||||
} catch (Schematic.WrongVersionException e) {
|
||||
errors.add("Der Schematictyp dieser Schematic kann nicht in dieser Version geändert werden.");
|
||||
return;
|
||||
} catch (IOException | NoClipboardException e) {
|
||||
Bukkit.getLogger().log(Level.SEVERE, "Schematic could not be loaded", e);
|
||||
errors.add("Die Schematic konnte nicht geladen werden");
|
||||
return;
|
||||
|
@ -1,17 +1,15 @@
|
||||
package de.steamwar.schematicsystem;
|
||||
|
||||
import com.boydti.fawe.FaweAPI;
|
||||
import com.sk89q.jnbt.CompoundTag;
|
||||
import com.sk89q.worldedit.extent.clipboard.Clipboard;
|
||||
import com.sk89q.worldedit.math.BlockVector3;
|
||||
import com.sk89q.worldedit.regions.Region;
|
||||
import com.sk89q.worldedit.world.block.BaseBlock;
|
||||
import de.steamwar.sql.NoClipboardException;
|
||||
import de.steamwar.sql.Schematic;
|
||||
import de.steamwar.sql.SteamwarUser;
|
||||
import org.bukkit.Bukkit;
|
||||
import org.bukkit.Material;
|
||||
|
||||
import java.io.File;
|
||||
import java.io.IOException;
|
||||
import java.util.EnumSet;
|
||||
import java.util.List;
|
||||
@ -54,12 +52,12 @@ class CheckSchemType_14 {
|
||||
|
||||
static void autoCheck(Schematic schematic, List<String> errors, List<String> warnings, ICheckSchemType type) {
|
||||
Clipboard clipboard;
|
||||
|
||||
try {
|
||||
clipboard = FaweAPI.load(new File(Constants.SCHEM_DIR + SteamwarUser.get(schematic.getSchemOwner()).getUUID(), schematic.getSchemName() + ".schematic")).getClipboard();
|
||||
if(clipboard == null)
|
||||
throw new IOException();
|
||||
} catch (IOException e) {
|
||||
clipboard = schematic.load();
|
||||
} catch (Schematic.WrongVersionException e) {
|
||||
errors.add("Der Schematictyp dieser Schematic kann nicht in dieser Version geändert werden.");
|
||||
return;
|
||||
} catch (IOException | NoClipboardException e) {
|
||||
Bukkit.getLogger().log(Level.SEVERE, "Schematic could not be loaded", e);
|
||||
errors.add("Die Schematic konnte nicht geladen werden");
|
||||
return;
|
||||
|
In neuem Issue referenzieren
Einen Benutzer sperren