mirror of
https://gitlab.com/phoenix-dvpmt/mmoitems.git
synced 2025-04-03 18:05:52 +02:00
Fixed an issue with MMOCore trigger
This commit is contained in:
parent
246cb2d9a1
commit
580f8fea79
BIN
lib/MMOCore.jar
BIN
lib/MMOCore.jar
Binary file not shown.
@ -4,10 +4,10 @@ import org.apache.commons.lang.Validate;
|
||||
import org.bukkit.Material;
|
||||
import org.bukkit.inventory.ItemStack;
|
||||
|
||||
import net.Indyuce.mmocore.api.item.SmartGive;
|
||||
import net.Indyuce.mmocore.api.load.MMOLineConfig;
|
||||
import net.Indyuce.mmocore.api.player.PlayerData;
|
||||
import net.Indyuce.mmocore.api.quest.trigger.Trigger;
|
||||
import net.Indyuce.mmocore.api.util.item.SmartGive;
|
||||
import net.Indyuce.mmoitems.MMOItems;
|
||||
import net.Indyuce.mmoitems.api.Type;
|
||||
|
||||
@ -33,7 +33,9 @@ public class MMOItemTrigger extends Trigger {
|
||||
@Override
|
||||
public void apply(PlayerData player) {
|
||||
ItemStack item = MMOItems.plugin.getItems().getItem(type, id);
|
||||
if(item == null) { MMOItems.plugin.getLogger().warning("[MMOCore Quest Trigger] Couldn't load MMOItem"); return; }
|
||||
if (item == null || item.getType() == Material.AIR)
|
||||
return;
|
||||
|
||||
item.setAmount(amount);
|
||||
if (item != null && item.getType() != Material.AIR)
|
||||
new SmartGive(player.getPlayer()).give(item);
|
||||
|
Loading…
Reference in New Issue
Block a user