Minecraft / give via plug-in?

Gu
8

I'm currently programming a plug-in for Minecraft.

Now I want to replace / give (a player enters / troll and gets an item).

I just don't know what command I need for it.

Sh

1 It's called a plugin

2 Intended for a spigot server right?

3 If you don't know how to do that then learn the Spigot API and Java.

player.getItem (new Itemstack (Material.DEIN BLOCK)); I think it was a bit ago.

Gu

1. I don't care xD

2. True

I've already learned

Sh

This is one of the easiest things you can do at Spigot. Boy, you haven't learned anything yet.

Gu

Ps.: it's called getItemInHand

Sh

GetItem was in Inv and getItemInHand in hand, right? And as I said, it was a while ago.

Sh

Oh wait it was player.getInventory.setItemInHand (new ItemStack (Material.MATERIAL)); I just remembered sry.

Gu

No problem

Sh

But just read the documentary or have a look at some tutus on YT. If you ever have another question. (Because that's really beginners knowledge, if you haven't programmed with the API for a long time.