bukkit: Use correct constructor for Brigadier Vec2 argument type
This commit is contained in:
parent
c4966c2b80
commit
e4bc67e906
1 changed files with 3 additions and 1 deletions
|
|
@ -153,7 +153,9 @@ public final class BukkitBrigadierMapper<C> {
|
||||||
|
|
||||||
private @NonNull ArgumentType<?> argumentVec2() {
|
private @NonNull ArgumentType<?> argumentVec2() {
|
||||||
try {
|
try {
|
||||||
return MinecraftArgumentTypes.getClassByKey(NamespacedKey.minecraft("vec2")).getDeclaredConstructor().newInstance();
|
return MinecraftArgumentTypes.getClassByKey(NamespacedKey.minecraft("vec2"))
|
||||||
|
.getDeclaredConstructor(boolean.class)
|
||||||
|
.newInstance(true);
|
||||||
} catch (final Exception e) {
|
} catch (final Exception e) {
|
||||||
this.commandManager.getOwningPlugin().getLogger().log(Level.INFO, "Failed to retrieve Vec2 argument", e);
|
this.commandManager.getOwningPlugin().getLogger().log(Level.INFO, "Failed to retrieve Vec2 argument", e);
|
||||||
return fallbackType();
|
return fallbackType();
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue