Signed-off-by: Lixfel <agga-games@gmx.de>
Dieser Commit ist enthalten in:
Ursprung
aa836e77f5
Commit
93c32a6dc0
@ -36,13 +36,13 @@ public class EntityDamage implements Listener {
|
||||
|
||||
@EventHandler
|
||||
public void handleEntityDamage(EntityDamageEvent event) {
|
||||
if(Config.ArenaRegion.inRegion(event.getEntity().getLocation()))
|
||||
if(Config.ArenaRegion.in2dRegion(event.getEntity().getLocation()))
|
||||
event.setCancelled(true);
|
||||
}
|
||||
|
||||
@EventHandler
|
||||
public void handleEntityDamageByEntity(EntityDamageByEntityEvent event) {
|
||||
if(Config.ArenaRegion.inRegion(event.getEntity().getLocation()))
|
||||
if(Config.ArenaRegion.in2dRegion(event.getEntity().getLocation()))
|
||||
event.setCancelled(true);
|
||||
}
|
||||
}
|
||||
|
@ -127,7 +127,7 @@ public class PacketProcessor {
|
||||
packetDecoder[0xef] = source::readUTF;
|
||||
packetDecoder[0xff] = this::tick;
|
||||
|
||||
FightWorld.forceLoad();
|
||||
execSync(FightWorld::forceLoad);
|
||||
|
||||
if(source.async()) {
|
||||
Bukkit.getScheduler().runTaskAsynchronously(FightSystem.getPlugin(), this::process);
|
||||
@ -544,12 +544,11 @@ public class PacketProcessor {
|
||||
String msg = source.readUTF();
|
||||
List<Object> params = new ArrayList<>();
|
||||
|
||||
int type;
|
||||
do {
|
||||
type = Byte.toUnsignedInt(source.readByte());
|
||||
while(true) {
|
||||
int type = source.readUnsignedByte();
|
||||
switch(type) {
|
||||
case 0x00:
|
||||
break;
|
||||
return new Message(msg, params.toArray());
|
||||
case 0x01:
|
||||
params.add(source.readBoolean());
|
||||
break;
|
||||
@ -577,9 +576,7 @@ public class PacketProcessor {
|
||||
default:
|
||||
throw new IOException("Unknown message param type " + type);
|
||||
}
|
||||
} while(type != 0x00);
|
||||
|
||||
return new Message(msg, params.toArray());
|
||||
}
|
||||
}
|
||||
|
||||
private interface PacketParser{
|
||||
|
In neuem Issue referenzieren
Einen Benutzer sperren