Add in an inventory refresh for using Polymorph Wands so they still

appear correctly in the client.
master_event
sigonasr2 11 years ago
parent e9c4ff2317
commit f2ef2c9c88
  1. 4
      BankEconomyMod/src/me/kaZep/Base/PlayerListener.java
  2. 2
      BankEconomyMod/src/me/kaZep/Base/RecyclingCenterNode.java
  3. 2
      BankEconomyMod/src/me/kaZep/Commands/commandBankEconomy.java

@ -1942,11 +1942,10 @@ implements Listener
}
}
private boolean isPermanentSpawn(CreatureSpawnEvent e, LivingEntity l) {
public boolean isPermanentSpawn(CreatureSpawnEvent e, LivingEntity l) {
//Will return true if it's something that is not allowed to despawn. False if we are allowed to get rid of it.
//Basically this is the control that will determine if the mob stays or goes, before further processing is done.
//If the mob is identified as a special mob...
EntityType type = l.getType();
//heightmodifier determines if it's a super tall chunk or a normal sized one.
@ -8868,6 +8867,7 @@ implements Listener
e.setCancelled(true);
}
if (e.getItemInHand().getType()==Material.getMaterial(127)) {
p.updateInventory();
e.setCancelled(true);
}
if (this.plugin.is_ItemCube(e.getItemInHand())) {

@ -20,7 +20,7 @@ public class RecyclingCenterNode {
//Store our items we can give out array along with our rare items we might potentially track.
public static int[] items = {1,3,4,5,6,12,13,14,15,17,18,20,22,23,24,25,27,28,39,31,32,33,35,37,38,39,40,41,42,44,45,46,47,48,49,50,53,54,57,58,61,65,66,67,69,70,72,76,77,78,80,81,82,84,85,86,87,88,89,91,96,98,101,102,103,106,107,108,109,111,112,113,114,116,121,122,123,126,128,130,131,133,134,135,136,138,139,143,145,146,147,148,151,152,154,155,156,157,158,256,257,258,259,260,261,262,263,264,265,266,267,268,269,270,271,272,273,274,275,276,277,278,279,280,281,282,283,284,285,286,287,288,289,290,291,292,293,294,295,296,297,298,299,300,301,302,303,304,305,306,307,308,309,310,311,312,313,314,315,316,317,318,319,320,321,322,323,324,325,326,327,328,329,330,331,332,333,334,335,336,337,338,339,340,341,342,343,344,345,346,347,348,349,350,351,352,353,354,355,356,357,358,359,360,361,362,363,364,365,366,367,368,369,370,371,372,373,374,375,376,377,378,379,380,381,382,385,386,387,388,389,390,391,392,393,394,395,396,397,398,399,400,401,402,403,404,405,406,407,408,2256,2257,2258,2259,2260,2261,2262,2263,2264,2265,2266,2267};
//Rare items can only be given out in quantities of 1. To prevent massive amounts of OP.
public static int[] rareitems = {173,263,256,257,258,265,267,306,307,308,309,417,266,283,284,285,286,314,315,316,317,322,418,57,264,276,277,278,279,310,311,312,313,419,14,15,16,21,73,56,129,41,46,57,116,122,133,130,146,151,264,266,276,277,278,279,293,310,311,312,313,368,381,406};
public static int[] rareitems = {173,263,256,257,258,265,267,306,307,308,309,417,266,283,284,285,286,314,315,316,317,322,399,418,57,264,276,277,278,279,310,311,312,313,419,14,15,16,21,73,56,129,41,46,57,116,122,133,130,146,151,264,266,276,277,278,279,293,310,311,312,313,368,381,406};
public static int[] unalloweditems = {127,7,11,9,19,32,34,59,141,142,405,26,31,51,63,64,68,71,78,90,117,118,119,127,137,140,144,383};
List<Location> locations; //List of all chest locations for this Node.
int itemslot; //Stores the current item we are on in that chest. From 0-26.

@ -1496,7 +1496,7 @@ public String convertToItemName(String val) {
for (int i=0;i<nearby.size();i++) {
if (nearby.get(i) instanceof Monster) {
LivingEntity l = (LivingEntity)nearby.get(i);
if (l.getCustomName().contains(ChatColor.DARK_PURPLE+"") && l.getCustomName().contains(ChatColor.DARK_AQUA+"")) {
if (l.getCustomName()!=null && (l.getCustomName().contains(ChatColor.GOLD+""+ChatColor.BOLD+"") || l.getCustomName().contains(ChatColor.DARK_PURPLE+"") || l.getCustomName().contains(ChatColor.DARK_AQUA+""))) {
} else {
nearby.get(i).remove();

Loading…
Cancel
Save