More conflict resolution.

This commit is contained in:
md_5 2015-02-15 12:55:54 +11:00 committed by Zach Brown
parent 6008bb8fab
commit 3ea2235dbd
2 changed files with 16 additions and 16 deletions

View file

@ -1,4 +1,4 @@
From e999c1532150871324ff0b5b1a609a5434249328 Mon Sep 17 00:00:00 2001
From 071e18f06d0bb7a8b9dedbf6a93a2abd0e1342e2 Mon Sep 17 00:00:00 2001
From: md_5 <md_5@live.com.au>
Date: Sun, 2 Jun 2013 15:10:56 +1000
Subject: [PATCH] Skeleton API Implementations
@ -124,10 +124,10 @@ index 6361b44..fed7b4d 100644
+ // Spigot end
}
diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java
index 28871ab..3c98575 100644
index dd97fff..50aad59 100644
--- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java
+++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java
@@ -788,4 +788,16 @@ class CraftMetaItem implements ItemMeta, Repairable {
@@ -790,4 +790,16 @@ class CraftMetaItem implements ItemMeta, Repairable {
return HANDLED_TAGS;
}
}

View file

@ -1,11 +1,11 @@
From f397477f238c75e3cd0f7c914af7f69b71e2ff87 Mon Sep 17 00:00:00 2001
From f4436e6402a30548daeb29b6c7823fba788f27a4 Mon Sep 17 00:00:00 2001
From: libraryaddict <redwarfare@live.com>
Date: Fri, 22 Aug 2014 05:35:16 -0400
Subject: [PATCH] Added isUnbreakable and setUnbreakable to ItemMeta
diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java
index e6f2df3..e12f636 100644
index ad03b3b..cb5173f 100644
--- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java
+++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java
@@ -212,6 +212,8 @@ class CraftMetaItem implements ItemMeta, Repairable {
@ -77,25 +77,25 @@ index e6f2df3..e12f636 100644
}
public String getDisplayName() {
@@ -759,7 +784,8 @@ class CraftMetaItem implements ItemMeta, Repairable {
&& (this.hasLore() ? that.hasLore() && this.lore.equals(that.lore) : !that.hasLore())
@@ -760,7 +785,8 @@ class CraftMetaItem implements ItemMeta, Repairable {
&& (this.hasAttributes() ? that.hasAttributes() && this.attributes.equals(that.attributes) : !that.hasAttributes())
&& (this.hasRepairCost() ? that.hasRepairCost() && this.repairCost == that.repairCost : !that.hasRepairCost())
&& (this.unhandledTags.equals(that.unhandledTags))
- && (this.hideFlag == that.hideFlag);
+ && (this.hideFlag == that.hideFlag)
+ && (this.spigot.isUnbreakable() == that.spigot.isUnbreakable()); // Spigot
}
/**
@@ -786,6 +812,7 @@ class CraftMetaItem implements ItemMeta, Repairable {
hash = 61 * hash + (hasAttributes() ? this.attributes.hashCode() : 0);
@@ -788,6 +814,7 @@ class CraftMetaItem implements ItemMeta, Repairable {
hash = 61 * hash + (hasRepairCost() ? this.repairCost : 0);
hash = 61 * hash + unhandledTags.hashCode();
hash = 61 * hash + hideFlag;
+ hash = 61 * hash + (spigot.isUnbreakable() ? 1231 : 1237); // Spigot
return hash;
}
@@ -829,6 +856,14 @@ class CraftMetaItem implements ItemMeta, Repairable {
@@ -831,6 +858,14 @@ class CraftMetaItem implements ItemMeta, Repairable {
if (hasRepairCost()) {
builder.put(REPAIR.BUKKIT, repairCost);
}
@ -110,7 +110,7 @@ index e6f2df3..e12f636 100644
Set<String> hideFlags = new HashSet<String>();
for (ItemFlag hideFlagEnum : getItemFlags()) {
@@ -901,6 +936,7 @@ class CraftMetaItem implements ItemMeta, Repairable {
@@ -903,6 +938,7 @@ class CraftMetaItem implements ItemMeta, Repairable {
synchronized (HANDLED_TAGS) {
if (HANDLED_TAGS.isEmpty()) {
HANDLED_TAGS.addAll(Arrays.asList(
@ -118,7 +118,7 @@ index e6f2df3..e12f636 100644
DISPLAY.NBT,
REPAIR.NBT,
ATTRIBUTES.NBT,
@@ -926,6 +962,19 @@ class CraftMetaItem implements ItemMeta, Repairable {
@@ -928,6 +964,19 @@ class CraftMetaItem implements ItemMeta, Repairable {
// Spigot start
private final Spigot spigot = new Spigot()
{