Fix issue with VanillaCommandListener on <1.15
This commit is contained in:
parent
b484fe6f64
commit
cce7f59f4a
4 changed files with 4 additions and 4 deletions
2
pom.xml
2
pom.xml
|
@ -180,7 +180,7 @@
|
|||
<dependency>
|
||||
<groupId>com.discord4j</groupId>
|
||||
<artifactId>discord4j-core</artifactId>
|
||||
<version>3.0.12</version>
|
||||
<version>3.0.13</version>
|
||||
</dependency>
|
||||
<!-- https://mvnrepository.com/artifact/org.slf4j/slf4j-jdk14 -->
|
||||
<dependency>
|
||||
|
|
|
@ -14,7 +14,7 @@ import org.bukkit.entity.Player;
|
|||
|
||||
@CommandClass(helpText = {
|
||||
"Connect command", //
|
||||
"This command lets you connect your account with a Minecraft account. This allows using the Minecraft chat and other things.", //
|
||||
"This command lets you connect your account with a Minecraft account. This allows using the private Minecraft chat and other things.", //
|
||||
})
|
||||
public class ConnectCommand extends ICommand2DC {
|
||||
|
||||
|
|
|
@ -37,7 +37,7 @@ public class VanillaCommandListener<T extends DiscordSenderBase & IMCPlayer<T>>
|
|||
public VanillaCommandListener(T player, Player bukkitplayer) {
|
||||
this.player = player;
|
||||
this.bukkitplayer = bukkitplayer;
|
||||
if (!(bukkitplayer instanceof CraftPlayer))
|
||||
if (bukkitplayer != null && !(bukkitplayer instanceof CraftPlayer))
|
||||
throw new ClassCastException("bukkitplayer must be a Bukkit player!");
|
||||
}
|
||||
|
||||
|
|
|
@ -39,7 +39,7 @@ public class VanillaCommandListener14<T extends DiscordSenderBase & IMCPlayer<T>
|
|||
public VanillaCommandListener14(T player, Player bukkitplayer) {
|
||||
this.player = player;
|
||||
this.bukkitplayer = bukkitplayer;
|
||||
if (!(bukkitplayer instanceof CraftPlayer))
|
||||
if (bukkitplayer != null && !(bukkitplayer instanceof CraftPlayer))
|
||||
throw new ClassCastException("bukkitplayer must be a Bukkit player!");
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue