bukkit: Use correct constructor for Brigadier Vec2 argument type

This commit is contained in:
Jason Penilla 2021-06-22 23:44:43 -07:00 committed by Jason
parent c4966c2b80
commit e4bc67e906

View file

@ -153,7 +153,9 @@ public final class BukkitBrigadierMapper<C> {
private @NonNull ArgumentType<?> argumentVec2() {
try {
return MinecraftArgumentTypes.getClassByKey(NamespacedKey.minecraft("vec2")).getDeclaredConstructor().newInstance();
return MinecraftArgumentTypes.getClassByKey(NamespacedKey.minecraft("vec2"))
.getDeclaredConstructor(boolean.class)
.newInstance(true);
} catch (final Exception e) {
this.commandManager.getOwningPlugin().getLogger().log(Level.INFO, "Failed to retrieve Vec2 argument", e);
return fallbackType();