Adapt SchematicSystem to new error handling
Signed-off-by: Lixfel <agga-games@gmx.de>
Dieser Commit ist enthalten in:
Ursprung
d1fee64909
Commit
82fe02b5f3
@ -34,7 +34,6 @@ import org.bukkit.command.CommandExecutor;
|
||||
import org.bukkit.command.CommandSender;
|
||||
import org.bukkit.entity.Player;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collection;
|
||||
import java.util.List;
|
||||
@ -170,9 +169,9 @@ public class SchematicCommand implements CommandExecutor {
|
||||
try {
|
||||
schematic.loadToPlayer(player);
|
||||
player.sendMessage(SchematicSystem.PREFIX + "Schematic §e" + schematic.getSchemName() + " §7geladen");
|
||||
}catch (IOException | NoClipboardException e){
|
||||
}catch (Exception e){
|
||||
Bukkit.getLogger().log(Level.SEVERE, "Schematic konnte nicht geladen werden", e);
|
||||
player.sendMessage(SchematicSystem.PREFIX + "§cFehler beim Laden der Schematic. Bitte wende dich an einen Developer");
|
||||
player.sendMessage(SchematicSystem.PREFIX + "§cFehler beim Laden der Schematic. Dies liegt wahrscheinlich an einer defekten Schematic.");
|
||||
}
|
||||
}
|
||||
|
||||
@ -218,14 +217,14 @@ public class SchematicCommand implements CommandExecutor {
|
||||
|
||||
try {
|
||||
schematic.saveFromPlayer(player);
|
||||
}catch(IOException ex){
|
||||
Bukkit.getLogger().log(Level.SEVERE, "Could not save schematic", ex);
|
||||
player.sendMessage(SchematicSystem.PREFIX + "§cFehler beim Speichern der Schematic. Bitte wende dich an einen Developer");
|
||||
}catch (NoClipboardException e) {
|
||||
player.sendMessage(SchematicSystem.PREFIX + "§cDein Clipboard ist leer");
|
||||
if(newSchem)
|
||||
schematic.remove();
|
||||
return;
|
||||
}catch (NoClipboardException e) {
|
||||
player.sendMessage(SchematicSystem.PREFIX + "§cDein Clipboard ist leer");
|
||||
}catch(Exception ex){
|
||||
Bukkit.getLogger().log(Level.SEVERE, "Could not save schematic", ex);
|
||||
player.sendMessage(SchematicSystem.PREFIX + "§cFehler beim Speichern der Schematic.");
|
||||
if(newSchem)
|
||||
schematic.remove();
|
||||
return;
|
||||
|
In neuem Issue referenzieren
Einen Benutzer sperren