From a6b12bbb29f0f3fc1349bdba48465186fcd1a8b2 Mon Sep 17 00:00:00 2001 From: travis-ci Date: Sat, 15 Aug 2015 17:51:14 +0000 Subject: [PATCH] Latest javadoc on successful travis build 31 auto-pushed to gh-pages --- deprecated-list.html | 142 ++--- index-all.html | 102 +-- net/milkbowl/vault/item/Items.html | 26 +- src-html/net/milkbowl/vault/item/Items.html | 650 ++++++++++---------- 4 files changed, 477 insertions(+), 443 deletions(-) diff --git a/deprecated-list.html b/deprecated-list.html index 28a10a1..043a2f7 100644 --- a/deprecated-list.html +++ b/deprecated-list.html @@ -118,129 +118,129 @@ net.milkbowl.vault.item.ItemInfo.getId() -net.milkbowl.vault.permission.Permission.getPlayerGroups(String, String) -
As of VaultAPI 1.4 use Permission.getPlayerGroups(String, OfflinePlayer) instead.
+net.milkbowl.vault.chat.Chat.getPlayerGroups(String, String) +
As of VaultAPI 1.4 use {Chat.getPlayerGroups(String, OfflinePlayer) instead. + Gets the list of groups that this player has
-net.milkbowl.vault.chat.Chat.getPlayerGroups(String, String) -
As of VaultAPI 1.4 use {getPlayerGroups(String, OfflinePlayer) instead. - Gets the list of groups that this player has
+net.milkbowl.vault.permission.Permission.getPlayerGroups(String, String) +
As of VaultAPI 1.4 use getPlayerGroups(String, OfflinePlayer) instead.
-net.milkbowl.vault.permission.Permission.getPlayerGroups(World, String) -
As of VaultAPI 1.4 use Permission.getPlayerGroups(String, OfflinePlayer) instead.
+net.milkbowl.vault.chat.Chat.getPlayerGroups(World, String) +
As of VaultAPI 1.4 use {Chat.getPlayerGroups(String, OfflinePlayer) instead. + Gets the list of groups that this player has
-net.milkbowl.vault.chat.Chat.getPlayerGroups(World, String) -
As of VaultAPI 1.4 use {getPlayerGroups(String, OfflinePlayer) instead. - Gets the list of groups that this player has
+net.milkbowl.vault.permission.Permission.getPlayerGroups(World, String) +
As of VaultAPI 1.4 use getPlayerGroups(String, OfflinePlayer) instead.
net.milkbowl.vault.chat.Chat.getPlayerInfoBoolean(String, String, String, boolean) -
As of VaultAPI 1.4 use {getPlayerInfoBoolean(String, OfflinePlayer, String, boolean) instead. +
As of VaultAPI 1.4 use {Chat.getPlayerInfoBoolean(String, OfflinePlayer, String, boolean) instead. Get a players informational node (Boolean) value
net.milkbowl.vault.chat.Chat.getPlayerInfoBoolean(World, String, String, boolean) -
As of VaultAPI 1.4 use {getPlayerInfoBoolean(String, OfflinePlayer, String, boolean) instead. +
As of VaultAPI 1.4 use {Chat.getPlayerInfoBoolean(String, OfflinePlayer, String, boolean) instead. Get a players informational node (Boolean) value
net.milkbowl.vault.chat.Chat.getPlayerInfoDouble(String, String, String, double) -
As of VaultAPI 1.4 use {getPlayerInfoDouble(String, OfflinePlayer, String, double) instead. +
As of VaultAPI 1.4 use {Chat.getPlayerInfoDouble(String, OfflinePlayer, String, double) instead. Get a players informational node (Double) value
net.milkbowl.vault.chat.Chat.getPlayerInfoDouble(World, String, String, double) -
As of VaultAPI 1.4 use {getPlayerInfoDouble(String, OfflinePlayer, String, double) instead +
As of VaultAPI 1.4 use {Chat.getPlayerInfoDouble(String, OfflinePlayer, String, double) instead Get a players informational node (Double) value
net.milkbowl.vault.chat.Chat.getPlayerInfoInteger(String, String, String, int) -
As of VaultAPI 1.4 use {getPlayerInfoInteger(String, OfflinePlayer, String, int) instead. +
As of VaultAPI 1.4 use {Chat.getPlayerInfoInteger(String, OfflinePlayer, String, int) instead. Get a players informational node (Integer) value
net.milkbowl.vault.chat.Chat.getPlayerInfoInteger(World, String, String, int) -
As of VaultAPI 1.4 use {getPlayerInfoInteger(String, OfflinePlayer, String, int) instead. +
As of VaultAPI 1.4 use {Chat.getPlayerInfoInteger(String, OfflinePlayer, String, int) instead. Get a players informational node (Integer) value
net.milkbowl.vault.chat.Chat.getPlayerInfoString(String, String, String, String) -
As of VaultAPI 1.4 use {getPlayerInfoString(String, OfflinePlayer, String, String) instead. +
As of VaultAPI 1.4 use {Chat.getPlayerInfoString(String, OfflinePlayer, String, String) instead. Get a players informational node (String) value
net.milkbowl.vault.chat.Chat.getPlayerInfoString(World, String, String, String) -
As of VaultAPI 1.4 use {getPlayerInfoString(String, OfflinePlayer, String, String) instead. +
As of VaultAPI 1.4 use {Chat.getPlayerInfoString(String, OfflinePlayer, String, String) instead. Get a players informational node (String) value
net.milkbowl.vault.chat.Chat.getPlayerPrefix(String, String) -
As of VaultAPI 1.4 use {getPlayerPrefix(String, OfflinePlayer) instead. +
As of VaultAPI 1.4 use {Chat.getPlayerPrefix(String, OfflinePlayer) instead. Get players prefix
net.milkbowl.vault.chat.Chat.getPlayerPrefix(World, String) -
As of VaultAPI 1.4 use {getPlayerPrefix(String, OfflinePlayer) instead. +
As of VaultAPI 1.4 use {Chat.getPlayerPrefix(String, OfflinePlayer) instead. Get players prefix
net.milkbowl.vault.chat.Chat.getPlayerSuffix(String, String) -
As of VaultAPI 1.4 use {getPlayerSuffix(String, OfflinePlayer) instead. +
As of VaultAPI 1.4 use {Chat.getPlayerSuffix(String, OfflinePlayer) instead. Get players suffix
net.milkbowl.vault.chat.Chat.getPlayerSuffix(World, String) -
As of VaultAPI 1.4 use {getPlayerSuffix(String, OfflinePlayer) instead. +
As of VaultAPI 1.4 use {Chat.getPlayerSuffix(String, OfflinePlayer) instead. Get players suffix
-net.milkbowl.vault.permission.Permission.getPrimaryGroup(String, String) - +net.milkbowl.vault.chat.Chat.getPrimaryGroup(String, String) +
As of VaultAPI 1.4 use {Chat.getPrimaryGroup(String, OfflinePlayer) instead. + Gets players primary group
-net.milkbowl.vault.chat.Chat.getPrimaryGroup(String, String) -
As of VaultAPI 1.4 use {getPrimaryGroup(String, OfflinePlayer) instead. - Gets players primary group
+net.milkbowl.vault.permission.Permission.getPrimaryGroup(String, String) +
As of VaultAPI 1.4 use getPrimaryGroup(String, OfflinePlayer) instead.
-net.milkbowl.vault.permission.Permission.getPrimaryGroup(World, String) - +net.milkbowl.vault.chat.Chat.getPrimaryGroup(World, String) +
As of VaultAPI 1.4 use {Chat.getPrimaryGroup(String, OfflinePlayer) instead. + Gets players primary group
-net.milkbowl.vault.chat.Chat.getPrimaryGroup(World, String) -
As of VaultAPI 1.4 use {getPrimaryGroup(String, OfflinePlayer) instead. - Gets players primary group
+net.milkbowl.vault.permission.Permission.getPrimaryGroup(World, String) +
As of VaultAPI 1.4 use getPrimaryGroup(String, OfflinePlayer) instead.
@@ -255,12 +255,12 @@ net.milkbowl.vault.permission.Permission.has(String, String, String) - +
As of VaultAPI 1.4 use playerHas(String, OfflinePlayer, String) instead.
net.milkbowl.vault.permission.Permission.has(World, String, String) - +
As of VaultAPI 1.4 use playerHas(String, OfflinePlayer, String) instead.
@@ -291,7 +291,7 @@ net.milkbowl.vault.permission.Permission.playerAdd(String, String, String) -
As of VaultAPI 1.4 use Permission.playerAdd(String, OfflinePlayer, String) instead. +
As of VaultAPI 1.4 use playerAdd(String, OfflinePlayer, String) instead. Add permission to a player. Supports NULL value for World if the permission system registered supports global permissions. But May return odd values if the servers registered permission system does not have a global permission store.
@@ -299,64 +299,64 @@ net.milkbowl.vault.permission.Permission.playerAdd(World, String, String) - +
As of VaultAPI 1.4 use playerAdd(String, OfflinePlayer, String) instead.
net.milkbowl.vault.permission.Permission.playerAddGroup(String, String, String) - +
As of VaultAPI 1.4 use playerAddGroup(String, OfflinePlayer, String) instead.
net.milkbowl.vault.permission.Permission.playerAddGroup(World, String, String) - +
As of VaultAPI 1.4 use playerAddGroup(String, OfflinePlayer, String) instead.
net.milkbowl.vault.permission.Permission.playerAddTransient(String, String) - +
As of VaultAPI 1.4 use playerAddTransient(OfflinePlayer, String) instead.
net.milkbowl.vault.permission.Permission.playerAddTransient(String, String, String) - + net.milkbowl.vault.permission.Permission.playerHas(String, String, String) - +
As of VaultAPI 1.4 use playerHas(String, OfflinePlayer, String) instead.
net.milkbowl.vault.permission.Permission.playerHas(World, String, String) - +
As of VaultAPI 1.4 use playerHas(String, OfflinePlayer, String) instead.
-net.milkbowl.vault.permission.Permission.playerInGroup(String, String, String) - - - - net.milkbowl.vault.chat.Chat.playerInGroup(String, String, String) -
As of VaultAPI 1.4 use {playerInGroup(String, OfflinePlayer, String) instead. +
As of VaultAPI 1.4 use {Chat.playerInGroup(String, OfflinePlayer, String) instead. Check if player is member of a group.
- -net.milkbowl.vault.permission.Permission.playerInGroup(World, String, String) - - - +net.milkbowl.vault.permission.Permission.playerInGroup(String, String, String) +
As of VaultAPI 1.4 use playerInGroup(String, OfflinePlayer, String) instead.
+ + + net.milkbowl.vault.chat.Chat.playerInGroup(World, String, String) -
As of VaultAPI 1.4 use {playerInGroup(String, OfflinePlayer, String) instead. +
As of VaultAPI 1.4 use {Chat.playerInGroup(String, OfflinePlayer, String) instead. Check if player is member of a group.
+ +net.milkbowl.vault.permission.Permission.playerInGroup(World, String, String) +
As of VaultAPI 1.4 use playerInGroup(String, OfflinePlayer, String) instead.
+ + net.milkbowl.vault.permission.Permission.playerRemove(String, String, String) - +
As of VaultAPI 1.4 use playerRemove(String, OfflinePlayer, String) instead.
@@ -364,98 +364,98 @@ net.milkbowl.vault.permission.Permission.playerRemoveGroup(String, String, String) - +
As of VaultAPI 1.4 use playerRemoveGroup(String, OfflinePlayer, String) instead.
net.milkbowl.vault.permission.Permission.playerRemoveGroup(World, String, String) - +
As of VaultAPI 1.4 use playerRemoveGroup(String, OfflinePlayer, String) instead.
net.milkbowl.vault.permission.Permission.playerRemoveTransient(String, String) - +
As of VaultAPI 1.4 use playerRemoveTransient(OfflinePlayer, String) instead.
net.milkbowl.vault.permission.Permission.playerRemoveTransient(String, String, String) - + net.milkbowl.vault.chat.Chat.setPlayerInfoBoolean(String, String, String, boolean) -
As of VaultAPI 1.4 use {setPlayerInfoBoolean(String, OfflinePlayer, String, boolean) instead. +
As of VaultAPI 1.4 use {Chat.setPlayerInfoBoolean(String, OfflinePlayer, String, boolean) instead. Set a players informational node (Boolean) value
net.milkbowl.vault.chat.Chat.setPlayerInfoBoolean(World, String, String, boolean) -
As of VaultAPI 1.4 use {setPlayerInfoBoolean(String, OfflinePlayer, String, boolean) instead. +
As of VaultAPI 1.4 use {Chat.setPlayerInfoBoolean(String, OfflinePlayer, String, boolean) instead. Set a players informational node (Boolean) value
net.milkbowl.vault.chat.Chat.setPlayerInfoDouble(String, String, String, double) -
As of VaultAPI 1.4 use {setPlayerInfoDouble(String, OfflinePlayer, String, double) instead. +
As of VaultAPI 1.4 use {Chat.setPlayerInfoDouble(String, OfflinePlayer, String, double) instead. Set a players informational node (Double) value
net.milkbowl.vault.chat.Chat.setPlayerInfoDouble(World, String, String, double) -
As of VaultAPI 1.4 use {setPlayerInfoDouble(String, OfflinePlayer, String, double) instead. +
As of VaultAPI 1.4 use {Chat.setPlayerInfoDouble(String, OfflinePlayer, String, double) instead. Set a players informational node (Double) value
net.milkbowl.vault.chat.Chat.setPlayerInfoInteger(String, String, String, int) -
As of VaultAPI 1.4 use {setPlayerInfoInteger(String, OfflinePlayer, String, int) instead. +
As of VaultAPI 1.4 use {Chat.setPlayerInfoInteger(String, OfflinePlayer, String, int) instead. Set a players informational node (Integer) value
net.milkbowl.vault.chat.Chat.setPlayerInfoInteger(World, String, String, int) -
As of VaultAPI 1.4 use {setPlayerInfoInteger(String, OfflinePlayer, String, int) instead. +
As of VaultAPI 1.4 use {Chat.setPlayerInfoInteger(String, OfflinePlayer, String, int) instead. Set a players informational node (Integer) value
net.milkbowl.vault.chat.Chat.setPlayerInfoString(String, String, String, String) -
As of VaultAPI 1.4 use {setPlayerInfoString(String, OfflinePlayer, String, String) instead. +
As of VaultAPI 1.4 use {Chat.setPlayerInfoString(String, OfflinePlayer, String, String) instead. Set a players informational node (String) value
net.milkbowl.vault.chat.Chat.setPlayerInfoString(World, String, String, String) -
As of VaultAPI 1.4 use {setPlayerInfoString(String, OfflinePlayer, String, String) instead. +
As of VaultAPI 1.4 use {Chat.setPlayerInfoString(String, OfflinePlayer, String, String) instead. Set a players informational node (String) value
net.milkbowl.vault.chat.Chat.setPlayerPrefix(String, String, String) -
As of VaultAPI 1.4 use {setPlayerPrefix(String, OfflinePlayer, String) instead. +
As of VaultAPI 1.4 use {Chat.setPlayerPrefix(String, OfflinePlayer, String) instead. Set players prefix
net.milkbowl.vault.chat.Chat.setPlayerPrefix(World, String, String) -
As of VaultAPI 1.4 use {setPlayerPrefix(String, OfflinePlayer, String) instead. +
As of VaultAPI 1.4 use {Chat.setPlayerPrefix(String, OfflinePlayer, String) instead. Set players prefix in the given world.
net.milkbowl.vault.chat.Chat.setPlayerSuffix(String, String, String) -
As of VaultAPI 1.4 use {setPlayerSuffix(String, OfflinePlayer, String) instead. +
As of VaultAPI 1.4 use {Chat.setPlayerSuffix(String, OfflinePlayer, String) instead. Set players suffix
net.milkbowl.vault.chat.Chat.setPlayerSuffix(World, String, String) -
As of VaultAPI 1.4 use {setPlayerSuffix(String, OfflinePlayer, String) instead. +
As of VaultAPI 1.4 use {Chat.setPlayerSuffix(String, OfflinePlayer, String) instead. Set players suffix
diff --git a/index-all.html b/index-all.html index 361b15d..ce0e4b4 100644 --- a/index-all.html +++ b/index-all.html @@ -354,14 +354,14 @@
getPlayerGroups(String, String) - Method in class net.milkbowl.vault.chat.Chat
Deprecated. -
As of VaultAPI 1.4 use {getPlayerGroups(String, OfflinePlayer) instead. +
As of VaultAPI 1.4 use {Chat.getPlayerGroups(String, OfflinePlayer) instead. Gets the list of groups that this player has
getPlayerGroups(World, String) - Method in class net.milkbowl.vault.chat.Chat
Deprecated. -
As of VaultAPI 1.4 use {getPlayerGroups(String, OfflinePlayer) instead. +
As of VaultAPI 1.4 use {Chat.getPlayerGroups(String, OfflinePlayer) instead. Gets the list of groups that this player has
@@ -372,13 +372,13 @@
getPlayerGroups(String, String) - Method in class net.milkbowl.vault.permission.Permission
Deprecated. - +
As of VaultAPI 1.4 use getPlayerGroups(String, OfflinePlayer) instead.
getPlayerGroups(World, String) - Method in class net.milkbowl.vault.permission.Permission
Deprecated. - +
As of VaultAPI 1.4 use getPlayerGroups(String, OfflinePlayer) instead.
getPlayerGroups(String, OfflinePlayer) - Method in class net.milkbowl.vault.permission.Permission
@@ -397,7 +397,7 @@
getPlayerInfoBoolean(String, String, String, boolean) - Method in class net.milkbowl.vault.chat.Chat
Deprecated. -
As of VaultAPI 1.4 use {getPlayerInfoBoolean(String, OfflinePlayer, String, boolean) instead. +
As of VaultAPI 1.4 use {Chat.getPlayerInfoBoolean(String, OfflinePlayer, String, boolean) instead. Get a players informational node (Boolean) value
@@ -405,7 +405,7 @@
getPlayerInfoBoolean(World, String, String, boolean) - Method in class net.milkbowl.vault.chat.Chat
Deprecated. -
As of VaultAPI 1.4 use {getPlayerInfoBoolean(String, OfflinePlayer, String, boolean) instead. +
As of VaultAPI 1.4 use {Chat.getPlayerInfoBoolean(String, OfflinePlayer, String, boolean) instead. Get a players informational node (Boolean) value
@@ -421,7 +421,7 @@
getPlayerInfoDouble(String, String, String, double) - Method in class net.milkbowl.vault.chat.Chat
Deprecated. -
As of VaultAPI 1.4 use {getPlayerInfoDouble(String, OfflinePlayer, String, double) instead. +
As of VaultAPI 1.4 use {Chat.getPlayerInfoDouble(String, OfflinePlayer, String, double) instead. Get a players informational node (Double) value
@@ -429,7 +429,7 @@
getPlayerInfoDouble(World, String, String, double) - Method in class net.milkbowl.vault.chat.Chat
Deprecated. -
As of VaultAPI 1.4 use {getPlayerInfoDouble(String, OfflinePlayer, String, double) instead +
As of VaultAPI 1.4 use {Chat.getPlayerInfoDouble(String, OfflinePlayer, String, double) instead Get a players informational node (Double) value
@@ -445,14 +445,14 @@
getPlayerInfoInteger(String, String, String, int) - Method in class net.milkbowl.vault.chat.Chat
Deprecated. -
As of VaultAPI 1.4 use {getPlayerInfoInteger(String, OfflinePlayer, String, int) instead. +
As of VaultAPI 1.4 use {Chat.getPlayerInfoInteger(String, OfflinePlayer, String, int) instead. Get a players informational node (Integer) value
getPlayerInfoInteger(World, String, String, int) - Method in class net.milkbowl.vault.chat.Chat
Deprecated. -
As of VaultAPI 1.4 use {getPlayerInfoInteger(String, OfflinePlayer, String, int) instead. +
As of VaultAPI 1.4 use {Chat.getPlayerInfoInteger(String, OfflinePlayer, String, int) instead. Get a players informational node (Integer) value
@@ -468,7 +468,7 @@
getPlayerInfoString(String, String, String, String) - Method in class net.milkbowl.vault.chat.Chat
Deprecated. -
As of VaultAPI 1.4 use {getPlayerInfoString(String, OfflinePlayer, String, String) instead. +
As of VaultAPI 1.4 use {Chat.getPlayerInfoString(String, OfflinePlayer, String, String) instead. Get a players informational node (String) value
@@ -476,7 +476,7 @@
getPlayerInfoString(World, String, String, String) - Method in class net.milkbowl.vault.chat.Chat
Deprecated. -
As of VaultAPI 1.4 use {getPlayerInfoString(String, OfflinePlayer, String, String) instead. +
As of VaultAPI 1.4 use {Chat.getPlayerInfoString(String, OfflinePlayer, String, String) instead. Get a players informational node (String) value
@@ -487,7 +487,7 @@
getPlayerPrefix(String, String) - Method in class net.milkbowl.vault.chat.Chat
Deprecated. -
As of VaultAPI 1.4 use {getPlayerPrefix(String, OfflinePlayer) instead. +
As of VaultAPI 1.4 use {Chat.getPlayerPrefix(String, OfflinePlayer) instead. Get players prefix
@@ -500,7 +500,7 @@
getPlayerPrefix(World, String) - Method in class net.milkbowl.vault.chat.Chat
Deprecated. -
As of VaultAPI 1.4 use {getPlayerPrefix(String, OfflinePlayer) instead. +
As of VaultAPI 1.4 use {Chat.getPlayerPrefix(String, OfflinePlayer) instead. Get players prefix
@@ -512,7 +512,7 @@
getPlayerSuffix(String, String) - Method in class net.milkbowl.vault.chat.Chat
Deprecated. -
As of VaultAPI 1.4 use {getPlayerSuffix(String, OfflinePlayer) instead. +
As of VaultAPI 1.4 use {Chat.getPlayerSuffix(String, OfflinePlayer) instead. Get players suffix
@@ -524,7 +524,7 @@
getPlayerSuffix(World, String) - Method in class net.milkbowl.vault.chat.Chat
Deprecated. -
As of VaultAPI 1.4 use {getPlayerSuffix(String, OfflinePlayer) instead. +
As of VaultAPI 1.4 use {Chat.getPlayerSuffix(String, OfflinePlayer) instead. Get players suffix
@@ -540,14 +540,14 @@
getPrimaryGroup(String, String) - Method in class net.milkbowl.vault.chat.Chat
Deprecated. -
As of VaultAPI 1.4 use {getPrimaryGroup(String, OfflinePlayer) instead. +
As of VaultAPI 1.4 use {Chat.getPrimaryGroup(String, OfflinePlayer) instead. Gets players primary group
getPrimaryGroup(World, String) - Method in class net.milkbowl.vault.chat.Chat
Deprecated. -
As of VaultAPI 1.4 use {getPrimaryGroup(String, OfflinePlayer) instead. +
As of VaultAPI 1.4 use {Chat.getPrimaryGroup(String, OfflinePlayer) instead. Gets players primary group
@@ -558,13 +558,13 @@
getPrimaryGroup(String, String) - Method in class net.milkbowl.vault.permission.Permission
Deprecated. - +
As of VaultAPI 1.4 use getPrimaryGroup(String, OfflinePlayer) instead.
getPrimaryGroup(World, String) - Method in class net.milkbowl.vault.permission.Permission
Deprecated. - +
As of VaultAPI 1.4 use getPrimaryGroup(String, OfflinePlayer) instead.
getPrimaryGroup(String, OfflinePlayer) - Method in class net.milkbowl.vault.permission.Permission
@@ -640,13 +640,13 @@
has(String, String, String) - Method in class net.milkbowl.vault.permission.Permission
Deprecated. - +
As of VaultAPI 1.4 use playerHas(String, OfflinePlayer, String) instead.
has(World, String, String) - Method in class net.milkbowl.vault.permission.Permission
Deprecated. - +
As of VaultAPI 1.4 use playerHas(String, OfflinePlayer, String) instead.
has(CommandSender, String) - Method in class net.milkbowl.vault.permission.Permission
@@ -848,7 +848,7 @@
playerAdd(String, String, String) - Method in class net.milkbowl.vault.permission.Permission
Deprecated. -
As of VaultAPI 1.4 use Permission.playerAdd(String, OfflinePlayer, String) instead. +
As of VaultAPI 1.4 use playerAdd(String, OfflinePlayer, String) instead. Add permission to a player. Supports NULL value for World if the permission system registered supports global permissions. But May return odd values if the servers registered permission system does not have a global permission store.
@@ -857,7 +857,7 @@
playerAdd(World, String, String) - Method in class net.milkbowl.vault.permission.Permission
Deprecated. - +
As of VaultAPI 1.4 use playerAdd(String, OfflinePlayer, String) instead.
playerAdd(String, OfflinePlayer, String) - Method in class net.milkbowl.vault.permission.Permission
@@ -871,13 +871,13 @@
playerAddGroup(String, String, String) - Method in class net.milkbowl.vault.permission.Permission
Deprecated. - +
As of VaultAPI 1.4 use playerAddGroup(String, OfflinePlayer, String) instead.
playerAddGroup(World, String, String) - Method in class net.milkbowl.vault.permission.Permission
Deprecated. - +
As of VaultAPI 1.4 use playerAddGroup(String, OfflinePlayer, String) instead.
playerAddGroup(String, OfflinePlayer, String) - Method in class net.milkbowl.vault.permission.Permission
@@ -891,7 +891,7 @@
playerAddTransient(String, String) - Method in class net.milkbowl.vault.permission.Permission
Deprecated. - +
As of VaultAPI 1.4 use playerAddTransient(OfflinePlayer, String) instead.
playerAddTransient(OfflinePlayer, String) - Method in class net.milkbowl.vault.permission.Permission
@@ -913,19 +913,19 @@
playerAddTransient(String, String, String) - Method in class net.milkbowl.vault.permission.Permission
Deprecated. - +
playerHas(String, String, String) - Method in class net.milkbowl.vault.permission.Permission
Deprecated. - +
As of VaultAPI 1.4 use playerHas(String, OfflinePlayer, String) instead.
playerHas(World, String, String) - Method in class net.milkbowl.vault.permission.Permission
Deprecated. - +
As of VaultAPI 1.4 use playerHas(String, OfflinePlayer, String) instead.
playerHas(String, OfflinePlayer, String) - Method in class net.milkbowl.vault.permission.Permission
@@ -943,14 +943,14 @@
playerInGroup(String, String, String) - Method in class net.milkbowl.vault.chat.Chat
Deprecated. -
As of VaultAPI 1.4 use {playerInGroup(String, OfflinePlayer, String) instead. +
As of VaultAPI 1.4 use {Chat.playerInGroup(String, OfflinePlayer, String) instead. Check if player is member of a group.
playerInGroup(World, String, String) - Method in class net.milkbowl.vault.chat.Chat
Deprecated. -
As of VaultAPI 1.4 use {playerInGroup(String, OfflinePlayer, String) instead. +
As of VaultAPI 1.4 use {Chat.playerInGroup(String, OfflinePlayer, String) instead. Check if player is member of a group.
@@ -961,13 +961,13 @@
playerInGroup(String, String, String) - Method in class net.milkbowl.vault.permission.Permission
Deprecated. - +
As of VaultAPI 1.4 use playerInGroup(String, OfflinePlayer, String) instead.
playerInGroup(World, String, String) - Method in class net.milkbowl.vault.permission.Permission
Deprecated. - +
As of VaultAPI 1.4 use playerInGroup(String, OfflinePlayer, String) instead.
playerInGroup(String, OfflinePlayer, String) - Method in class net.milkbowl.vault.permission.Permission
@@ -981,7 +981,7 @@
playerRemove(String, String, String) - Method in class net.milkbowl.vault.permission.Permission
Deprecated. - +
As of VaultAPI 1.4 use playerRemove(String, OfflinePlayer, String) instead.
playerRemove(String, OfflinePlayer, String) - Method in class net.milkbowl.vault.permission.Permission
@@ -999,13 +999,13 @@
playerRemoveGroup(String, String, String) - Method in class net.milkbowl.vault.permission.Permission
Deprecated. - +
As of VaultAPI 1.4 use playerRemoveGroup(String, OfflinePlayer, String) instead.
playerRemoveGroup(World, String, String) - Method in class net.milkbowl.vault.permission.Permission
Deprecated. - +
As of VaultAPI 1.4 use playerRemoveGroup(String, OfflinePlayer, String) instead.
playerRemoveGroup(String, OfflinePlayer, String) - Method in class net.milkbowl.vault.permission.Permission
@@ -1019,7 +1019,7 @@
playerRemoveTransient(String, String, String) - Method in class net.milkbowl.vault.permission.Permission
Deprecated. - +
playerRemoveTransient(String, OfflinePlayer, String) - Method in class net.milkbowl.vault.permission.Permission
@@ -1033,7 +1033,7 @@
playerRemoveTransient(String, String) - Method in class net.milkbowl.vault.permission.Permission
Deprecated. - +
As of VaultAPI 1.4 use playerRemoveTransient(OfflinePlayer, String) instead.
playerRemoveTransient(OfflinePlayer, String) - Method in class net.milkbowl.vault.permission.Permission
@@ -1107,14 +1107,14 @@
setPlayerInfoBoolean(String, String, String, boolean) - Method in class net.milkbowl.vault.chat.Chat
Deprecated. -
As of VaultAPI 1.4 use {setPlayerInfoBoolean(String, OfflinePlayer, String, boolean) instead. +
As of VaultAPI 1.4 use {Chat.setPlayerInfoBoolean(String, OfflinePlayer, String, boolean) instead. Set a players informational node (Boolean) value
setPlayerInfoBoolean(World, String, String, boolean) - Method in class net.milkbowl.vault.chat.Chat
Deprecated. -
As of VaultAPI 1.4 use {setPlayerInfoBoolean(String, OfflinePlayer, String, boolean) instead. +
As of VaultAPI 1.4 use {Chat.setPlayerInfoBoolean(String, OfflinePlayer, String, boolean) instead. Set a players informational node (Boolean) value
@@ -1129,14 +1129,14 @@
setPlayerInfoDouble(String, String, String, double) - Method in class net.milkbowl.vault.chat.Chat
Deprecated. -
As of VaultAPI 1.4 use {setPlayerInfoDouble(String, OfflinePlayer, String, double) instead. +
As of VaultAPI 1.4 use {Chat.setPlayerInfoDouble(String, OfflinePlayer, String, double) instead. Set a players informational node (Double) value
setPlayerInfoDouble(World, String, String, double) - Method in class net.milkbowl.vault.chat.Chat
Deprecated. -
As of VaultAPI 1.4 use {setPlayerInfoDouble(String, OfflinePlayer, String, double) instead. +
As of VaultAPI 1.4 use {Chat.setPlayerInfoDouble(String, OfflinePlayer, String, double) instead. Set a players informational node (Double) value
@@ -1151,7 +1151,7 @@
setPlayerInfoInteger(String, String, String, int) - Method in class net.milkbowl.vault.chat.Chat
Deprecated. -
As of VaultAPI 1.4 use {setPlayerInfoInteger(String, OfflinePlayer, String, int) instead. +
As of VaultAPI 1.4 use {Chat.setPlayerInfoInteger(String, OfflinePlayer, String, int) instead. Set a players informational node (Integer) value
@@ -1159,7 +1159,7 @@
setPlayerInfoInteger(World, String, String, int) - Method in class net.milkbowl.vault.chat.Chat
Deprecated. -
As of VaultAPI 1.4 use {setPlayerInfoInteger(String, OfflinePlayer, String, int) instead. +
As of VaultAPI 1.4 use {Chat.setPlayerInfoInteger(String, OfflinePlayer, String, int) instead. Set a players informational node (Integer) value
@@ -1175,14 +1175,14 @@
setPlayerInfoString(String, String, String, String) - Method in class net.milkbowl.vault.chat.Chat
Deprecated. -
As of VaultAPI 1.4 use {setPlayerInfoString(String, OfflinePlayer, String, String) instead. +
As of VaultAPI 1.4 use {Chat.setPlayerInfoString(String, OfflinePlayer, String, String) instead. Set a players informational node (String) value
setPlayerInfoString(World, String, String, String) - Method in class net.milkbowl.vault.chat.Chat
Deprecated. -
As of VaultAPI 1.4 use {setPlayerInfoString(String, OfflinePlayer, String, String) instead. +
As of VaultAPI 1.4 use {Chat.setPlayerInfoString(String, OfflinePlayer, String, String) instead. Set a players informational node (String) value
@@ -1193,7 +1193,7 @@
setPlayerPrefix(String, String, String) - Method in class net.milkbowl.vault.chat.Chat
Deprecated. -
As of VaultAPI 1.4 use {setPlayerPrefix(String, OfflinePlayer, String) instead. +
As of VaultAPI 1.4 use {Chat.setPlayerPrefix(String, OfflinePlayer, String) instead. Set players prefix
@@ -1205,7 +1205,7 @@
setPlayerPrefix(World, String, String) - Method in class net.milkbowl.vault.chat.Chat
Deprecated. -
As of VaultAPI 1.4 use {setPlayerPrefix(String, OfflinePlayer, String) instead. +
As of VaultAPI 1.4 use {Chat.setPlayerPrefix(String, OfflinePlayer, String) instead. Set players prefix in the given world.
@@ -1217,7 +1217,7 @@
setPlayerSuffix(String, String, String) - Method in class net.milkbowl.vault.chat.Chat
Deprecated. -
As of VaultAPI 1.4 use {setPlayerSuffix(String, OfflinePlayer, String) instead. +
As of VaultAPI 1.4 use {Chat.setPlayerSuffix(String, OfflinePlayer, String) instead. Set players suffix
@@ -1229,7 +1229,7 @@
setPlayerSuffix(World, String, String) - Method in class net.milkbowl.vault.chat.Chat
Deprecated. -
As of VaultAPI 1.4 use {setPlayerSuffix(String, OfflinePlayer, String) instead. +
As of VaultAPI 1.4 use {Chat.setPlayerSuffix(String, OfflinePlayer, String) instead. Set players suffix
diff --git a/net/milkbowl/vault/item/Items.html b/net/milkbowl/vault/item/Items.html index cc578c1..8b23216 100644 --- a/net/milkbowl/vault/item/Items.html +++ b/net/milkbowl/vault/item/Items.html @@ -273,7 +273,7 @@ extends

itemById

@Deprecated
-public static ItemInfo itemById(int typeId)
+public static ItemInfo itemById(int typeId)
Deprecated. 
@@ -284,7 +284,7 @@ public static 

itemById

@Deprecated
-public static ItemInfo itemById(int typeId,
+public static ItemInfo itemById(int typeId,
                            short subType)
Deprecated. 
@@ -295,7 +295,7 @@ public static 
  • itemByStack

    -
    public static ItemInfo itemByStack(org.bukkit.inventory.ItemStack itemStack)
    +
    public static ItemInfo itemByStack(org.bukkit.inventory.ItemStack itemStack)
    Searchs for an ItemInfo from the given ItemStack
    Parameters:
    itemStack - to search on
    Returns:
    ItemInfo found, or null
    @@ -307,7 +307,7 @@ public static 
  • itemByItem

    -
    public static ItemInfo itemByItem(ItemInfo item)
    +
    public static ItemInfo itemByItem(ItemInfo item)
  • @@ -316,7 +316,7 @@ public static 
  • itemByType

    -
    public static ItemInfo itemByType(org.bukkit.Material type)
    +
    public static ItemInfo itemByType(org.bukkit.Material type)
    Gets a relevant ItemInfo by it's Material
    Parameters:
    type - of Material
    Returns:
    ItemInfo record found or null if none
    @@ -328,7 +328,7 @@ public static 
  • itemByType

    -
    public static ItemInfo itemByType(org.bukkit.Material type,
    +
    public static ItemInfo itemByType(org.bukkit.Material type,
                       short subType)
    Searches for an ItemInfo record by Material and SubTypeID
    Parameters:
    type - of Material
    subType - to check for
    @@ -341,7 +341,7 @@ public static 
  • itemByString

    -
    public static ItemInfo itemByString(String string)
    +
    public static ItemInfo itemByString(String string)
    Search for an item from a given string, useful for user input. Uses 3 different types of reg-exp searching. Checks first for an ItemID. Checks second for ItemID:SubType @@ -356,7 +356,7 @@ public static 
  • itemByName

    -
    public static ItemInfo itemByName(ArrayList<String> search)
    +
    public static ItemInfo itemByName(ArrayList<String> search)
  • @@ -365,7 +365,7 @@ public static 
  • itemByNames

    -
    public static ItemInfo[] itemByNames(ArrayList<String> search,
    +
    public static ItemInfo[] itemByNames(ArrayList<String> search,
                          boolean multi)
  • @@ -375,7 +375,7 @@ public static 
  • itemsByName

    -
    public static ItemInfo[] itemsByName(String searchString,
    +
    public static ItemInfo[] itemsByName(String searchString,
                          boolean multi)
    Multi-Item return search for dumping all items with the search string to the player
    Parameters:
    searchString - to search for
    multi - whether to return a list of items or just the first
    @@ -388,7 +388,7 @@ public static 
  • itemByName

    -
    public static ItemInfo itemByName(String searchString)
    +
    public static ItemInfo itemByName(String searchString)
    Single item search function, for when we only ever want to return 1 result
    Parameters:
    searchString - to search for
    Returns:
    ItemInfo Object
    @@ -400,7 +400,7 @@ public static 
  • join

    -
    public static String join(String[] array,
    +
    public static String join(String[] array,
               String glue)
    Joins elements of a String array with the glue between them into a String.
    Parameters:
    array - of elements to join together
    glue - what to put between each element
    @@ -413,7 +413,7 @@ public static 
  • join

    -
    public static String join(List<String> list,
    +
    public static String join(List<String> list,
               String glue)
    Joins elements of a String array with the glue between them into a String.
    Parameters:
    list - of items to join together
    glue - what to put between each element
    diff --git a/src-html/net/milkbowl/vault/item/Items.html b/src-html/net/milkbowl/vault/item/Items.html index ed019a0..628a52f 100644 --- a/src-html/net/milkbowl/vault/item/Items.html +++ b/src-html/net/milkbowl/vault/item/Items.html @@ -710,242 +710,242 @@ 702 items.add(new ItemInfo("Armor Stand", new String[][]{{"armo", "stan"}}, Material.ARMOR_STAND)); 703 items.add(new ItemInfo("Raw Mutton", new String[][]{{"mutt"}, {"raw", "mutt"}}, Material.MUTTON)); 704 items.add(new ItemInfo("Cooked Mutton", new String[][]{{"cook", "mutt"}}, Material.COOKED_MUTTON)); -705 items.add(new ItemInfo("Banner", new String[][]{{"banner"}}, Material.BANNER)); -706 items.add(new ItemInfo("Potion of Leaping", new String[][] {{"poti", "leap"}}, Material.POTION, (short) 8203)); -707 items.add(new ItemInfo("Potion of Leaping (Extended)", new String[][] {{"poti", "leap", "ext"}}, Material.POTION, (short) 8267)); -708 items.add(new ItemInfo("Potion of Leaping II", new String[][] {{"poti", "leap", "ii"}, {"poti", "leap", "2"}}, Material.POTION, (short) 8235)); -709 items.add(new ItemInfo("Splash Potion of Leaping", new String[][] {{"spl", "poti", "leap"}}, Material.POTION, (short) 16395)); -710 items.add(new ItemInfo("Splash Potion of Leaping (Extended)", new String[][] {{"poti", "leap", "spl", "ext"}}, Material.POTION, (short) 16459)); -711 items.add(new ItemInfo("Splash Potion of Leaping II", new String[][] {{"poti", "leap", "spl", "2"}, {"poti", "leap", "spl", "ii"}}, Material.POTION, (short) 16427)); -712 items.add(new ItemInfo("Bat Spawn Egg", new String[][] {{"bat", "spaw", "egg"}}, Material.MONSTER_EGG, (short) 65)); -713 items.add(new ItemInfo("Witch Spawn Egg", new String[][] {{"witc", "spaw", "egg"}}, Material.MONSTER_EGG, (short) 66)); -714 items.add(new ItemInfo("Endermite Spawn Egg", new String[][] {{"mite", "end", "spaw", "egg"}}, Material.MONSTER_EGG, (short) 67)); -715 items.add(new ItemInfo("Guardian Spawn Egg", new String[][] {{"guard", "spaw", "egg"}}, Material.MONSTER_EGG, (short) 68)); -716 items.add(new ItemInfo("Rabbit Spawn Egg", new String[][] {{"rabb", "spaw", "egg"}}, Material.MONSTER_EGG, (short) 101)); -717 -718 } -719 -720 @Deprecated -721 public static ItemInfo itemById(int typeId) { -722 return itemByType(Material.getMaterial(typeId), (short) 0); -723 } -724 -725 @Deprecated -726 public static ItemInfo itemById(int typeId, short subType) { -727 return itemByType(Material.getMaterial(typeId), subType); -728 } -729 -730 /** -731 * Searchs for an ItemInfo from the given ItemStack -732 * @param itemStack to search on -733 * @return ItemInfo found, or null -734 */ -735 public static ItemInfo itemByStack(ItemStack itemStack) { -736 if (itemStack == null) { -737 return null; -738 } +705 items.add(new ItemInfo("White Banner", new String[][]{{"banner", "whit"}, {"banner"}}, Material.BANNER)); +706 items.add(new ItemInfo("Orange Banner", new String[][]{{"banner", "ora"}}, Material.BANNER, (short) 1)); +707 items.add(new ItemInfo("Magenta Banner", new String[][]{{"banner", "mag"}}, Material.BANNER, (short) 2)); +708 items.add(new ItemInfo("Light Blue Banner", new String[][]{{"banner", "lig", "blue"}}, Material.BANNER, (short) 3)); +709 items.add(new ItemInfo("Yellow Banner", new String[][]{{"banner", "yell"}}, Material.BANNER, (short) 4)); +710 items.add(new ItemInfo("Lime Banner", new String[][]{{"banner", "lime"}, {"banner", "lime"}}, Material.BANNER, (short) 5)); +711 items.add(new ItemInfo("Pink Banner", new String[][]{{"banner", "pink"}}, Material.BANNER, (short) 6)); +712 items.add(new ItemInfo("Gray Banner", new String[][]{{"banner", "gray"}, {"banner", "grey"}}, Material.BANNER, (short) 7)); +713 items.add(new ItemInfo("Light Gray Banner", new String[][]{{"lig", "banner", "gra"}, {"lig", "banner", "gre"}}, Material.BANNER, (short) 8)); +714 items.add(new ItemInfo("Cyan Banner", new String[][]{{"banner", "cya"}}, Material.BANNER, (short) 9)); +715 items.add(new ItemInfo("Purple Banner", new String[][]{{"banner", "pur"}}, Material.BANNER, (short) 10)); +716 items.add(new ItemInfo("Blue Banner", new String[][]{{"banner", "blue"}}, Material.BANNER, (short) 11)); +717 items.add(new ItemInfo("Brown Banner", new String[][]{{"banner", "brow"}}, Material.BANNER, (short) 12)); +718 items.add(new ItemInfo("Green Banner", new String[][]{{"banner", "gree"}, {"banner", "gree"}}, Material.BANNER, (short) 13)); +719 items.add(new ItemInfo("Red Banner", new String[][]{{"banner", "red"}}, Material.BANNER, (short) 14)); +720 items.add(new ItemInfo("Black Banner", new String[][]{{"banner", "bla"}}, Material.BANNER, (short) 15)); +721 items.add(new ItemInfo("Potion of Leaping", new String[][] {{"poti", "leap"}}, Material.POTION, (short) 8203)); +722 items.add(new ItemInfo("Potion of Leaping (Extended)", new String[][] {{"poti", "leap", "ext"}}, Material.POTION, (short) 8267)); +723 items.add(new ItemInfo("Potion of Leaping II", new String[][] {{"poti", "leap", "ii"}, {"poti", "leap", "2"}}, Material.POTION, (short) 8235)); +724 items.add(new ItemInfo("Splash Potion of Leaping", new String[][] {{"spl", "poti", "leap"}}, Material.POTION, (short) 16395)); +725 items.add(new ItemInfo("Splash Potion of Leaping (Extended)", new String[][] {{"poti", "leap", "spl", "ext"}}, Material.POTION, (short) 16459)); +726 items.add(new ItemInfo("Splash Potion of Leaping II", new String[][] {{"poti", "leap", "spl", "2"}, {"poti", "leap", "spl", "ii"}}, Material.POTION, (short) 16427)); +727 items.add(new ItemInfo("Bat Spawn Egg", new String[][] {{"bat", "spaw", "egg"}}, Material.MONSTER_EGG, (short) 65)); +728 items.add(new ItemInfo("Witch Spawn Egg", new String[][] {{"witc", "spaw", "egg"}}, Material.MONSTER_EGG, (short) 66)); +729 items.add(new ItemInfo("Endermite Spawn Egg", new String[][] {{"mite", "end", "spaw", "egg"}}, Material.MONSTER_EGG, (short) 67)); +730 items.add(new ItemInfo("Guardian Spawn Egg", new String[][] {{"guard", "spaw", "egg"}}, Material.MONSTER_EGG, (short) 68)); +731 items.add(new ItemInfo("Rabbit Spawn Egg", new String[][] {{"rabb", "spaw", "egg"}}, Material.MONSTER_EGG, (short) 101)); +732 +733 } +734 +735 @Deprecated +736 public static ItemInfo itemById(int typeId) { +737 return itemByType(Material.getMaterial(typeId), (short) 0); +738 } 739 -740 for (ItemInfo item : items) { -741 if (itemStack.getType().equals(item.getType()) && item.isDurable()) { -742 return item; -743 } else if (itemStack.getType().equals(item.getType()) && item.getSubTypeId() == itemStack.getDurability()) { -744 return item; -745 } -746 } -747 -748 return null; -749 } -750 -751 public static ItemInfo itemByItem(ItemInfo item) { -752 for (ItemInfo i : items) { -753 if (item.equals(i)) { -754 return i; -755 } -756 } -757 return null; -758 } -759 -760 /** -761 * Gets a relevant ItemInfo by it's Material -762 * @param type of Material -763 * @return ItemInfo record found or null if none -764 */ -765 public static ItemInfo itemByType(Material type) { -766 return itemByType(type, (short) 0); -767 } -768 -769 /** -770 * Searches for an ItemInfo record by Material and SubTypeID -771 * @param type of Material -772 * @param subType to check for -773 * @return ItemInfo record found or null if none -774 */ -775 public static ItemInfo itemByType(Material type, short subType) { -776 for (ItemInfo item : items) { -777 if (item.getType() == type && item.getSubTypeId() == subType) { -778 return item; -779 } -780 } -781 return null; +740 @Deprecated +741 public static ItemInfo itemById(int typeId, short subType) { +742 return itemByType(Material.getMaterial(typeId), subType); +743 } +744 +745 /** +746 * Searchs for an ItemInfo from the given ItemStack +747 * @param itemStack to search on +748 * @return ItemInfo found, or null +749 */ +750 public static ItemInfo itemByStack(ItemStack itemStack) { +751 if (itemStack == null) { +752 return null; +753 } +754 +755 for (ItemInfo item : items) { +756 if (itemStack.getType().equals(item.getType()) && item.isDurable()) { +757 return item; +758 } else if (itemStack.getType().equals(item.getType()) && item.getSubTypeId() == itemStack.getDurability()) { +759 return item; +760 } +761 } +762 +763 return null; +764 } +765 +766 public static ItemInfo itemByItem(ItemInfo item) { +767 for (ItemInfo i : items) { +768 if (item.equals(i)) { +769 return i; +770 } +771 } +772 return null; +773 } +774 +775 /** +776 * Gets a relevant ItemInfo by it's Material +777 * @param type of Material +778 * @return ItemInfo record found or null if none +779 */ +780 public static ItemInfo itemByType(Material type) { +781 return itemByType(type, (short) 0); 782 } 783 784 /** -785 * Search for an item from a given string, useful for user input. Uses 3 different types of reg-exp searching. -786 * Checks first for an ItemID. -787 * Checks second for ItemID:SubType -788 * Last, it will run a by-name item search assuming the string is the name of an item. -789 * -790 * @param string to parse -791 * @return ItemInfo found or null -792 */ -793 public static ItemInfo itemByString(String string) { -794 -795 // int -796 Pattern pattern = Pattern.compile("(?i)^(\\d+)$"); -797 Matcher matcher = pattern.matcher(string); -798 if (matcher.find()) { -799 int id = Integer.parseInt(matcher.group(1)); -800 return itemById(id); -801 } -802 -803 // int:int -804 matcher.reset(); -805 pattern = Pattern.compile("(?i)^(\\d+):(\\d+)$"); -806 matcher = pattern.matcher(string); -807 if (matcher.find()) { -808 int id = Integer.parseInt(matcher.group(1)); -809 short type = Short.parseShort(matcher.group(2)); -810 return itemById(id, type); -811 } -812 -813 // name -814 matcher.reset(); -815 pattern = Pattern.compile("(?i)^(.*)$"); -816 matcher = pattern.matcher(string); -817 if (matcher.find()) { -818 String name = matcher.group(1); -819 return itemByName(name); -820 } -821 -822 return null; -823 } -824 -825 public static ItemInfo itemByName(ArrayList<String> search) { -826 String searchString = join(search, " "); -827 return itemByName(searchString); -828 } -829 -830 public static ItemInfo[] itemByNames(ArrayList<String> search, boolean multi) { -831 String searchString = join(search, " "); -832 return itemsByName(searchString, multi); -833 } -834 -835 /** -836 * Multi-Item return search for dumping all items with the search string to the player -837 * -838 * -839 * @param searchString to search for -840 * @param multi whether to return a list of items or just the first -841 * @return Array of items found -842 */ -843 public static ItemInfo[] itemsByName(String searchString, boolean multi) { -844 if (multi == false) { -845 return new ItemInfo[]{itemByName(searchString)}; -846 } -847 -848 ItemInfo[] itemList = new ItemInfo[]{}; +785 * Searches for an ItemInfo record by Material and SubTypeID +786 * @param type of Material +787 * @param subType to check for +788 * @return ItemInfo record found or null if none +789 */ +790 public static ItemInfo itemByType(Material type, short subType) { +791 for (ItemInfo item : items) { +792 if (item.getType() == type && item.getSubTypeId() == subType) { +793 return item; +794 } +795 } +796 return null; +797 } +798 +799 /** +800 * Search for an item from a given string, useful for user input. Uses 3 different types of reg-exp searching. +801 * Checks first for an ItemID. +802 * Checks second for ItemID:SubType +803 * Last, it will run a by-name item search assuming the string is the name of an item. +804 * +805 * @param string to parse +806 * @return ItemInfo found or null +807 */ +808 public static ItemInfo itemByString(String string) { +809 +810 // int +811 Pattern pattern = Pattern.compile("(?i)^(\\d+)$"); +812 Matcher matcher = pattern.matcher(string); +813 if (matcher.find()) { +814 int id = Integer.parseInt(matcher.group(1)); +815 return itemById(id); +816 } +817 +818 // int:int +819 matcher.reset(); +820 pattern = Pattern.compile("(?i)^(\\d+):(\\d+)$"); +821 matcher = pattern.matcher(string); +822 if (matcher.find()) { +823 int id = Integer.parseInt(matcher.group(1)); +824 short type = Short.parseShort(matcher.group(2)); +825 return itemById(id, type); +826 } +827 +828 // name +829 matcher.reset(); +830 pattern = Pattern.compile("(?i)^(.*)$"); +831 matcher = pattern.matcher(string); +832 if (matcher.find()) { +833 String name = matcher.group(1); +834 return itemByName(name); +835 } +836 +837 return null; +838 } +839 +840 public static ItemInfo itemByName(ArrayList<String> search) { +841 String searchString = join(search, " "); +842 return itemByName(searchString); +843 } +844 +845 public static ItemInfo[] itemByNames(ArrayList<String> search, boolean multi) { +846 String searchString = join(search, " "); +847 return itemsByName(searchString, multi); +848 } 849 -850 if (searchString.matches("\\d+:\\d+")) { -851 // Match on integer:short to get typeId and subTypeId -852 -853 // Retrieve/parse data -854 String[] params = searchString.split(":"); -855 int typeId = Integer.parseInt(params[0]); -856 short subTypeId = Short.parseShort(params[1]); -857 -858 // Iterate through Items -859 for (ItemInfo item : items) { -860 // Test for match -861 if (item.getId() == typeId && item.getSubTypeId() == subTypeId) { -862 itemList[0] = item; -863 break; -864 } -865 } -866 } else if (searchString.matches("\\d+")) { +850 /** +851 * Multi-Item return search for dumping all items with the search string to the player +852 * +853 * +854 * @param searchString to search for +855 * @param multi whether to return a list of items or just the first +856 * @return Array of items found +857 */ +858 public static ItemInfo[] itemsByName(String searchString, boolean multi) { +859 if (multi == false) { +860 return new ItemInfo[]{itemByName(searchString)}; +861 } +862 +863 ItemInfo[] itemList = new ItemInfo[]{}; +864 +865 if (searchString.matches("\\d+:\\d+")) { +866 // Match on integer:short to get typeId and subTypeId 867 868 // Retrieve/parse data -869 int typeId = Integer.parseInt(searchString); -870 -871 // Iterate through Items -872 int i = 0; -873 for (ItemInfo item : items) { -874 // Test for match -875 if (item.getId() == typeId) { -876 itemList[i] = item; -877 i++; -878 } -879 } -880 } else { -881 // Else this must be a string that we need to identify +869 String[] params = searchString.split(":"); +870 int typeId = Integer.parseInt(params[0]); +871 short subTypeId = Short.parseShort(params[1]); +872 +873 // Iterate through Items +874 for (ItemInfo item : items) { +875 // Test for match +876 if (item.getId() == typeId && item.getSubTypeId() == subTypeId) { +877 itemList[0] = item; +878 break; +879 } +880 } +881 } else if (searchString.matches("\\d+")) { 882 -883 // Iterate through Items -884 int i = 0; -885 for (ItemInfo item : items) { -886 // Look through each possible match criteria -887 for (String[] attributes : item.search) { -888 boolean match = false; -889 // Loop through entire criteria strings -890 for (String attribute : attributes) { -891 if (searchString.toLowerCase().contains(attribute)) { -892 match = true; -893 break; -894 } -895 } -896 // THIS was a match -897 if (match) { -898 itemList[i] = item; -899 i++; -900 } -901 } -902 } -903 } -904 -905 return itemList; -906 } -907 -908 /** -909 * Single item search function, for when we only ever want to return 1 result -910 * -911 * @param searchString to search for -912 * @return ItemInfo Object -913 */ -914 public static ItemInfo itemByName(String searchString) { -915 ItemInfo matchedItem = null; -916 int matchedItemStrength = 0; -917 int matchedValue = 0; -918 -919 if (searchString.matches("\\d+:\\d+")) { -920 // Match on integer:short to get typeId and subTypeId -921 -922 // Retrieve/parse data -923 String[] params = searchString.split(":"); -924 int typeId = Integer.parseInt(params[0]); -925 short subTypeId = Short.parseShort(params[1]); -926 -927 // Iterate through Items -928 for (ItemInfo item : items) { -929 // Test for match -930 if (item.getId() == typeId && item.getSubTypeId() == subTypeId) { -931 matchedItem = item; -932 break; -933 } -934 } -935 } else if (searchString.matches("\\d+")) { -936 // Match an integer only, assume subTypeId = 0 -937 -938 // Retrieve/parse data -939 int typeId = Integer.parseInt(searchString); -940 short subTypeId = 0; +883 // Retrieve/parse data +884 int typeId = Integer.parseInt(searchString); +885 +886 // Iterate through Items +887 int i = 0; +888 for (ItemInfo item : items) { +889 // Test for match +890 if (item.getId() == typeId) { +891 itemList[i] = item; +892 i++; +893 } +894 } +895 } else { +896 // Else this must be a string that we need to identify +897 +898 // Iterate through Items +899 int i = 0; +900 for (ItemInfo item : items) { +901 // Look through each possible match criteria +902 for (String[] attributes : item.search) { +903 boolean match = false; +904 // Loop through entire criteria strings +905 for (String attribute : attributes) { +906 if (searchString.toLowerCase().contains(attribute)) { +907 match = true; +908 break; +909 } +910 } +911 // THIS was a match +912 if (match) { +913 itemList[i] = item; +914 i++; +915 } +916 } +917 } +918 } +919 +920 return itemList; +921 } +922 +923 /** +924 * Single item search function, for when we only ever want to return 1 result +925 * +926 * @param searchString to search for +927 * @return ItemInfo Object +928 */ +929 public static ItemInfo itemByName(String searchString) { +930 ItemInfo matchedItem = null; +931 int matchedItemStrength = 0; +932 int matchedValue = 0; +933 +934 if (searchString.matches("\\d+:\\d+")) { +935 // Match on integer:short to get typeId and subTypeId +936 +937 // Retrieve/parse data +938 String[] params = searchString.split(":"); +939 int typeId = Integer.parseInt(params[0]); +940 short subTypeId = Short.parseShort(params[1]); 941 942 // Iterate through Items 943 for (ItemInfo item : items) { @@ -955,87 +955,121 @@ 947 break; 948 } 949 } -950 } else { -951 // Else this must be a string that we need to identify +950 } else if (searchString.matches("\\d+")) { +951 // Match an integer only, assume subTypeId = 0 952 -953 // Iterate through Items -954 for (ItemInfo item : items) { -955 // Look through each possible match criteria -956 for (String[] attributes : item.search) { -957 int val = 0; -958 boolean match = false; -959 // Loop through entire criteria strings -960 for (String attribute : attributes) { -961 if (searchString.toLowerCase().contains(attribute)) { -962 val += attribute.length(); -963 match = true; -964 } else { -965 match = false; -966 break; -967 } -968 } -969 -970 // THIS was a match -971 if (match) { -972 if (matchedItem == null || val > matchedValue || attributes.length > matchedItemStrength) { -973 matchedItem = item; -974 matchedValue = val; -975 matchedItemStrength = attributes.length; -976 } -977 } -978 } -979 } -980 } -981 -982 return matchedItem; -983 } -984 -985 /** -986 * Joins elements of a String array with the glue between them into a String. -987 * @param array of elements to join together -988 * @param glue what to put between each element -989 * @return Concacted Array combined with glue -990 */ -991 public static String join(String[] array, String glue) { -992 String joined = null; -993 for (String element : array) { -994 if (joined == null) { -995 joined = element; -996 } else { -997 joined += glue + element; -998 } -999 } -1000 -1001 if (joined == null) { -1002 return ""; -1003 } else { -1004 return joined; -1005 } -1006 } -1007 -1008 /** -1009 * Joins elements of a String array with the glue between them into a String. -1010 * @param list of items to join together -1011 * @param glue what to put between each element -1012 * @return Concacted Array combined with glue -1013 */ -1014 public static String join(List<String> list, String glue) { -1015 String joined = null; -1016 for (String element : list) { -1017 if (joined == null) { -1018 joined = element; -1019 } else { -1020 joined += glue + element; -1021 } -1022 } -1023 -1024 if (joined == null) { -1025 return ""; -1026 } else { -1027 return joined; -1028 } -1029 } -1030} +953 // Retrieve/parse data +954 int typeId = Integer.parseInt(searchString); +955 short subTypeId = 0; +956 +957 // Iterate through Items +958 for (ItemInfo item : items) { +959 // Test for match +960 if (item.getId() == typeId && item.getSubTypeId() == subTypeId) { +961 matchedItem = item; +962 break; +963 } +964 } +965 } else if (searchString.matches("\\w+:\\d+")) { +966 // Match on string:short to get typeId and subTypeId +967 +968 // Retrieve/parse data +969 String[] params = searchString.split(":"); +970 short subTypeId = Short.parseShort(params[1]); +971 ItemInfo namedItem = itemByName(params[0]); +972 +973 if (namedItem != null) { +974 int typeId = namedItem.getId(); +975 // Iterate through items +976 for (ItemInfo item : items) { +977 // Test for match +978 if (item.getId() == typeId && item.getSubTypeId() == subTypeId) { +979 matchedItem = item; +980 break; +981 } +982 } +983 } +984 } else { +985 // Else this must be a string that we need to identify +986 +987 // Iterate through Items +988 for (ItemInfo item : items) { +989 // Look through each possible match criteria +990 for (String[] attributes : item.search) { +991 int val = 0; +992 boolean match = false; +993 // Loop through entire criteria strings +994 for (String attribute : attributes) { +995 if (searchString.toLowerCase().contains(attribute)) { +996 val += attribute.length(); +997 match = true; +998 } else { +999 match = false; +1000 break; +1001 } +1002 } +1003 +1004 // THIS was a match +1005 if (match) { +1006 if (matchedItem == null || val > matchedValue || attributes.length > matchedItemStrength) { +1007 matchedItem = item; +1008 matchedValue = val; +1009 matchedItemStrength = attributes.length; +1010 } +1011 } +1012 } +1013 } +1014 } +1015 +1016 return matchedItem; +1017 } +1018 +1019 /** +1020 * Joins elements of a String array with the glue between them into a String. +1021 * @param array of elements to join together +1022 * @param glue what to put between each element +1023 * @return Concacted Array combined with glue +1024 */ +1025 public static String join(String[] array, String glue) { +1026 String joined = null; +1027 for (String element : array) { +1028 if (joined == null) { +1029 joined = element; +1030 } else { +1031 joined += glue + element; +1032 } +1033 } +1034 +1035 if (joined == null) { +1036 return ""; +1037 } else { +1038 return joined; +1039 } +1040 } +1041 +1042 /** +1043 * Joins elements of a String array with the glue between them into a String. +1044 * @param list of items to join together +1045 * @param glue what to put between each element +1046 * @return Concacted Array combined with glue +1047 */ +1048 public static String join(List<String> list, String glue) { +1049 String joined = null; +1050 for (String element : list) { +1051 if (joined == null) { +1052 joined = element; +1053 } else { +1054 joined += glue + element; +1055 } +1056 } +1057 +1058 if (joined == null) { +1059 return ""; +1060 } else { +1061 return joined; +1062 } +1063 } +1064}