Refactor package

This commit is contained in:
Marc Baloup 2019-10-26 23:15:49 +02:00
parent e23a19213c
commit 05d115cd19
85 changed files with 206 additions and 320 deletions

View File

@ -1,4 +1,4 @@
package fr.pandacube.java; package fr.pandacube;
import java.nio.charset.Charset; import java.nio.charset.Charset;

View File

@ -1,117 +0,0 @@
package fr.pandacube.java.external_tools;
import java.util.ArrayList;
import java.util.List;
import java.util.Objects;
public class Main {
static class Row {
int rowid;
String date, user, uuid;
int wid, x, y, z, type, amount, action;
boolean rolled_back;
}
static class Chest {
final int wid, x, y, z, hashCode;
List<Row> sources = new ArrayList<>();
int actualCount = 0;
boolean alreadyRolledBack = false;
public Chest(int w, int wx, int wy, int wz) {
wid = w;
x = wx;
y = wy;
z = wz;
hashCode = Objects.hash(wid, x, y, z);
}
@Override
public boolean equals(Object o) {
if (o == null || !(o instanceof Chest))
return false;
Chest c = (Chest) o;
return wid == c.wid && x == c.x && y == c.y && z == c.z;
}
@Override
public int hashCode() {
return hashCode;
}
@Override
public String toString() {
return "world=" + wid + " - /tppos " + x + " " + y + " " + z + " - rolledBack=" + alreadyRolledBack + " - amount=" + actualCount;
}
public String toCSVString() {
return wid + "," + x + "," + y + "," + z + "," + alreadyRolledBack + "," + actualCount;
}
}
public static void main(String args[]) throws Exception {
/*CSVParser parser = new CSVParser(new FileReader("co_survie_container.csv"), CSVFormat.DEFAULT);
List<Row> rows = StreamSupport.stream(parser.spliterator(), false).map(r -> {
Row ret = new Row();
ret.rowid = Integer.parseInt(r.get(0));
ret.date = r.get(1);
ret.user = r.get(2);
ret.uuid = r.get(3);
ret.wid = Integer.parseInt(r.get(4));
ret.x = Integer.parseInt(r.get(5));
ret.y = Integer.parseInt(r.get(6));
ret.z = Integer.parseInt(r.get(7));
ret.type = Integer.parseInt(r.get(8));
ret.amount = Integer.parseInt(r.get(9));
ret.action = Integer.parseInt(r.get(10));
ret.rolled_back = r.get(11).equals("1");
return ret;
}).collect(Collectors.toList());
rows.sort(Comparator.comparingInt(r -> r.rowid));
List<Chest> chests = new ArrayList<>();
for (Row row : rows) {
Chest c = new Chest(row.wid, row.x, row.y, row.z);
int idx = chests.indexOf(c);
c = (idx >= 0) ? chests.get(idx) : c;
if (idx < 0) {
chests.add(c);
idx = chests.size() - 1;
}
c.sources.add(row);
if (row.rolled_back)
c.alreadyRolledBack = true;
if (!c.alreadyRolledBack) {
c.actualCount += (row.action == 1) ? row.amount : -row.amount;
if (c.actualCount == 0) {
chests.remove(idx);
}
}
}
chests.sort(Comparator.comparingInt(c -> c.actualCount));
chests.forEach(c -> System.out.println(c.toCSVString()));
*/
}
}

View File

@ -1,30 +0,0 @@
package fr.pandacube.java.util.measurement;
import java.text.DecimalFormat;
public class MemoryUtil {
private static final DecimalFormat format = new DecimalFormat("#####0.00");
public static String humanReadableSize(long octet, boolean si) {
double size = octet;
int diveBy = si ? 1000 : 1024;
if (size < diveBy) return size + "o";
size /= diveBy;
if (size < diveBy) return format.format(size) + (si ? "ko" : "kio");
size /= diveBy;
if (size < diveBy) return format.format(size) + (si ? "Mo" : "Mio");
size /= diveBy;
if (size < diveBy) return format.format(size) + (si ? "Go" : "Gio");
size /= diveBy;
return format.format(size) + (si ? "To" : "Tio");
}
public static String humanReadableSize(long octet) {
return humanReadableSize(octet, false);
}
}

View File

@ -1,4 +1,4 @@
package fr.pandacube.java.util; package fr.pandacube.util;
import java.util.HashMap; import java.util.HashMap;
import java.util.Iterator; import java.util.Iterator;

View File

