Made Ranger pieces update to the proper color again.
This commit is contained in:
parent
3a93081315
commit
dab6ca8a5f
Binary file not shown.
@ -36,6 +36,7 @@ import org.bukkit.event.entity.EntityDamageEvent.DamageCause;
|
||||
import org.bukkit.event.entity.EntityDamageEvent.DamageModifier;
|
||||
import org.bukkit.event.entity.EntityDeathEvent;
|
||||
import org.bukkit.inventory.Inventory;
|
||||
import org.bukkit.inventory.ItemFactory;
|
||||
import org.bukkit.inventory.ItemFlag;
|
||||
import org.bukkit.inventory.ItemStack;
|
||||
import org.bukkit.inventory.meta.ItemMeta;
|
||||
@ -3238,19 +3239,22 @@ public class GenericFunctions {
|
||||
lore.add();
|
||||
lore.add();*/
|
||||
}
|
||||
if (rangerarmor && item.getType().name().contains("LEATHER")) {
|
||||
if (TwosideKeeperAPI.getItemSet(item)!=null && item.getType().name().contains("LEATHER")) {
|
||||
TwosideKeeper.log("In here",2);
|
||||
LeatherArmorMeta lm = (LeatherArmorMeta)item.getItemMeta();
|
||||
if (lm.getColor()==null) {
|
||||
if (item.getItemMeta().getLore().contains(ChatColor.GOLD+""+ChatColor.BOLD+"Jamdak Set")) {
|
||||
if (lm.getColor()==Bukkit.getServer().getItemFactory().getDefaultLeatherColor()) {
|
||||
TwosideKeeper.log("->In here",2);
|
||||
ItemSet set = TwosideKeeperAPI.getItemSet(item);
|
||||
if (set==ItemSet.JAMDAK) {
|
||||
lm.setColor(org.bukkit.Color.fromRGB(128, 64, 0));
|
||||
}
|
||||
if (item.getItemMeta().getLore().contains(ChatColor.GOLD+""+ChatColor.BOLD+"Darnys Set")) {
|
||||
if (set==ItemSet.DARNYS) {
|
||||
lm.setColor(org.bukkit.Color.fromRGB(224, 224, 224));
|
||||
}
|
||||
if (item.getItemMeta().getLore().contains(ChatColor.GOLD+""+ChatColor.BOLD+"Alikahn Set")) {
|
||||
if (set==ItemSet.ALIKAHN) {
|
||||
lm.setColor(org.bukkit.Color.fromRGB(64, 0, 64));
|
||||
}
|
||||
if (item.getItemMeta().getLore().contains(ChatColor.GOLD+""+ChatColor.BOLD+"Lorasaadi Set")) {
|
||||
if (set==ItemSet.LORASAADI) {
|
||||
lm.setColor(org.bukkit.Color.fromRGB(0, 64, 0));
|
||||
}
|
||||
}
|
||||
@ -3310,11 +3314,11 @@ public class GenericFunctions {
|
||||
public static void DealExplosionDamageToEntities(Location l, double basedmg, double range) {
|
||||
List<Entity> nearbyentities = new ArrayList<Entity>();
|
||||
//nearbyentities.addAll();
|
||||
final double rangeSquared=range*range;
|
||||
for (Entity ent: l.getWorld().getNearbyEntities(l, range, range, range)) {
|
||||
if (ent instanceof LivingEntity) {
|
||||
//double damage_mult = 2.0d/(l.distance(nearbyentities.get(i).getLocation())+1.0);
|
||||
double dmg;
|
||||
double rangeSquared=range*range;
|
||||
double damage_mult=Math.max(0d, 1 - l.distanceSquared(ent.getLocation())/rangeSquared);
|
||||
damage_mult*=TwosideKeeper.EXPLOSION_DMG_MULT;
|
||||
damage_mult*=CalculateBlastResistance((LivingEntity)ent);
|
||||
|
@ -180,7 +180,7 @@ public class Loot {
|
||||
item.setType(Material.BOW);
|
||||
}
|
||||
set_name = prefix+"Jamdak Ranger "+GenericFunctions.UserFriendlyMaterialName(item.getType());
|
||||
if (Math.random()<=0.5) {
|
||||
if (Math.random()<=0.5 && tierbonus<2) {
|
||||
tierbonus+=2;
|
||||
}
|
||||
}break;
|
||||
@ -190,7 +190,7 @@ public class Loot {
|
||||
//Convert Slayer weapon here. ???
|
||||
}
|
||||
set_name = prefix+"Darnys Ranger "+GenericFunctions.UserFriendlyMaterialName(item.getType());
|
||||
if (Math.random()<=0.5) {
|
||||
if (Math.random()<=0.5 && tierbonus<1) {
|
||||
tierbonus+=1;
|
||||
}
|
||||
}break;
|
||||
@ -200,7 +200,7 @@ public class Loot {
|
||||
//Convert Slayer weapon here. ???
|
||||
}
|
||||
set_name = prefix+"Alikahn Ranger "+GenericFunctions.UserFriendlyMaterialName(item.getType());
|
||||
if (Math.random()<=0.1) {
|
||||
if (Math.random()<=0.1 && tierbonus<1) {
|
||||
tierbonus+=1;
|
||||
}
|
||||
}break;
|
||||
@ -230,12 +230,12 @@ public class Loot {
|
||||
|
||||
private static int modifyTierBonus(ItemStack item, int tierbonus) {
|
||||
if (item.getType().name().contains("IRON")) {
|
||||
if (Math.random()<=0.5) {
|
||||
if (Math.random()<=0.5 && tierbonus<2) {
|
||||
tierbonus+=2;
|
||||
}
|
||||
} else
|
||||
if (item.getType().name().contains("DIAMOND")) {
|
||||
if (Math.random()<=0.5) {
|
||||
if (Math.random()<=0.5 && tierbonus<1) {
|
||||
tierbonus+=1;
|
||||
}
|
||||
} else
|
||||
@ -255,13 +255,13 @@ public class Loot {
|
||||
return (int)((Math.random()*4)+3);
|
||||
} else
|
||||
if (type.toString().contains("DIAMOND")) {
|
||||
return (int)((Math.random()*7)+5);
|
||||
return (int)((Math.random()*5)+4);
|
||||
} else
|
||||
if (type.toString().contains("GOLD")) {
|
||||
return (int)((Math.random()*12)+10);
|
||||
return (int)((Math.random()*6)+5);
|
||||
} else
|
||||
if (type.toString().contains("LEATHER")) {
|
||||
return (int)((Math.random()*12)+10);
|
||||
return (int)((Math.random()*7)+6);
|
||||
} else
|
||||
{
|
||||
return 5;
|
||||
|
@ -37,10 +37,10 @@ public class ShopPurchase {
|
||||
this.sell=sell;
|
||||
}
|
||||
|
||||
public String getPlayer() {
|
||||
public String getSeller() {
|
||||
return player;
|
||||
}
|
||||
public String getSeller() {
|
||||
public String getCustomer() {
|
||||
return customer;
|
||||
}
|
||||
public ItemStack getItem() {
|
||||
|
@ -1135,12 +1135,7 @@ public class TwosideKeeper extends JavaPlugin implements Listener {
|
||||
}*/
|
||||
/*Monster m = MonsterController.convertMonster((Monster)p.getWorld().spawnEntity(p.getLocation(),EntityType.ZOMBIE), MonsterDifficulty.ELITE);
|
||||
m.setHealth(m.getMaxHealth()/16d);*/
|
||||
p.getWorld().dropItemNaturally(p.getLocation(), TwosideKeeperAPI.generateMegaPiece(Material.IRON_CHESTPLATE, true, true, 5));
|
||||
p.getWorld().dropItemNaturally(p.getLocation(), TwosideKeeperAPI.generateMegaPiece(Material.IRON_CHESTPLATE, true, true, 5));
|
||||
p.getWorld().dropItemNaturally(p.getLocation(), TwosideKeeperAPI.generateMegaPiece(Material.DIAMOND_CHESTPLATE, true, true, 5));
|
||||
p.getWorld().dropItemNaturally(p.getLocation(), TwosideKeeperAPI.generateMegaPiece(Material.DIAMOND_CHESTPLATE, true, true, 5));
|
||||
p.getWorld().dropItemNaturally(p.getLocation(), TwosideKeeperAPI.generateMegaPiece(Material.GOLD_CHESTPLATE, true, true, 5));
|
||||
p.getWorld().dropItemNaturally(p.getLocation(), TwosideKeeperAPI.generateMegaPiece(Material.GOLD_CHESTPLATE, true, true, 5));
|
||||
p.getWorld().dropItemNaturally(p.getLocation(), TwosideKeeperAPI.generateMegaPiece(Material.LEATHER_CHESTPLATE, true, true, 5));
|
||||
/*p.getWorld().dropItemNaturally(p.getLocation(), UPGRADE_SHARD.getItemStack());
|
||||
ItemStack upgrade = UPGRADE_SHARD.getItemStack();
|
||||
GenericFunctions.setUpgradeShardTier(upgrade,3);
|
||||
|
@ -227,7 +227,7 @@ public class WorldShopManager {
|
||||
}
|
||||
public boolean PlayerHasPurchases(Player p) {
|
||||
for (int i=0;i<purchases.size();i++) {
|
||||
if (p.getName().equalsIgnoreCase(purchases.get(i).getPlayer())) {
|
||||
if (p.getName().equalsIgnoreCase(purchases.get(i).getSeller())) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
@ -235,7 +235,7 @@ public class WorldShopManager {
|
||||
}
|
||||
public void PlayerSendPurchases(Player p) {
|
||||
for (int i=0;i<purchases.size();i++) {
|
||||
if (p.getName().equalsIgnoreCase(purchases.get(i).getPlayer())) {
|
||||
if (p.getName().equalsIgnoreCase(purchases.get(i).getSeller())) {
|
||||
p.spigot().sendMessage(purchases.get(i).announcementString());
|
||||
purchases.remove(i);
|
||||
i--;
|
||||
@ -283,8 +283,8 @@ public class WorldShopManager {
|
||||
|
||||
for (int i=0;i<purchases.size();i++) {
|
||||
if (!purchases.get(i).getSeller().equalsIgnoreCase("admin")) {
|
||||
workable.set("player"+i, purchases.get(i).getPlayer());
|
||||
workable.set("customer"+i, purchases.get(i).getSeller());
|
||||
workable.set("player"+i, purchases.get(i).getSeller());
|
||||
workable.set("customer"+i, purchases.get(i).getCustomer());
|
||||
workable.set("item"+i, purchases.get(i).getItem());
|
||||
workable.set("money"+i, purchases.get(i).getMoney());
|
||||
workable.set("amt"+i, purchases.get(i).getAmt());
|
||||
|
Loading…
x
Reference in New Issue
Block a user