Reformat and clean up "net" package

This commit is contained in:
P0nk
2021-09-09 23:26:02 +02:00
parent 69f4580637
commit 6be6ea9927
235 changed files with 3556 additions and 3398 deletions

View File

@@ -29,14 +29,14 @@ import net.packet.InPacket;
import tools.PacketCreator;
public final class DueyHandler extends AbstractPacketHandler {
@Override
public final void handlePacket(InPacket p, Client c) {
if (!YamlConfig.config.server.USE_DUEY){
if (!YamlConfig.config.server.USE_DUEY) {
c.sendPacket(PacketCreator.enableActions());
return;
}
}
byte operation = p.readByte();
if (operation == DueyProcessor.Actions.TOSERVER_RECV_ITEM.getCode()) { // on click 'O' Button, thanks inhyuk
DueyProcessor.dueySendTalk(c, false);
@@ -48,15 +48,15 @@ public final class DueyHandler extends AbstractPacketHandler {
String recipient = p.readString();
boolean quick = p.readByte() != 0;
String message = quick ? p.readString() : null;
DueyProcessor.dueySendItem(c, inventId, itemPos, amount, mesos, message, recipient, quick);
} else if (operation == DueyProcessor.Actions.TOSERVER_REMOVE_PACKAGE.getCode()) {
int packageid = p.readInt();
DueyProcessor.dueyRemovePackage(c, packageid, true);
} else if (operation == DueyProcessor.Actions.TOSERVER_CLAIM_PACKAGE.getCode()) {
int packageid = p.readInt();
DueyProcessor.dueyClaimPackage(c, packageid);
} else if (operation == DueyProcessor.Actions.TOSERVER_CLAIM_PACKAGE.getCode()) {
DueyProcessor.dueySendTalk(c, false);