mirror of
https://github.com/Nan1t/NanoLimbo.git
synced 2025-07-09 19:40:14 +02:00
Moved exception throwing
This commit is contained in:
parent
9670aeecbe
commit
c914a494e8
@ -70,14 +70,12 @@ public class PacketSnapshot implements PacketOut {
|
||||
@Override
|
||||
public void encode(ByteMessage msg, Version version) {
|
||||
Version mapped = mappings.get(version);
|
||||
|
||||
if (mapped == null)
|
||||
throw new IllegalArgumentException("No mapped version is for " + version);
|
||||
|
||||
byte[] message = versionMessages.get(mapped);
|
||||
|
||||
if (message != null)
|
||||
msg.writeBytes(message);
|
||||
else
|
||||
throw new IllegalArgumentException("No mappings for version " + version);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
Loading…
x
Reference in New Issue
Block a user