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

@@ -6,26 +6,21 @@ import net.AbstractPacketHandler;
import net.packet.InPacket;
/**
*
* @author Shavit
*/
public class QuickslotKeyMappedModifiedHandler extends AbstractPacketHandler
{
public class QuickslotKeyMappedModifiedHandler extends AbstractPacketHandler {
@Override
public void handlePacket(InPacket p, Client c)
{
public void handlePacket(InPacket p, Client c) {
// Invalid size for the packet.
if(p.available() != QuickslotBinding.QUICKSLOT_SIZE * Integer.BYTES ||
// not logged in-game
c.getPlayer() == null)
{
if (p.available() != QuickslotBinding.QUICKSLOT_SIZE * Integer.BYTES ||
// not logged in-game
c.getPlayer() == null) {
return;
}
byte[] aQuickslotKeyMapped = new byte[QuickslotBinding.QUICKSLOT_SIZE];
for(int i = 0; i < QuickslotBinding.QUICKSLOT_SIZE; i++)
{
for (int i = 0; i < QuickslotBinding.QUICKSLOT_SIZE; i++) {
aQuickslotKeyMapped[i] = (byte) p.readInt();
}