mirror of
https://github.com/sekwah41/Advanced-Portals.git
synced 2024-11-22 18:46:35 +01:00
Added being able to give items
This commit is contained in:
parent
02ddd1ebf6
commit
984bf01c03
@ -1,5 +1,6 @@
|
||||
package com.sekwah.advancedportals.coreconnector.container;
|
||||
|
||||
import org.bukkit.Material;
|
||||
import org.bukkit.entity.Player;
|
||||
|
||||
import java.util.UUID;
|
||||
@ -59,5 +60,12 @@ public class PlayerContainer {
|
||||
|
||||
}
|
||||
|
||||
public void giveItem(String material, String itemName, String... itemDescription) {}
|
||||
public void giveItem(String material, String itemName, String... itemDescription) {
|
||||
ItemStack regionselector = new ItemStack(Material.getMaterial(material));
|
||||
ItemMeta selectorname = regionselector.getItemMeta();
|
||||
selectorname.setDisplayName(itemName);
|
||||
selectorname.setLore(Arrays.asList(itemDescription));
|
||||
regionselector.setItemMeta(selectorname);
|
||||
this.player.getInventory().addItem(regionselector);
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user