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>
|
<dependency>
|
||||||
<groupId>com.discord4j</groupId>
|
<groupId>com.discord4j</groupId>
|
||||||
<artifactId>discord4j-core</artifactId>
|
<artifactId>discord4j-core</artifactId>
|
||||||
<version>3.0.12</version>
|
<version>3.0.13</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
<!-- https://mvnrepository.com/artifact/org.slf4j/slf4j-jdk14 -->
|
<!-- https://mvnrepository.com/artifact/org.slf4j/slf4j-jdk14 -->
|
||||||
<dependency>
|
<dependency>
|
||||||
|
|
|
@ -14,7 +14,7 @@ import org.bukkit.entity.Player;
|
||||||
|
|
||||||
@CommandClass(helpText = {
|
@CommandClass(helpText = {
|
||||||
"Connect command", //
|
"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 {
|
public class ConnectCommand extends ICommand2DC {
|
||||||
|
|
||||||
|
|
|
@ -37,7 +37,7 @@ public class VanillaCommandListener<T extends DiscordSenderBase & IMCPlayer<T>>
|
||||||
public VanillaCommandListener(T player, Player bukkitplayer) {
|
public VanillaCommandListener(T player, Player bukkitplayer) {
|
||||||
this.player = player;
|
this.player = player;
|
||||||
this.bukkitplayer = bukkitplayer;
|
this.bukkitplayer = bukkitplayer;
|
||||||
if (!(bukkitplayer instanceof CraftPlayer))
|
if (bukkitplayer != null && !(bukkitplayer instanceof CraftPlayer))
|
||||||
throw new ClassCastException("bukkitplayer must be a Bukkit player!");
|
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) {
|
public VanillaCommandListener14(T player, Player bukkitplayer) {
|
||||||
this.player = player;
|
this.player = player;
|
||||||
this.bukkitplayer = bukkitplayer;
|
this.bukkitplayer = bukkitplayer;
|
||||||
if (!(bukkitplayer instanceof CraftPlayer))
|
if (bukkitplayer != null && !(bukkitplayer instanceof CraftPlayer))
|
||||||
throw new ClassCastException("bukkitplayer must be a Bukkit player!");
|
throw new ClassCastException("bukkitplayer must be a Bukkit player!");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue