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.command.CommandSender;
|
||||||
import org.bukkit.entity.Player;
|
import org.bukkit.entity.Player;
|
||||||
|
|
||||||
import java.io.IOException;
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.Collection;
|
import java.util.Collection;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
@ -170,9 +169,9 @@ public class SchematicCommand implements CommandExecutor {
|
|||||||
try {
|
try {
|
||||||
schematic.loadToPlayer(player);
|
schematic.loadToPlayer(player);
|
||||||
player.sendMessage(SchematicSystem.PREFIX + "Schematic §e" + schematic.getSchemName() + " §7geladen");
|
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);
|
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 {
|
try {
|
||||||
schematic.saveFromPlayer(player);
|
schematic.saveFromPlayer(player);
|
||||||
}catch(IOException ex){
|
}catch (NoClipboardException e) {
|
||||||
Bukkit.getLogger().log(Level.SEVERE, "Could not save schematic", ex);
|
player.sendMessage(SchematicSystem.PREFIX + "§cDein Clipboard ist leer");
|
||||||
player.sendMessage(SchematicSystem.PREFIX + "§cFehler beim Speichern der Schematic. Bitte wende dich an einen Developer");
|
|
||||||
if(newSchem)
|
if(newSchem)
|
||||||
schematic.remove();
|
schematic.remove();
|
||||||
return;
|
return;
|
||||||
}catch (NoClipboardException e) {
|
}catch(Exception ex){
|
||||||
player.sendMessage(SchematicSystem.PREFIX + "§cDein Clipboard ist leer");
|
Bukkit.getLogger().log(Level.SEVERE, "Could not save schematic", ex);
|
||||||
|
player.sendMessage(SchematicSystem.PREFIX + "§cFehler beim Speichern der Schematic.");
|
||||||
if(newSchem)
|
if(newSchem)
|
||||||
schematic.remove();
|
schematic.remove();
|
||||||
return;
|
return;
|
||||||
|
In neuem Issue referenzieren
Einen Benutzer sperren