mirror of
https://github.com/StarWishsama/Slimefun4.git
synced 2024-09-19 19:25:48 +00:00
[CI skip] Merge pull request #1667 from WalshyDev/patch-4
Add getItem() to SlimefunItemStack
This commit is contained in:
commit
2fa9b46f89
@ -19,6 +19,7 @@ import org.bukkit.potion.PotionEffectType;
|
||||
import io.github.thebusybiscuit.cscorelib2.item.CustomItem;
|
||||
import io.github.thebusybiscuit.cscorelib2.item.ImmutableItemMeta;
|
||||
import io.github.thebusybiscuit.cscorelib2.skull.SkullItem;
|
||||
import me.mrCookieSlime.Slimefun.Objects.SlimefunItem.SlimefunItem;
|
||||
import me.mrCookieSlime.Slimefun.SlimefunPlugin;
|
||||
|
||||
public class SlimefunItemStack extends CustomItem {
|
||||
@ -150,6 +151,15 @@ public class SlimefunItemStack extends CustomItem {
|
||||
return id;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the {@link SlimefunItem} associated for this {@link SlimefunItemStack}. Null if no item is found.
|
||||
*
|
||||
* @return The {@link SlimefunItem} for this {@link SlimefunItemStack}, null if not found.
|
||||
*/
|
||||
public SlimefunItem getItem() {
|
||||
return SlimefunItem.getByID(this.id);
|
||||
}
|
||||
|
||||
public ImmutableItemMeta getImmutableMeta() {
|
||||
return immutableMeta;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user