bukkit: Update for Minecraft 1.17

This commit is contained in:
Jason Penilla 2021-06-11 03:00:39 -07:00 committed by Jason
parent f7e756e901
commit 123341563d
10 changed files with 253 additions and 50 deletions

View file

@ -476,7 +476,10 @@ public final class ExamplePlugin extends JavaPlugin {
},
ArgumentDescription.of("The ItemStack to give")
)
.handler(ctx -> ((Player) ctx.getSender()).getInventory().addItem(ctx.get("itemstack"))));
.handler(ctx -> {
final ItemStack stack = ctx.get("itemstack");
((Player) ctx.getSender()).getInventory().addItem(stack);
}));
}
@CommandMethod("example help [query]")