Remove useless dependencies
This commit is contained in:
parent
d607149097
commit
cf03a04786
|
@ -2,7 +2,6 @@ package fr.ynerant.leveleditor.api.editor.sprites;
|
||||||
|
|
||||||
import com.google.gson.Gson;
|
import com.google.gson.Gson;
|
||||||
import fr.ynerant.leveleditor.client.main.Main;
|
import fr.ynerant.leveleditor.client.main.Main;
|
||||||
import org.apache.logging.log4j.LogManager;
|
|
||||||
|
|
||||||
import javax.imageio.ImageIO;
|
import javax.imageio.ImageIO;
|
||||||
import java.awt.image.BufferedImage;
|
import java.awt.image.BufferedImage;
|
||||||
|
@ -105,7 +104,8 @@ public class SpriteRegister {
|
||||||
|
|
||||||
sprites.put(key, cat);
|
sprites.put(key, cat);
|
||||||
} catch (Throwable t) {
|
} catch (Throwable t) {
|
||||||
LogManager.getLogger("SpriteRegister").fatal("Erreur lors de la lecture du sprite '" + key + "'", t);
|
System.err.println("Erreur lors de la lecture du sprite '" + key + "'");
|
||||||
|
t.printStackTrace();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} catch (IOException e) {
|
} catch (IOException e) {
|
||||||
|
|
|
@ -8,11 +8,6 @@ import fr.ynerant.leveleditor.game.GameFrame;
|
||||||
import joptsimple.OptionParser;
|
import joptsimple.OptionParser;
|
||||||
import joptsimple.OptionSet;
|
import joptsimple.OptionSet;
|
||||||
import joptsimple.OptionSpec;
|
import joptsimple.OptionSpec;
|
||||||
import org.apache.logging.log4j.Level;
|
|
||||||
import org.apache.logging.log4j.LogManager;
|
|
||||||
import org.apache.logging.log4j.core.Logger;
|
|
||||||
import org.apache.logging.log4j.core.appender.ConsoleAppender;
|
|
||||||
import org.apache.logging.log4j.core.layout.PatternLayout;
|
|
||||||
|
|
||||||
import javax.swing.*;
|
import javax.swing.*;
|
||||||
import java.awt.*;
|
import java.awt.*;
|
||||||
|
@ -65,12 +60,6 @@ public class Main {
|
||||||
DEV = false;
|
DEV = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
Logger LOGGER = (Logger) LogManager.getRootLogger();
|
|
||||||
ConsoleAppender console = ConsoleAppender.newBuilder().setLayout(PatternLayout.newBuilder().withPattern("[%d{dd/MM/yyyy}] [%d{HH:mm:ss}] [%t] [%c] [%p] %m%n").build()).setName("Console").build();
|
|
||||||
console.start();
|
|
||||||
LOGGER.addAppender(console);
|
|
||||||
LOGGER.setLevel(Level.INFO);
|
|
||||||
|
|
||||||
checkJava();
|
checkJava();
|
||||||
|
|
||||||
OptionParser parser = new OptionParser();
|
OptionParser parser = new OptionParser();
|
||||||
|
@ -109,8 +98,8 @@ public class Main {
|
||||||
private static void checkJava() {
|
private static void checkJava() {
|
||||||
if (GraphicsEnvironment.isHeadless()) {
|
if (GraphicsEnvironment.isHeadless()) {
|
||||||
HeadlessException ex = new HeadlessException("Impossible de lancer un jeu sans \u00e9cran !");
|
HeadlessException ex = new HeadlessException("Impossible de lancer un jeu sans \u00e9cran !");
|
||||||
LogManager.getLogger("JAVAX-SWING").fatal("Cette application est un jeu, sans écran, elle aura du mal \u00e0 tourner ...");
|
System.err.println("Cette application est un jeu, sans écran, elle aura du mal \u00e0 tourner ...");
|
||||||
LogManager.getLogger("JAVAX-SWING").catching(Level.FATAL, ex);
|
ex.printStackTrace();
|
||||||
System.exit(1);
|
System.exit(1);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue