mirror of
https://gitlab.com/phoenix-dvpmt/mmoitems.git
synced 2025-02-28 15:41:04 +01:00
Added a way to protect GooP Converter's converted items from the RevID system.
This commit is contained in:
parent
6b80ca51bd
commit
6f77e0f666
@ -31,6 +31,7 @@ import org.bukkit.inventory.ItemFlag;
|
||||
import org.bukkit.inventory.ItemStack;
|
||||
import org.bukkit.inventory.meta.ItemMeta;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
@ -258,11 +259,11 @@ public class ItemStackBuilder {
|
||||
/**
|
||||
* @return Builds the item
|
||||
*/
|
||||
@Nullable
|
||||
public ItemStack build() {
|
||||
ItemBuildEvent itemBuildEvent = new ItemBuildEvent(buildNBT().toItem());
|
||||
Bukkit.getServer().getPluginManager().callEvent(itemBuildEvent);
|
||||
if (itemBuildEvent.isCancelled())
|
||||
return null;
|
||||
//Bukkit.getServer().getPluginManager().callEvent(itemBuildEvent);
|
||||
if (itemBuildEvent.isCancelled()) { return null; }
|
||||
return itemBuildEvent.getItemStack();
|
||||
}
|
||||
|
||||
|
@ -270,6 +270,9 @@ public class MMOItemReforger {
|
||||
// Fist of all, can it update?
|
||||
if (!canReforge()) { return shouldUpdate = false; }
|
||||
|
||||
// Its not GooP Converter's VANILLA is it?
|
||||
if ("VANILLA".equals(nbtItem.getString("MMOITEMS_ITEM_ID"))) { return false; }
|
||||
|
||||
// Disabled in config?
|
||||
if (reason != null && MMOItems.plugin.getConfig().getBoolean("item-revision.disable-on." + reason)) { return shouldUpdate = false; }
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user