mirror of
https://github.com/array-in-a-matrix/brainwine.git
synced 2025-04-02 11:11:58 -04:00
Removed static initializer
This commit is contained in:
parent
f50f2b8c6f
commit
f83cede5e1
1 changed files with 5 additions and 1 deletions
|
@ -5,6 +5,8 @@ import java.io.IOException;
|
||||||
import java.nio.file.Files;
|
import java.nio.file.Files;
|
||||||
import java.util.zip.DataFormatException;
|
import java.util.zip.DataFormatException;
|
||||||
|
|
||||||
|
import org.apache.logging.log4j.LogManager;
|
||||||
|
import org.apache.logging.log4j.Logger;
|
||||||
import org.msgpack.MessagePack;
|
import org.msgpack.MessagePack;
|
||||||
import org.msgpack.packer.BufferPacker;
|
import org.msgpack.packer.BufferPacker;
|
||||||
import org.msgpack.unpacker.BufferUnpacker;
|
import org.msgpack.unpacker.BufferUnpacker;
|
||||||
|
@ -26,13 +28,15 @@ import brainwine.gameserver.zone.Chunk;
|
||||||
*/
|
*/
|
||||||
public class MessagePackHelper {
|
public class MessagePackHelper {
|
||||||
|
|
||||||
|
private static final Logger logger = LogManager.getLogger();
|
||||||
private static final MessagePack messagePack = new MessagePack();
|
private static final MessagePack messagePack = new MessagePack();
|
||||||
|
|
||||||
static {
|
public static void init() {
|
||||||
registerTemplates();
|
registerTemplates();
|
||||||
}
|
}
|
||||||
|
|
||||||
private static void registerTemplates() {
|
private static void registerTemplates() {
|
||||||
|
logger.info("Registering MessagePack templates ...");
|
||||||
messagePack.register(Item.class, new ItemTemplate());
|
messagePack.register(Item.class, new ItemTemplate());
|
||||||
messagePack.register(Block.class, new BlockTemplate());
|
messagePack.register(Block.class, new BlockTemplate());
|
||||||
messagePack.register(Chunk.class, new ChunkTemplate());
|
messagePack.register(Chunk.class, new ChunkTemplate());
|
||||||
|
|
Loading…
Add table
Reference in a new issue