@ -1,4 +1,4 @@
package fr.pandacube.java.util; package fr.pandacube.util;
@FunctionalInterface @FunctionalInterface
public interface Callback<T> { public interface Callback<T> {

View File

@ -1,4 +1,4 @@
package fr.pandacube.java.util; package fr.pandacube.util;
import java.util.Calendar; import java.util.Calendar;
import java.util.GregorianCalendar; import java.util.GregorianCalendar;

View File

@ -1,4 +1,4 @@
package fr.pandacube.java.util; package fr.pandacube.util;
public class EnumUtil { public class EnumUtil {

View File

@ -1,4 +1,4 @@
package fr.pandacube.java.util; package fr.pandacube.util;
import java.net.URL; import java.net.URL;
import java.util.ArrayList; import java.util.ArrayList;

View File

@ -1,4 +1,4 @@
package fr.pandacube.java.util; package fr.pandacube.util;
//****************************************************************************** //******************************************************************************
//*** //***

View File

@ -1,4 +1,4 @@
package fr.pandacube.java.util; package fr.pandacube.util;
import java.util.concurrent.atomic.AtomicBoolean; import java.util.concurrent.atomic.AtomicBoolean;
import java.util.logging.Level; import java.util.logging.Level;

View File

@ -1,4 +1,4 @@
package fr.pandacube.java.util; package fr.pandacube.util;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.Arrays; import java.util.Arrays;

View File

@ -1,4 +1,4 @@
package fr.pandacube.java.util; package fr.pandacube.util;
public class MinecraftWebUtil { public class MinecraftWebUtil {

View File

@ -1,4 +1,4 @@
package fr.pandacube.java.external_tools; package fr.pandacube.util;
import java.nio.charset.Charset; import java.nio.charset.Charset;
import java.util.UUID; import java.util.UUID;
@ -17,7 +17,7 @@ public class OfflineUUID {
return UUID.nameUUIDFromBytes(from_str); return UUID.nameUUIDFromBytes(from_str);
} }
public static UUID[] getFromNickName(String[] nicknames) { public static UUID[] getFromNickNames(String[] nicknames) {
if (nicknames == null) throw new NullPointerException(); if (nicknames == null) throw new NullPointerException();
UUID[] uuids = new UUID[nicknames.length]; UUID[] uuids = new UUID[nicknames.length];

View File

@ -1,4 +1,4 @@
package fr.pandacube.java.util; package fr.pandacube.util;
import java.io.BufferedReader; import java.io.BufferedReader;
import java.io.IOException; import java.io.IOException;

View File

@ -1,4 +1,4 @@
package fr.pandacube.java.util; package fr.pandacube.util;
import java.util.List; import java.util.List;
import java.util.Random; import java.util.Random;

View File

@ -1,4 +1,4 @@
package fr.pandacube.java.util; package fr.pandacube.util;
import java.lang.reflect.Field; import java.lang.reflect.Field;
import java.lang.reflect.Method; import java.lang.reflect.Method;

View File

@ -1,4 +1,4 @@
package fr.pandacube.java.util; package fr.pandacube.util;
import java.io.BufferedReader; import java.io.BufferedReader;
import java.io.BufferedWriter; import java.io.BufferedWriter;

View File

@ -1,4 +1,4 @@
package fr.pandacube.java.util; package fr.pandacube.util;
import java.util.List; import java.util.List;

View File

@ -1,4 +1,4 @@
package fr.pandacube.java.util; package fr.pandacube.util;
import java.io.ByteArrayOutputStream; import java.io.ByteArrayOutputStream;
import java.io.IOException; import java.io.IOException;

View File

@ -1,4 +1,4 @@
package fr.pandacube.java.util; package fr.pandacube.util;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.HashMap; import java.util.HashMap;

View File

@ -1,4 +1,4 @@
package fr.pandacube.java.util.commands; package fr.pandacube.util.commands;
import java.util.Arrays; import java.util.Arrays;

View File

@ -1,4 +1,4 @@
package fr.pandacube.java.util.commands; package fr.pandacube.util.commands;
import java.util.logging.Logger; import java.util.logging.Logger;

View File

@ -1,4 +1,4 @@
package fr.pandacube.java.util.commands; package fr.pandacube.util.commands;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.Arrays; import java.util.Arrays;

View File

@ -1,4 +1,4 @@
package fr.pandacube.java.util.config; package fr.pandacube.util.config;
import java.io.BufferedReader; import java.io.BufferedReader;
import java.io.File; import java.io.File;
@ -9,7 +9,7 @@ import java.util.Arrays;
import java.util.Collections; import java.util.Collections;
import java.util.List; import java.util.List;
import fr.pandacube.java.util.Log; import fr.pandacube.util.Log;
import net.md_5.bungee.api.ChatColor; import net.md_5.bungee.api.ChatColor;
/** /**
* Classe chargeant en mémoire un fichier de configuration ou un dossier donné * Classe chargeant en mémoire un fichier de configuration ou un dossier donné

View File

@ -1,4 +1,4 @@
package fr.pandacube.java.util.config; package fr.pandacube.util.config;
import java.io.File; import java.io.File;
import java.io.IOException; import java.io.IOException;

View File

@ -1,4 +1,4 @@
package fr.pandacube.java.util.measurement; package fr.pandacube.util.measurement;
import java.text.DecimalFormat; import java.text.DecimalFormat;
import java.util.Arrays; import java.util.Arrays;

View File

@ -0,0 +1,32 @@
package fr.pandacube.util.measurement;
import java.text.DecimalFormat;
public class MemoryUtil {
private static final DecimalFormat format = new DecimalFormat("#####0.00");
public static String humanReadableSize(long octet, boolean si) {
boolean neg = octet < 0;
double size = Math.abs(octet);
int diveBy = si ? 1000 : 1024;
if (size < diveBy) return (neg ? "-" : "") + size + "o";
size /= diveBy;
if (size < diveBy) return (neg ? "-" : "") + format.format(size) + (si ? "ko" : "kio");
size /= diveBy;
if (size < diveBy) return (neg ? "-" : "") + format.format(size) + (si ? "Mo" : "Mio");
size /= diveBy;
if (size < diveBy) return (neg ? "-" : "") + format.format(size) + (si ? "Go" : "Gio");
size /= diveBy;
return (neg ? "-" : "") + format.format(size) + (si ? "To" : "Tio");
}
public static String humanReadableSize(long octet) {
return humanReadableSize(octet, false);
}
}

View File

@ -1,4 +1,4 @@
package fr.pandacube.java.util.measurement; package fr.pandacube.util.measurement;
public class TimeUtil { public class TimeUtil {
public static String durationToString(long msec_time, boolean dec_seconde) { public static String durationToString(long msec_time, boolean dec_seconde) {

View File

@ -1,4 +1,4 @@
package fr.pandacube.java.util.network.client; package fr.pandacube.util.network.client;
import java.io.Closeable; import java.io.Closeable;
import java.io.IOException; import java.io.IOException;
@ -17,17 +17,17 @@ import java.util.concurrent.atomic.AtomicReference;
import java.util.function.Predicate; import java.util.function.Predicate;
import org.apache.commons.lang.builder.ToStringBuilder; import org.apache.commons.lang.builder.ToStringBuilder;
import fr.pandacube.java.Pandacube;
import fr.pandacube.java.util.Log;
import fr.pandacube.java.util.network.packet.Packet;
import fr.pandacube.java.util.network.packet.PacketClient;
import fr.pandacube.java.util.network.packet.PacketException;
import fr.pandacube.java.util.network.packet.PacketServer;
import fr.pandacube.java.util.network.packet.ResponseCallback;
import fr.pandacube.java.util.network.packet.packets.global.PacketD0ServerException;
import org.javatuples.Pair; import org.javatuples.Pair;
import fr.pandacube.Pandacube;
import fr.pandacube.util.Log;
import fr.pandacube.util.network.packet.Packet;
import fr.pandacube.util.network.packet.PacketClient;
import fr.pandacube.util.network.packet.PacketException;
import fr.pandacube.util.network.packet.PacketServer;
import fr.pandacube.util.network.packet.ResponseCallback;
import fr.pandacube.util.network.packet.packets.global.PacketD0ServerException;
public class TCPClient extends Thread implements Closeable { public class TCPClient extends Thread implements Closeable {
private Socket socket; private Socket socket;

View File

@ -1,7 +1,7 @@
package fr.pandacube.java.util.network.client; package fr.pandacube.util.network.client;
import fr.pandacube.java.util.Log; import fr.pandacube.util.Log;
import fr.pandacube.java.util.network.packet.PacketServer; import fr.pandacube.util.network.packet.PacketServer;
public interface TCPClientListener { public interface TCPClientListener {

View File

@ -1,28 +1,28 @@
package fr.pandacube.java.util.network.packet; package fr.pandacube.util.network.packet;
import java.nio.charset.Charset; import java.nio.charset.Charset;
import java.util.Arrays; import java.util.Arrays;
import java.util.HashMap; import java.util.HashMap;
import java.util.Map; import java.util.Map;
import fr.pandacube.java.Pandacube; import fr.pandacube.Pandacube;
import fr.pandacube.java.util.Log; import fr.pandacube.util.Log;
import fr.pandacube.java.util.network.packet.bytebuffer.ByteBuffer; import fr.pandacube.util.network.packet.bytebuffer.ByteBuffer;
import fr.pandacube.java.util.network.packet.bytebuffer.ByteSerializable; import fr.pandacube.util.network.packet.bytebuffer.ByteSerializable;
import fr.pandacube.java.util.network.packet.packets.core_slave.Packet31ClientClose; import fr.pandacube.util.network.packet.packets.core_slave.Packet30ClientDeclareProcess;
import fr.pandacube.java.util.network.packet.packets.core_slave.Packet30ClientDeclareProcess; import fr.pandacube.util.network.packet.packets.core_slave.Packet31ClientClose;
import fr.pandacube.java.util.network.packet.packets.core_slave.Packet32ClientProcessQueryResponse; import fr.pandacube.util.network.packet.packets.core_slave.Packet32ClientProcessQueryResponse;
import fr.pandacube.java.util.network.packet.packets.core_slave.PacketB0ServerClose; import fr.pandacube.util.network.packet.packets.core_slave.PacketB0ServerClose;
import fr.pandacube.java.util.network.packet.packets.core_slave.PacketB2ServerConnectSuccess; import fr.pandacube.util.network.packet.packets.core_slave.PacketB1ServerProcessDeclarationConfirm;
import fr.pandacube.java.util.network.packet.packets.core_slave.PacketB1ServerProcessDeclarationConfirm; import fr.pandacube.util.network.packet.packets.core_slave.PacketB2ServerConnectSuccess;
import fr.pandacube.java.util.network.packet.packets.core_slave.PacketB3ServerProcessInput; import fr.pandacube.util.network.packet.packets.core_slave.PacketB3ServerProcessInput;
import fr.pandacube.java.util.network.packet.packets.core_slave.PacketB4ServerProcessQuery; import fr.pandacube.util.network.packet.packets.core_slave.PacketB4ServerProcessQuery;
import fr.pandacube.java.util.network.packet.packets.global.Packet50ClientAuthenticate; import fr.pandacube.util.network.packet.packets.global.Packet50ClientAuthenticate;
import fr.pandacube.java.util.network.packet.packets.global.Packet51ClientLogRecord; import fr.pandacube.util.network.packet.packets.global.Packet51ClientLogRecord;
import fr.pandacube.java.util.network.packet.packets.global.PacketD1ServerCantAuthenticate; import fr.pandacube.util.network.packet.packets.global.PacketD0ServerException;
import fr.pandacube.java.util.network.packet.packets.global.PacketD0ServerException; import fr.pandacube.util.network.packet.packets.global.PacketD1ServerCantAuthenticate;
import fr.pandacube.java.util.network.packet.packets.web.Packet00ClientWebRequest; import fr.pandacube.util.network.packet.packets.web.Packet00ClientWebRequest;
import fr.pandacube.java.util.network.packet.packets.web.Packet80ServerWebResponse; import fr.pandacube.util.network.packet.packets.web.Packet80ServerWebResponse;
/** <pre> /** <pre>
* Identification des packets réseaux * Identification des packets réseaux

View File

@ -1,4 +1,4 @@
package fr.pandacube.java.util.network.packet; package fr.pandacube.util.network.packet;
/** /**
* On attend d'un instance de {@link PacketClient} qu'il soit envoyé depuis * On attend d'un instance de {@link PacketClient} qu'il soit envoyé depuis

View File

@ -1,4 +1,4 @@
package fr.pandacube.java.util.network.packet; package fr.pandacube.util.network.packet;
/** /**
* *

View File

@ -1,4 +1,4 @@
package fr.pandacube.java.util.network.packet; package fr.pandacube.util.network.packet;
/** /**
* On attend d'un instance de {@link PacketServer} qu'il soit envoyé depuis * On attend d'un instance de {@link PacketServer} qu'il soit envoyé depuis

View File

@ -1,4 +1,4 @@
package fr.pandacube.java.util.network.packet; package fr.pandacube.util.network.packet;
@FunctionalInterface @FunctionalInterface
public interface ResponseCallback<T extends Packet> { public interface ResponseCallback<T extends Packet> {

View File

@ -1,4 +1,4 @@
package fr.pandacube.java.util.network.packet.bytebuffer; package fr.pandacube.util.network.packet.bytebuffer;
import java.util.Arrays; import java.util.Arrays;

View File

@ -1,4 +1,4 @@
package fr.pandacube.java.util.network.packet.bytebuffer; package fr.pandacube.util.network.packet.bytebuffer;
import java.nio.charset.Charset; import java.nio.charset.Charset;
import java.util.ArrayList; import java.util.ArrayList;

View File

@ -1,4 +1,4 @@
package fr.pandacube.java.util.network.packet.bytebuffer; package fr.pandacube.util.network.packet.bytebuffer;
/** /**
* Cette interface permet à un {@link ByteBuffer} de sérialiser sous forme de * Cette interface permet à un {@link ByteBuffer} de sérialiser sous forme de

View File

@ -1,7 +1,7 @@
package fr.pandacube.java.util.network.packet.packets.core_slave; package fr.pandacube.util.network.packet.packets.core_slave;
import fr.pandacube.java.util.network.packet.PacketClient; import fr.pandacube.util.network.packet.PacketClient;
import fr.pandacube.java.util.network.packet.bytebuffer.ByteBuffer; import fr.pandacube.util.network.packet.bytebuffer.ByteBuffer;
public class Packet30ClientDeclareProcess extends PacketClient { public class Packet30ClientDeclareProcess extends PacketClient {

View File

@ -1,7 +1,7 @@
package fr.pandacube.java.util.network.packet.packets.core_slave; package fr.pandacube.util.network.packet.packets.core_slave;
import fr.pandacube.java.util.network.packet.PacketClient; import fr.pandacube.util.network.packet.PacketClient;
import fr.pandacube.java.util.network.packet.bytebuffer.ByteBuffer; import fr.pandacube.util.network.packet.bytebuffer.ByteBuffer;
public class Packet31ClientClose extends PacketClient { public class Packet31ClientClose extends PacketClient {

View File

@ -1,8 +1,8 @@
package fr.pandacube.java.util.network.packet.packets.core_slave; package fr.pandacube.util.network.packet.packets.core_slave;
import fr.pandacube.java.util.network.packet.PacketClient; import fr.pandacube.util.network.packet.PacketClient;
import fr.pandacube.java.util.network.packet.bytebuffer.ByteBuffer; import fr.pandacube.util.network.packet.bytebuffer.ByteBuffer;
import fr.pandacube.java.util.network.packet.packets.core_slave.PacketB4ServerProcessQuery.QueryType; import fr.pandacube.util.network.packet.packets.core_slave.PacketB4ServerProcessQuery.QueryType;
public class Packet32ClientProcessQueryResponse extends PacketClient { public class Packet32ClientProcessQueryResponse extends PacketClient {

View File

@ -1,7 +1,7 @@
package fr.pandacube.java.util.network.packet.packets.core_slave; package fr.pandacube.util.network.packet.packets.core_slave;
import fr.pandacube.java.util.network.packet.PacketServer; import fr.pandacube.util.network.packet.PacketServer;
import fr.pandacube.java.util.network.packet.bytebuffer.ByteBuffer; import fr.pandacube.util.network.packet.bytebuffer.ByteBuffer;
public class PacketB0ServerClose extends PacketServer { public class PacketB0ServerClose extends PacketServer {

View File

@ -1,7 +1,7 @@
package fr.pandacube.java.util.network.packet.packets.core_slave; package fr.pandacube.util.network.packet.packets.core_slave;
import fr.pandacube.java.util.network.packet.PacketServer; import fr.pandacube.util.network.packet.PacketServer;
import fr.pandacube.java.util.network.packet.bytebuffer.ByteBuffer; import fr.pandacube.util.network.packet.bytebuffer.ByteBuffer;
public class PacketB1ServerProcessDeclarationConfirm extends PacketServer { public class PacketB1ServerProcessDeclarationConfirm extends PacketServer {

View File

@ -1,7 +1,7 @@
package fr.pandacube.java.util.network.packet.packets.core_slave; package fr.pandacube.util.network.packet.packets.core_slave;
import fr.pandacube.java.util.network.packet.PacketServer; import fr.pandacube.util.network.packet.PacketServer;
import fr.pandacube.java.util.network.packet.bytebuffer.ByteBuffer; import fr.pandacube.util.network.packet.bytebuffer.ByteBuffer;
public class PacketB2ServerConnectSuccess extends PacketServer { public class PacketB2ServerConnectSuccess extends PacketServer {

View File

@ -1,7 +1,7 @@
package fr.pandacube.java.util.network.packet.packets.core_slave; package fr.pandacube.util.network.packet.packets.core_slave;
import fr.pandacube.java.util.network.packet.PacketServer; import fr.pandacube.util.network.packet.PacketServer;
import fr.pandacube.java.util.network.packet.bytebuffer.ByteBuffer; import fr.pandacube.util.network.packet.bytebuffer.ByteBuffer;
public class PacketB3ServerProcessInput extends PacketServer { public class PacketB3ServerProcessInput extends PacketServer {

View File

@ -1,8 +1,8 @@
package fr.pandacube.java.util.network.packet.packets.core_slave; package fr.pandacube.util.network.packet.packets.core_slave;
import fr.pandacube.java.util.RandomUtil; import fr.pandacube.util.RandomUtil;
import fr.pandacube.java.util.network.packet.PacketServer; import fr.pandacube.util.network.packet.PacketServer;
import fr.pandacube.java.util.network.packet.bytebuffer.ByteBuffer; import fr.pandacube.util.network.packet.bytebuffer.ByteBuffer;
public class PacketB4ServerProcessQuery extends PacketServer { public class PacketB4ServerProcessQuery extends PacketServer {

View File

@ -1,7 +1,7 @@
package fr.pandacube.java.util.network.packet.packets.global; package fr.pandacube.util.network.packet.packets.global;
import fr.pandacube.java.util.network.packet.PacketClient; import fr.pandacube.util.network.packet.PacketClient;
import fr.pandacube.java.util.network.packet.bytebuffer.ByteBuffer; import fr.pandacube.util.network.packet.bytebuffer.ByteBuffer;
public class Packet50ClientAuthenticate extends PacketClient { public class Packet50ClientAuthenticate extends PacketClient {

View File

@ -1,7 +1,7 @@
package fr.pandacube.java.util.network.packet.packets.global; package fr.pandacube.util.network.packet.packets.global;
import fr.pandacube.java.util.network.packet.PacketClient; import fr.pandacube.util.network.packet.PacketClient;
import fr.pandacube.java.util.network.packet.bytebuffer.ByteBuffer; import fr.pandacube.util.network.packet.bytebuffer.ByteBuffer;
public class Packet51ClientLogRecord extends PacketClient { public class Packet51ClientLogRecord extends PacketClient {

View File

@ -1,10 +1,10 @@
package fr.pandacube.java.util.network.packet.packets.global; package fr.pandacube.util.network.packet.packets.global;
import java.io.PrintWriter; import java.io.PrintWriter;
import java.io.StringWriter; import java.io.StringWriter;
import fr.pandacube.java.util.network.packet.PacketServer; import fr.pandacube.util.network.packet.PacketServer;
import fr.pandacube.java.util.network.packet.bytebuffer.ByteBuffer; import fr.pandacube.util.network.packet.bytebuffer.ByteBuffer;
public class PacketD0ServerException extends PacketServer { public class PacketD0ServerException extends PacketServer {

View File

@ -1,7 +1,7 @@
package fr.pandacube.java.util.network.packet.packets.global; package fr.pandacube.util.network.packet.packets.global;
import fr.pandacube.java.util.network.packet.PacketServer; import fr.pandacube.util.network.packet.PacketServer;
import fr.pandacube.java.util.network.packet.bytebuffer.ByteBuffer; import fr.pandacube.util.network.packet.bytebuffer.ByteBuffer;
public class PacketD1ServerCantAuthenticate extends PacketServer { public class PacketD1ServerCantAuthenticate extends PacketServer {

View File

@ -1,7 +1,7 @@
package fr.pandacube.java.util.network.packet.packets.global; package fr.pandacube.util.network.packet.packets.global;
import fr.pandacube.java.util.network.packet.PacketServer; import fr.pandacube.util.network.packet.PacketServer;
import fr.pandacube.java.util.network.packet.bytebuffer.ByteBuffer; import fr.pandacube.util.network.packet.bytebuffer.ByteBuffer;
public class PacketD2ServerCommand extends PacketServer { public class PacketD2ServerCommand extends PacketServer {

View File

@ -1,7 +1,7 @@
package fr.pandacube.java.util.network.packet.packets.web; package fr.pandacube.util.network.packet.packets.web;
import fr.pandacube.java.util.network.packet.PacketClient; import fr.pandacube.util.network.packet.PacketClient;
import fr.pandacube.java.util.network.packet.bytebuffer.ByteBuffer; import fr.pandacube.util.network.packet.bytebuffer.ByteBuffer;
public class Packet00ClientWebRequest extends PacketClient { public class Packet00ClientWebRequest extends PacketClient {

View File

@ -1,7 +1,7 @@
package fr.pandacube.java.util.network.packet.packets.web; package fr.pandacube.util.network.packet.packets.web;
import fr.pandacube.java.util.network.packet.PacketServer; import fr.pandacube.util.network.packet.PacketServer;
import fr.pandacube.java.util.network.packet.bytebuffer.ByteBuffer; import fr.pandacube.util.network.packet.bytebuffer.ByteBuffer;
public class Packet80ServerWebResponse extends PacketServer { public class Packet80ServerWebResponse extends PacketServer {

View File

@ -1,10 +1,10 @@
package fr.pandacube.java.util.network.server; package fr.pandacube.util.network.server;
import java.util.Iterator; import java.util.Iterator;
import java.util.LinkedList; import java.util.LinkedList;
import java.util.List; import java.util.List;
import fr.pandacube.java.util.network.server.TCPServer.TCPServerClientConnection; import fr.pandacube.util.network.server.TCPServer.TCPServerClientConnection;
public class BandwidthCalculation { public class BandwidthCalculation {

View File

@ -1,4 +1,4 @@
package fr.pandacube.java.util.network.server; package fr.pandacube.util.network.server;
import java.io.Closeable; import java.io.Closeable;
import java.io.IOException; import java.io.IOException;
@ -23,18 +23,18 @@ import java.util.function.Predicate;
import java.util.logging.Level; import java.util.logging.Level;
import org.apache.commons.lang.builder.ToStringBuilder; import org.apache.commons.lang.builder.ToStringBuilder;
import fr.pandacube.java.Pandacube;
import fr.pandacube.java.util.Log;
import fr.pandacube.java.util.network.packet.Packet;
import fr.pandacube.java.util.network.packet.PacketClient;
import fr.pandacube.java.util.network.packet.PacketException;
import fr.pandacube.java.util.network.packet.PacketServer;
import fr.pandacube.java.util.network.packet.ResponseCallback;
import fr.pandacube.java.util.network.packet.bytebuffer.ByteBuffer;
import fr.pandacube.java.util.network.packet.packets.global.PacketD0ServerException;
import org.javatuples.Pair; import org.javatuples.Pair;
import fr.pandacube.Pandacube;
import fr.pandacube.util.Log;
import fr.pandacube.util.network.packet.Packet;
import fr.pandacube.util.network.packet.PacketClient;
import fr.pandacube.util.network.packet.PacketException;
import fr.pandacube.util.network.packet.PacketServer;
import fr.pandacube.util.network.packet.ResponseCallback;
import fr.pandacube.util.network.packet.bytebuffer.ByteBuffer;
import fr.pandacube.util.network.packet.packets.global.PacketD0ServerException;
/** /**
* *
* @author Marc Baloup * @author Marc Baloup

View File

@ -1,7 +1,7 @@
package fr.pandacube.java.util.network.server; package fr.pandacube.util.network.server;
import fr.pandacube.java.util.network.packet.PacketClient; import fr.pandacube.util.network.packet.PacketClient;
import fr.pandacube.java.util.network.server.TCPServer.TCPServerClientConnection; import fr.pandacube.util.network.server.TCPServer.TCPServerClientConnection;
public interface TCPServerListener { public interface TCPServerListener {

View File

@ -1,4 +1,4 @@
package fr.pandacube.java.util.network_api.client; package fr.pandacube.util.network_api.client;
import java.io.PrintStream; import java.io.PrintStream;

View File

@ -1,4 +1,4 @@
package fr.pandacube.java.util.network_api.client; package fr.pandacube.util.network_api.client;
import java.io.IOException; import java.io.IOException;
import java.io.PrintStream; import java.io.PrintStream;

View File

@ -1,4 +1,4 @@
package fr.pandacube.java.util.network_api.client; package fr.pandacube.util.network_api.client;
import java.io.BufferedReader; import java.io.BufferedReader;
import java.io.IOException; import java.io.IOException;

View File

@ -1,11 +1,11 @@
package fr.pandacube.java.util.network_api.server; package fr.pandacube.util.network_api.server;
import java.io.IOException; import java.io.IOException;
import java.io.PrintStream; import java.io.PrintStream;
import java.net.InetAddress; import java.net.InetAddress;
import java.net.Socket; import java.net.Socket;
import fr.pandacube.java.util.Log; import fr.pandacube.util.Log;
public abstract class AbstractRequestExecutor { public abstract class AbstractRequestExecutor {

View File

@ -1,4 +1,4 @@
package fr.pandacube.java.util.network_api.server; package fr.pandacube.util.network_api.server;
/** /**
* Interface permettant de gérer l'exécution asynchrone d'un PacketExecutor. * Interface permettant de gérer l'exécution asynchrone d'un PacketExecutor.

View File

@ -1,4 +1,4 @@
package fr.pandacube.java.util.network_api.server; package fr.pandacube.util.network_api.server;
import java.io.IOException; import java.io.IOException;
import java.net.ServerSocket; import java.net.ServerSocket;

View File

@ -1,11 +1,11 @@
package fr.pandacube.java.util.network_api.server; package fr.pandacube.util.network_api.server;
import java.io.IOException; import java.io.IOException;
import java.io.PrintStream; import java.io.PrintStream;
import java.net.Socket; import java.net.Socket;
import fr.pandacube.java.util.Log; import fr.pandacube.util.Log;
import fr.pandacube.java.util.network_api.server.RequestAnalyser.BadRequestException; import fr.pandacube.util.network_api.server.RequestAnalyser.BadRequestException;
/** /**
* Prends en charge un socket client et le transmet au gestionnaire de paquet * Prends en charge un socket client et le transmet au gestionnaire de paquet

View File

@ -1,4 +1,4 @@
package fr.pandacube.java.util.network_api.server; package fr.pandacube.util.network_api.server;
import java.io.BufferedReader; import java.io.BufferedReader;
import java.io.IOException; import java.io.IOException;

View File

@ -1,4 +1,4 @@
package fr.pandacube.java.util.network_api.server; package fr.pandacube.util.network_api.server;
import java.io.PrintStream; import java.io.PrintStream;

View File

@ -1,4 +1,4 @@
package fr.pandacube.java.util.network_api.server; package fr.pandacube.util.network_api.server;
public class ThreadNAPIExecutionHandler implements NAPIExecutionHandler { public class ThreadNAPIExecutionHandler implements NAPIExecutionHandler {

View File

@ -1,4 +1,4 @@
package fr.pandacube.java.util.orm; package fr.pandacube.util.orm;
import java.sql.Connection; import java.sql.Connection;
import java.sql.DriverManager; import java.sql.DriverManager;

View File

@ -1,4 +1,4 @@
package fr.pandacube.java.util.orm; package fr.pandacube.util.orm;
import java.sql.PreparedStatement; import java.sql.PreparedStatement;
import java.sql.ResultSet; import java.sql.ResultSet;
@ -11,9 +11,9 @@ import java.util.function.Consumer;
import org.javatuples.Pair; import org.javatuples.Pair;
import fr.pandacube.java.util.Log; import fr.pandacube.util.Log;
import fr.pandacube.java.util.orm.SQLWhereChain.SQLBoolOp; import fr.pandacube.util.orm.SQLWhereChain.SQLBoolOp;
import fr.pandacube.java.util.orm.SQLWhereComp.SQLComparator; import fr.pandacube.util.orm.SQLWhereComp.SQLComparator;
/** /**
* <b>ORM = Object-Relational Mapping</b> * <b>ORM = Object-Relational Mapping</b>

View File

@ -1,4 +1,4 @@
package fr.pandacube.java.util.orm; package fr.pandacube.util.orm;
public class ORMException extends Exception { public class ORMException extends Exception {
private static final long serialVersionUID = 1L; private static final long serialVersionUID = 1L;

View File

@ -1,4 +1,4 @@
package fr.pandacube.java.util.orm; package fr.pandacube.util.orm;
public class ORMInitTableException extends ORMException { public class ORMInitTableException extends ORMException {
private static final long serialVersionUID = 1L; private static final long serialVersionUID = 1L;

View File

@ -1,4 +1,4 @@
package fr.pandacube.java.util.orm; package fr.pandacube.util.orm;
import java.util.function.Function; import java.util.function.Function;

View File

@ -1,4 +1,4 @@
package fr.pandacube.java.util.orm; package fr.pandacube.util.orm;
import java.lang.reflect.Modifier; import java.lang.reflect.Modifier;
import java.sql.PreparedStatement; import java.sql.PreparedStatement;
@ -20,8 +20,8 @@ import org.apache.commons.lang.builder.ToStringBuilder;
import com.google.gson.Gson; import com.google.gson.Gson;
import com.google.gson.JsonObject; import com.google.gson.JsonObject;
import fr.pandacube.java.util.Log; import fr.pandacube.util.Log;
import fr.pandacube.java.util.orm.SQLWhereComp.SQLComparator; import fr.pandacube.util.orm.SQLWhereComp.SQLComparator;
public abstract class SQLElement<E extends SQLElement<E>> { public abstract class SQLElement<E extends SQLElement<E>> {
/** cache for fields for each subclass of SQLElement */ /** cache for fields for each subclass of SQLElement */

View File

@ -1,4 +1,4 @@
package fr.pandacube.java.util.orm; package fr.pandacube.util.orm;
import java.sql.PreparedStatement; import java.sql.PreparedStatement;
import java.sql.SQLException; import java.sql.SQLException;
@ -13,9 +13,9 @@ import java.util.stream.Collectors;
import com.google.gson.JsonArray; import com.google.gson.JsonArray;
import fr.pandacube.java.util.Log; import fr.pandacube.util.Log;
import fr.pandacube.java.util.orm.SQLWhereChain.SQLBoolOp; import fr.pandacube.util.orm.SQLWhereChain.SQLBoolOp;
import fr.pandacube.java.util.orm.SQLWhereComp.SQLComparator; import fr.pandacube.util.orm.SQLWhereComp.SQLComparator;
/** /**
* *

View File

@ -1,6 +1,6 @@
package fr.pandacube.java.util.orm; package fr.pandacube.util.orm;
import fr.pandacube.java.util.Log; import fr.pandacube.util.Log;
/** /**
* *

View File

@ -1,4 +1,4 @@
package fr.pandacube.java.util.orm; package fr.pandacube.util.orm;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.List; import java.util.List;

View File

@ -1,4 +1,4 @@
package fr.pandacube.java.util.orm; package fr.pandacube.util.orm;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.List; import java.util.List;

View File

@ -1,9 +1,9 @@
package fr.pandacube.java.util.orm; package fr.pandacube.util.orm;
import java.sql.Date; import java.sql.Date;
import java.util.UUID; import java.util.UUID;
import fr.pandacube.java.util.EnumUtil; import fr.pandacube.util.EnumUtil;
public class SQLType<T> { public class SQLType<T> {

View File

@ -1,10 +1,10 @@
package fr.pandacube.java.util.orm; package fr.pandacube.util.orm;
import java.util.List; import java.util.List;
import org.javatuples.Pair; import org.javatuples.Pair;
import fr.pandacube.java.util.Log; import fr.pandacube.util.Log;
public abstract class SQLWhere { public abstract class SQLWhere {

View File

@ -1,4 +1,4 @@
package fr.pandacube.java.util.orm; package fr.pandacube.util.orm;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.List; import java.util.List;

View File

@ -1,4 +1,4 @@
package fr.pandacube.java.util.orm; package fr.pandacube.util.orm;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.List; import java.util.List;

View File

@ -1,4 +1,4 @@
package fr.pandacube.java.util.orm; package fr.pandacube.util.orm;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.List; import java.util.List;

View File

@ -1,12 +1,13 @@
package fr.pandacube.java.util.orm; package fr.pandacube.util.orm;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.List; import java.util.List;
import java.util.logging.Level; import java.util.logging.Level;
import fr.pandacube.java.util.Log;
import org.javatuples.Pair; import org.javatuples.Pair;
import fr.pandacube.util.Log;
public class SQLWhereNull extends SQLWhere { public class SQLWhereNull extends SQLWhere {
private SQLField<?, ?> fild; private SQLField<?, ?> fild;

View File

@ -1,4 +1,4 @@
package fr.pandacube.java.util.text_display; package fr.pandacube.util.text_display;
import java.util.Arrays; import java.util.Arrays;
import java.util.List; import java.util.List;

View File

@ -1,4 +1,4 @@
package fr.pandacube.java.util.text_display; package fr.pandacube.util.text_display;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.Arrays; import java.util.Arrays;

View File

@ -1,4 +1,4 @@
package fr.pandacube.java.util.text_display; package fr.pandacube.util.text_display;
import net.md_5.bungee.api.ChatColor; import net.md_5.bungee.api.ChatColor;