1
0
mirror of https://e.coding.net/circlecloud/Soulbound.git synced 2024-11-25 02:19:11 +00:00

add bind tag to Misc.java...

Signed-off-by: j502647092 <jtb1@163.com>
This commit is contained in:
j502647092 2015-04-29 15:01:54 +08:00
parent 3b72815e63
commit d4e26f4fcd
2 changed files with 11 additions and 11 deletions

View File

@ -75,7 +75,7 @@ public class ItemUtils {
if (itemMeta.hasLore()) {
itemLore.addAll(itemMeta.getLore());
}
itemLore.add(ChatColor.DARK_RED + "Bind on Pickup");
itemLore.add(Misc.PICKUPBIND_TAG);
itemMeta.setLore(itemLore);
itemStack.setItemMeta(itemMeta);
return itemStack;
@ -96,7 +96,7 @@ public class ItemUtils {
if (itemMeta.hasLore()) {
itemLore.addAll(itemMeta.getLore());
}
itemLore.add(ChatColor.DARK_RED + "Bind on Equip");
itemLore.add(Misc.EQUIPBIND_TAG);
itemMeta.setLore(itemLore);
itemStack.setItemMeta(itemMeta);
return itemStack;
@ -117,7 +117,7 @@ public class ItemUtils {
if (itemMeta.hasLore()) {
itemLore.addAll(itemMeta.getLore());
}
itemLore.add(ChatColor.DARK_RED + "Bind on Use");
itemLore.add(Misc.USEBIND_TAG);
itemMeta.setLore(itemLore);
itemStack.setItemMeta(itemMeta);
return itemStack;
@ -167,7 +167,7 @@ public class ItemUtils {
if (itemMeta.hasLore()) {
List<String> itemLore = itemMeta.getLore();
for (String lore : itemLore) {
if (lore.equalsIgnoreCase(Misc.SOULBOUND_TAG)) {
if (lore.contains(Misc.SOULBOUND_TAG)) {
return true;
}
}
@ -183,7 +183,7 @@ public class ItemUtils {
ItemMeta itemMeta = itemStack.getItemMeta();
if (itemMeta.hasLore()) {
List<String> itemLore = itemMeta.getLore();
if (itemLore.contains(ChatColor.DARK_RED + "Bind on Pickup")) {
if (itemLore.contains(Misc.PICKUPBIND_TAG)) {
return true;
}
}
@ -198,7 +198,7 @@ public class ItemUtils {
ItemMeta itemMeta = itemStack.getItemMeta();
if (itemMeta.hasLore()) {
List<String> itemLore = itemMeta.getLore();
if (itemLore.contains(ChatColor.DARK_RED + "Bind on Use")) {
if (itemLore.contains(Misc.USEBIND_TAG)) {
return true;
}
}
@ -213,7 +213,7 @@ public class ItemUtils {
ItemMeta itemMeta = itemStack.getItemMeta();
if (itemMeta.hasLore()) {
List<String> itemLore = itemMeta.getLore();
if (itemLore.contains(ChatColor.DARK_RED + "Bind on Equip")) {
if (itemLore.contains(Misc.EQUIPBIND_TAG)) {
return true;
}
}

View File

@ -3,8 +3,8 @@ package com.me.tft_02.soulbound.util;
import org.bukkit.ChatColor;
public class Misc {
public static String SOULBOUND_TAG = ChatColor.GOLD + "Soulbound";
public static String PICKUPBIND_TAG = ChatColor.GOLD + "Soulbound";
public static String USEBIND_TAG = ChatColor.GOLD + "Soulbound";
public static String EQUIPBIND_TAG = ChatColor.GOLD + "Soulbound";
public static String SOULBOUND_TAG = ChatColor.GOLD + "灵魂绑定";
public static String PICKUPBIND_TAG = ChatColor.DARK_RED + "拾取后绑定";
public static String USEBIND_TAG = ChatColor.DARK_RED + "使用后绑定";
public static String EQUIPBIND_TAG = ChatColor.DARK_RED + "装备后绑定";
}