mirror of
https://github.com/ViaVersion/ViaFabricPlus.git
synced 2024-12-22 16:48:25 +01:00
Fix NPE in classic commands
This commit is contained in:
parent
d3bd33cbd0
commit
8f6ad8694d
@ -40,7 +40,7 @@ public class ListExtensionsCommand extends VFPViaSubCommand {
|
||||
|
||||
@Override
|
||||
public boolean execute(ViaCommandSender sender, String[] args) {
|
||||
if (!getUser().has(ExtensionProtocolMetadataStorage.class)) {
|
||||
if (getUser() == null || !getUser().has(ExtensionProtocolMetadataStorage.class)) {
|
||||
sendMessage(sender, Formatting.RED + "Only for " + LegacyProtocolVersion.c0_30cpe.getName());
|
||||
return true;
|
||||
}
|
||||
|
@ -44,7 +44,7 @@ public class SetTimeCommand extends VFPViaSubCommand {
|
||||
|
||||
@Override
|
||||
public boolean execute(ViaCommandSender sender, String[] args) {
|
||||
if (!getUser().has(TimeLockStorage.class)) {
|
||||
if (getUser() == null || !getUser().has(TimeLockStorage.class)) {
|
||||
sendMessage(sender, Formatting.RED + "Only for <= " + LegacyProtocolVersion.a1_0_16toa1_0_16_2.getName());
|
||||
return true;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user