Skip to content

Commit

Permalink
Fix 1.0.6:
Browse files Browse the repository at this point in the history
- Fix 'Caused by: java.lang.IllegalArgumentException: Could not find packet for type BED' for last versions
  • Loading branch information
unldenis committed Feb 8, 2022
1 parent 57ff3b1 commit 3604a41
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

<groupId>com.github.unldenis.corpse</groupId>
<artifactId>Corpse</artifactId>
<version>1.0.5-SNAPSHOT</version>
<version>1.0.6-SNAPSHOT</version>

<properties>
<maven.compiler.source>8</maven.compiler.source>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
package com.github.unldenis.corpse.logic;

import com.github.unldenis.corpse.logic.packet.*;
import com.github.unldenis.corpse.util.*;
import org.jetbrains.annotations.*;

import java.util.*;
Expand Down Expand Up @@ -57,8 +58,12 @@ public void load() {
packets.add(wrapperNamedEntitySpawn);
packets.add(wrapperPlayerInfoAdd);
packets.add(wrapperPlayerInfoRemove);
packets.add(wrapperBed);
packets.add(wrapperEntityTeleport);

//Fix 'Caused by: java.lang.IllegalArgumentException: Could not find packet for type BED' for last versions
if(VersionUtil.isBelow(VersionUtil.VersionEnum.V1_12)) {
packets.add(wrapperBed);
packets.add(wrapperEntityTeleport);
}
this.packets.forEach(IPacket::load);
}

Expand Down

0 comments on commit 3604a41

Please sign in to comment.