Fixed a Glow bug and ConcurrentModification buff removal bug that was

introduced. Continued to implement Knight features.
patch_branch
sigonasr2 8 years ago
parent 7bafd04a6e
commit f5641c7e88
  1. BIN
      TwosideKeeper.jar
  2. 2
      src/plugin.yml
  3. 94
      src/sig/plugin/TwosideKeeper/CustomDamage.java
  4. 12
      src/sig/plugin/TwosideKeeper/CustomMonster.java
  5. 3
      src/sig/plugin/TwosideKeeper/HelperStructures/ArrowBarrage.java
  6. 12
      src/sig/plugin/TwosideKeeper/HelperStructures/Channel.java
  7. 3
      src/sig/plugin/TwosideKeeper/HelperStructures/Common/BlockModifyQueue.java
  8. 13
      src/sig/plugin/TwosideKeeper/HelperStructures/Common/GenericFunctions.java
  9. 2
      src/sig/plugin/TwosideKeeper/HelperStructures/Effects/TemporaryLava.java
  10. 8
      src/sig/plugin/TwosideKeeper/HelperStructures/ItemSet.java
  11. 6
      src/sig/plugin/TwosideKeeper/HelperStructures/PlayerMode.java
  12. 7
      src/sig/plugin/TwosideKeeper/HelperStructures/Pronouns.java
  13. 11
      src/sig/plugin/TwosideKeeper/HelperStructures/Utils/EntityUtils.java
  14. 72
      src/sig/plugin/TwosideKeeper/LivingEntityStructure.java
  15. 9
      src/sig/plugin/TwosideKeeper/Monster/DarkSpider.java
  16. 6
      src/sig/plugin/TwosideKeeper/Monster/DarkSpiderMinion.java
  17. 4
      src/sig/plugin/TwosideKeeper/Monster/Dummy.java
  18. 290
      src/sig/plugin/TwosideKeeper/Monster/Knight.java
  19. 2
      src/sig/plugin/TwosideKeeper/PlayerStructure.java
  20. 77
      src/sig/plugin/TwosideKeeper/TwosideKeeper.java
  21. 6
      src/sig/plugin/TwosideKeeper/runServerHeartbeat.java
  22. 20
      src/sig/plugin/TwosideKeeper/runServerTick.java

Binary file not shown.

@ -1,6 +1,6 @@
name: TwosideKeeper
main: sig.plugin.TwosideKeeper.TwosideKeeper
version: 3.10.14
version: 3.10.15
loadbefore: [aPlugin]
commands:
money:

@ -61,6 +61,7 @@ import sig.plugin.TwosideKeeper.Events.PlayerDodgeEvent;
import sig.plugin.TwosideKeeper.HelperStructures.AdvancedTitle;
import sig.plugin.TwosideKeeper.HelperStructures.ArtifactAbility;
import sig.plugin.TwosideKeeper.HelperStructures.BowMode;
import sig.plugin.TwosideKeeper.HelperStructures.Channel;
import sig.plugin.TwosideKeeper.HelperStructures.DamageStructure;
import sig.plugin.TwosideKeeper.HelperStructures.ItemSet;
import sig.plugin.TwosideKeeper.HelperStructures.LivingEntityDifficulty;
@ -168,7 +169,7 @@ public class CustomDamage {
} else {
dmg = CalculateDamage(damage, damager, target, weapon, reason, flags);
}
dmg += CalculateBonusTrueDamage(damager);
dmg += CalculateBonusTrueDamage(damager, target, dmg);
if (damager!=null) {
TwosideKeeper.logHealth(target,target.getHealth(),dmg,damager);
}
@ -192,7 +193,8 @@ public class CustomDamage {
}
}
private static double CalculateBonusTrueDamage(Entity damager) {
private static double CalculateBonusTrueDamage(Entity damager, LivingEntity target, double dmg) {
//TwosideKeeper.log("Run here. Damage: "+dmg, 0);
if (getDamagerEntity(damager) instanceof Player) {
LivingEntity shooter = getDamagerEntity(damager);
double bonus_truedmg = 0;
@ -201,7 +203,8 @@ public class CustomDamage {
bonus_truedmg += ItemSet.HasSetBonusBasedOnSetBonusCount((Player)shooter, ItemSet.ALUSTINE, 7)?((Player)shooter).getLevel():0;
return bonus_truedmg;
} else {
return 0.0;
double bonus_truedmg = 0;
return bonus_truedmg;
}
}
@ -549,6 +552,20 @@ public class CustomDamage {
PlayerStructure pd = PlayerStructure.GetPlayerStructure(p);
pd.lasthitdesc = reason;
}
checkforDeath(damager, target, reason);
}
private static void checkforDeath(Entity damager, LivingEntity target, String reason) {
if (target instanceof Player && target.getHealth()<=0) {
//It's dead.
LivingEntity shooter = getDamagerEntity(damager);
if (shooter!=null) {
if (TwosideKeeper.custommonsters.containsKey(shooter.getUniqueId())) {
CustomMonster cm = TwosideKeeper.custommonsters.get(shooter.getUniqueId());
cm.onPlayerSlayEvent((Player)target, reason);
}
}
}
}
private static boolean isDot(String reason) {
@ -605,8 +622,10 @@ public class CustomDamage {
}
if (getDamagerEntity(damager) instanceof LivingEntity) {
LivingEntity m = getDamagerEntity(damager);
LivingEntityStructure md = LivingEntityStructure.GetLivingEntityStructure(m);
md.SetTarget(target);
if (!(getDamagerEntity(damager) instanceof Player)) {
LivingEntityStructure md = LivingEntityStructure.GetLivingEntityStructure(m);
md.SetTarget(target);
}
}
increaseStrikerSpeed(p);
healDefenderSaturation(p);
@ -651,8 +670,12 @@ public class CustomDamage {
removePermEnchantments(p,item);
}
damage += IncreaseDamageFromDarkSubmission(p, damager, damage);
damage = IncreaseDamageDealtByElites(p, damager, damage);
damage = increaseTrueDamageAmount(p, damager, damage);
damage = calculateDefenderAbsorption(p, damager, damage, reason);
damage = sendDamageToDamagePool(p, damage, reason);
@ -770,7 +793,7 @@ public class CustomDamage {
subtractWeaponDurability(p,weapon);
aPlugin.API.showDamage(target, GetHeartAmount(damage));
suppressTarget(p,weapon,target);
causeSpetralGlowAndAggro(damager,p,target);
causeSpectralGlowAndAggro(damager,p,target);
removeExperienceFromAlustineSetBonus(p);
applyLightningStriketoFoe(p,target);
pd.slayermegahit=false;
@ -854,6 +877,36 @@ public class CustomDamage {
return damage;
}
private static double IncreaseDamageFromDarkSubmission(Player p, Entity damager, double damage) {
LivingEntity shooter = getDamagerEntity(damager);
double bonusdmg = 0;
if (shooter!=null && TwosideKeeper.custommonsters.containsKey(shooter.getUniqueId())) {
CustomMonster cm = TwosideKeeper.custommonsters.get(shooter.getUniqueId());
TwosideKeeper.log("Custom Monster here. Damage: "+damage, 0);
if (cm instanceof Knight) {
TwosideKeeper.log("In here.", 0);
Knight k = (Knight)cm;
if (k.getParticipants().contains(p)) {
bonusdmg += damage*k.getDarkSubmissionMultiplier(p);
TwosideKeeper.log(">Bonus True Damage set to "+bonusdmg, 0);
}
}
}
return bonusdmg;
}
private static double increaseTrueDamageAmount(Player p, Entity damager, double dmg) {
LivingEntity shooter = getDamagerEntity(damager);
if (shooter!=null) {
if (TwosideKeeper.custommonsters.containsKey(shooter.getUniqueId())) {
CustomMonster cm = TwosideKeeper.custommonsters.get(shooter.getUniqueId());
dmg+=cm.getBasicAttackDamage().getTrueDmgComponent();
dmg+=cm.getBasicAttackDamage().getTruePctDmgComponent()*p.getMaxHealth();
}
}
return dmg;
}
private static void reduceStrengthAmountForStealthSet(Player p) {
if (ItemSet.meetsSlayerSwordConditions(ItemSet.STEALTH, 27, 3, p)) {
GenericFunctions.addStackingPotionEffect(p, PotionEffectType.INCREASE_DAMAGE, 20*60, 19,-1);
@ -1005,7 +1058,7 @@ public class CustomDamage {
private static double IncreaseDamageDealtByElites(Player p, Entity damager, double damage) {
LivingEntity shooter = getDamagerEntity(damager);
if (shooter!=null) {
if (shooter!=null && !(shooter instanceof Player)) {
LivingEntityStructure les = LivingEntityStructure.GetLivingEntityStructure(shooter);
if (les.isElite) {
for (EliteMonster bm : TwosideKeeper.elitemonsters) {
@ -1418,7 +1471,7 @@ public class CustomDamage {
}
}
private static void causeSpetralGlowAndAggro(Entity damager, Player p, LivingEntity target) {
private static void causeSpectralGlowAndAggro(Entity damager, Player p, LivingEntity target) {
if (damager instanceof SpectralArrow) {
if (target instanceof Monster) {
provokeMonster((Monster)target,p,p.getEquipment().getItemInMainHand());
@ -1717,13 +1770,15 @@ public class CustomDamage {
}
static void setAggroGlowTickTime(Monster m, int duration) {
m.addPotionEffect(new PotionEffect(PotionEffectType.GLOWING,duration,0),true);
//m.addPotionEffect(new PotionEffect(PotionEffectType.GLOWING,duration,0,true,true),true);
GenericFunctions.logAndApplyPotionEffectToEntity(PotionEffectType.GLOWING, duration, 0, m);
}
static void applyProvokeAggro(Monster m, Player p, ItemStack weapon) {
if (ArtifactAbility.containsEnchantment(ArtifactAbility.PROVOKE, weapon)) {
//This is allowed, get the level on the weapon.
setMonsterTarget(m,p);
//TwosideKeeper.log("Aggro tick time: "+(int)(GenericFunctions.getAbilityValue(ArtifactAbility.PROVOKE, weapon)*20), 0);
setAggroGlowTickTime(m,(int)(GenericFunctions.getAbilityValue(ArtifactAbility.PROVOKE, weapon)*20));
}
}
@ -1771,6 +1826,7 @@ public class CustomDamage {
static void applyDefenderAggro(Monster m, Player p) {
if (PlayerMode.isDefender(p)) {
//TwosideKeeper.log("In here.", 0);
RefreshVendettaStackTimer(p);
setMonsterTarget(m,p);
setAggroGlowTickTime(m,100);
@ -2043,7 +2099,10 @@ public class CustomDamage {
private static void refundRejuvenationCooldown(Player p) {
PlayerStructure pd = PlayerStructure.GetPlayerStructure(p);
pd.last_rejuvenate-=40;
aPlugin.API.sendCooldownPacket(p, Material.SHIELD, GenericFunctions.GetRemainingCooldownTime(p, pd.last_rejuvenate, TwosideKeeper.REJUVENATE_COOLDOWN));
int remainingtime = GenericFunctions.GetRemainingCooldownTime(p, pd.last_rejuvenate, TwosideKeeper.REJUVENATE_COOLDOWN);
if (remainingtime>0) {
aPlugin.API.sendCooldownPacket(p, Material.SHIELD, remainingtime);
}
}
private static double GetAttackRate(Entity damager) {
@ -2877,7 +2936,7 @@ public class CustomDamage {
if (PlayerMode.isRanger(p) && GenericFunctions.getBowMode(p)==BowMode.SNIPE) {
if (pd.headshotcombo<8) {pd.headshotcombo++;}
double headshotincrease = (2+(pd.headshotcombo*0.25));
double headshotincrease = (2+(pd.headshotcombo*0.125));
mult+=headshotincrease;
p.sendMessage(ChatColor.DARK_RED+"Headshot! x"+(headshotincrease)+" Damage");
if (p.hasPotionEffect(PotionEffectType.SLOW)) {
@ -2940,15 +2999,17 @@ public class CustomDamage {
}*/
if (Buff.hasBuff(target, "Poison")) {
int oldlv = Buff.getBuff(target, "Poison").getAmplifier();
long oldexpiretime = Buff.getBuff(target, "Poison").getExpireTime();
int olddur = (int)(oldexpiretime - TwosideKeeper.getServerTickTime());
SoundUtils.playLocalSound(p, Sound.ENTITY_RABBIT_ATTACK, 0.1f, 0.1f+((oldlv+1)*0.5f));
Buff.addBuff(target, "Poison", new Buff("Poison",20*20,++oldlv,Color.YELLOW,ChatColor.YELLOW+"☣",false));
Buff.addBuff(target, "Poison", new Buff("Poison",olddur,++oldlv,Color.YELLOW,ChatColor.YELLOW+"☣",false));
} else {
SoundUtils.playLocalSound(p, Sound.ENTITY_RABBIT_ATTACK, 0.1f, 0.1f);
Buff.addBuff(target, "Poison", new Buff("Poison",20*20,1,Color.YELLOW,ChatColor.YELLOW+"☣",false));
Buff.addBuff(target, "Poison", new Buff("Poison",20*15,1,Color.YELLOW,ChatColor.YELLOW+"☣",false));
}
} else {
SoundUtils.playLocalSound(p, Sound.ENTITY_RABBIT_ATTACK, 0.1f, 0.1f);
Buff.addBuff(target, "Poison", new Buff("Poison",20*20,1,Color.YELLOW,ChatColor.YELLOW+"☣",false));
Buff.addBuff(target, "Poison", new Buff("Poison",20*15,1,Color.YELLOW,ChatColor.YELLOW+"☣",false));
}
}
}
@ -3409,6 +3470,11 @@ public class CustomDamage {
break;
}
if (TwosideKeeper.custommonsters.containsKey(damager.getUniqueId())) {
CustomMonster cm = TwosideKeeper.custommonsters.get(damager.getUniqueId());
dmg += cm.getBasicAttackDamage().getDmgComponent();
}
return dmg;
}

@ -7,6 +7,7 @@ import org.bukkit.entity.Monster;
import org.bukkit.entity.Player;
import sig.plugin.TwosideKeeper.Events.EntityChannelCastEvent;
import sig.plugin.TwosideKeeper.HelperStructures.Utils.Classes.MixedDamage;
public class CustomMonster {
protected LivingEntity m;
@ -24,6 +25,10 @@ public class CustomMonster {
return !m.isDead();
}
public MixedDamage getBasicAttackDamage() {
return MixedDamage.v(0,0,0);
}
/*
public boolean hasTarget() {
return (m.getTarget()!=null)?true:false;
@ -53,6 +58,9 @@ public class CustomMonster {
}
public void onHitEvent(LivingEntity damager, double damage) {
}
public void onPlayerSlayEvent(Player p, String reason) {
}
public void cleanup() {
@ -66,4 +74,8 @@ public class CustomMonster {
public void runChannelCastEvent(EntityChannelCastEvent ev) {
}
public void onDeathEvent() {
}
}

@ -1,8 +1,11 @@
package sig.plugin.TwosideKeeper.HelperStructures;
import org.bukkit.Bukkit;
import org.bukkit.Location;
import org.bukkit.Material;
import org.bukkit.entity.Arrow;
import org.bukkit.entity.Player;
import org.bukkit.inventory.ItemStack;
import org.bukkit.potion.PotionEffectType;
import sig.plugin.TwosideKeeper.PlayerStructure;

@ -41,7 +41,7 @@ public class Channel {
LivingEntityStructure les = LivingEntityStructure.GetLivingEntityStructure(l);
les.currentChannel=this;
}
GenericFunctions.addSuppressionTime(l, duration);
GenericFunctions.addSuppressionTime(l, duration+5);
AddToStructure();
}
@ -121,6 +121,9 @@ public class Channel {
}
}
public String getSpellName() {
return channelName;
}
public LivingEntity getLivingEntity() {
return l;
@ -140,6 +143,13 @@ public class Channel {
l.setCustomNameVisible(false);
}
}
if (l instanceof Player) {
PlayerStructure pd = PlayerStructure.GetPlayerStructure((Player)l);
pd.currentChannel=null;
} else {
LivingEntityStructure les = LivingEntityStructure.GetLivingEntityStructure(l);
les.currentChannel=null;
}
EntityChannelCastEvent ev = new EntityChannelCastEvent(l,channelName);
Bukkit.getPluginManager().callEvent(ev);
return false;

@ -5,6 +5,8 @@ import java.util.List;
import org.bukkit.Material;
import org.bukkit.block.Block;
import sig.plugin.TwosideKeeper.TwosideKeeper;
public class BlockModifyQueue{
Material checktype; //The material the block should be before converting.
Material finaltype; //The material the block is converting into.
@ -34,6 +36,7 @@ public class BlockModifyQueue{
public void run() {
if ((TypeException(b) || b.getType()==checktype) && (!usedata || b.getData()==checkdata)) {
b.setType(finaltype);
//TwosideKeeper.log("Set Type from Requested "+checktype+" to "+finaltype, 0);
if (usedata) {b.setData(finaldata);}
}
}

@ -3682,7 +3682,7 @@ public class GenericFunctions {
revived=true;
if (!Buff.hasBuff(p, "COOLDOWN_UNDYING_RAGE")) {
Buff.addBuff(p, "UNKILLABLE", new Buff("Unkillable",ItemSet.getHighestTierInSet(p, ItemSet.LEGION)*20+120,0,org.bukkit.Color.PURPLE,ChatColor.YELLOW+"✩",true));
Buff.addBuff(p, "COOLDOWN_UNDYING_RAGE", new Buff("Undying Rage Cooldown",20*60,0,null,ChatColor.WHITE+"",true));
Buff.addBuff(p, "COOLDOWN_UNDYING_RAGE", new Buff("Undying Rage Cooldown",20*60,0,null,ChatColor.WHITE+"",true,true));
pd.damagepool=0;
}
}
@ -5211,6 +5211,11 @@ public class GenericFunctions {
totalpoisonstacks+=blindnesslv+1;
haspoison=true;
}
if (Buff.hasBuff(ent, "Poison")) {
int poisonlv = Buff.getBuff(ent, "Poison").getAmplifier();
totalpoisonstacks+=poisonlv;
haspoison=true;
}
if (haspoison) {
poisonlist.add(ent);
}
@ -5350,7 +5355,7 @@ public class GenericFunctions {
if (pd.lastusedbeastwithin+GetModifiedCooldown(TwosideKeeper.BEASTWITHIN_COOLDOWN,p)<=TwosideKeeper.getServerTickTime()) {
GenericFunctions.logAndApplyPotionEffectToEntity(PotionEffectType.NIGHT_VISION, 20, 1, p);
SoundUtils.playGlobalSound(p.getLocation(), Sound.ENTITY_GENERIC_DRINK, 1.0f, 1.0f);
Buff.addBuff(p, "BEASTWITHIN", new Buff("Beast Within",(ItemSet.GetItemTier(p.getEquipment().getItemInMainHand())+ItemSet.BEASTWITHIN_DURATION)*20,1,org.bukkit.Color.MAROON,"♦",true));
Buff.addBuff(p, "BEASTWITHIN", new Buff("Beast Within",(ItemSet.GetItemTier(p.getEquipment().getItemInMainHand())+ItemSet.BEASTWITHIN_DURATION)*20,1,org.bukkit.Color.MAROON,"♦",true,true));
GenericFunctions.sendActionBarMessage(p, "", true);
aPlugin.API.sendCooldownPacket(p, p.getEquipment().getItemInMainHand(), GetModifiedCooldown(TwosideKeeper.BEASTWITHIN_COOLDOWN,p));
pd.lastusedbeastwithin=TwosideKeeper.getServerTickTime();
@ -5408,7 +5413,9 @@ public class GenericFunctions {
do {
c.load();
it = l.getWorld().dropItemNaturally(l, oldMainHand);
it.setInvulnerable(true);
if (it!=null && it.isValid()) {
it.setInvulnerable(true);
}
} while (it==null || !it.isValid());
TwosideKeeper.temporary_chunks.remove(c);
c.unload();

@ -21,7 +21,7 @@ public class TemporaryLava {
if (b.getType()==Material.AIR) {
b.setType(Material.LAVA);
b.setData((byte)8);
TwosideKeeper.blockqueue.add(new BlockModifyQueue(b,Material.AIR,Material.LAVA));
//TwosideKeeper.blockqueue.add(new BlockModifyQueue(b,Material.AIR,Material.LAVA));
}
}
this.b=b;

@ -572,9 +572,9 @@ public enum ItemSet {
lore.add(ChatColor.DARK_AQUA+" 2 - "+ChatColor.WHITE+" +"+ItemSet.GetBaseAmount(set, tier, 2)+"% Debuff Resistance");
lore.add(ChatColor.DARK_AQUA+" 3 - "+ChatColor.WHITE+" +"+ItemSet.GetBaseAmount(set, tier, 3)+"% Lifesteal");
lore.add(ChatColor.DARK_AQUA+" 4 - "+ChatColor.WHITE+" +"+ItemSet.GetBaseAmount(set, tier, 4)+" Max Health");
lore.add(ChatColor.DARK_AQUA+" 5 - "+ABILITY_LABEL+" Powered Mock"+ABILITY_LABEL_END);
lore.add(ChatColor.WHITE+" +50% Armor Penetration");
lore.add(ChatColor.WHITE+" +15 Damage");
lore.add(ChatColor.DARK_AQUA+" 5 - +50% Armor Penetration");
lore.add(ChatColor.WHITE+" +15 Damage");
lore.add(ChatColor.WHITE+" "+ABILITY_LABEL+" Powered Mock"+ABILITY_LABEL_END);
lore.add(ChatColor.GRAY+" Mock cooldown decreases from");
lore.add(ChatColor.GRAY+" 20 -> 10 seconds, making it stackable.");
lore.add(ChatColor.GRAY+" All Lifesteal Stacks and Weapon Charges");
@ -849,7 +849,7 @@ public enum ItemSet {
lore.add(ChatColor.GOLD+""+ChatColor.ITALIC+"Set Bonus:");
lore.add(ChatColor.DARK_AQUA+" 2 - "+ChatColor.WHITE+" +"+ItemSet.GetBaseAmount(set, tier, 2)+"% Lifesteal");
lore.add(ChatColor.DARK_AQUA+" 3 - "+ChatColor.WHITE+" +"+ItemSet.GetBaseAmount(set, tier, 3)+"% Damage per 10 Weapon Charges");
lore.add(ChatColor.AQUA+" ( Max. 200 stacks - "+(ItemSet.GetBaseAmount(set, tier, 3)*200)+"% Damage )");
lore.add(ChatColor.AQUA+" ( Max. 200 stacks - "+(ItemSet.GetBaseAmount(set, tier, 3)*20)+"% Damage )");
lore.add(ChatColor.DARK_AQUA+" 4 - "+ChatColor.WHITE+" +"+ItemSet.GetBaseAmount(set, tier, 4)+"% Damage per 100 Damage Pool Stacks");
lore.add(ChatColor.DARK_AQUA+" 5 - "+ABILITY_LABEL+" Undying Rage"+ABILITY_LABEL_END);
lore.add(ChatColor.GRAY+" When taking fatal damage, removes all Damage");

@ -32,11 +32,11 @@ public enum PlayerMode {
+ ChatColor.WHITE+"- "+ChatColor.BOLD+"Close Range Mode (Default):"+ChatColor.RESET+ChatColor.WHITE+" \n"
+ ChatColor.GRAY+" You gain the ability to deal headshots from any distance, even directly onto an enemy's face. Each kill made in this mode gives you 100% dodge chance for the next hit taken. You can tumble and gain invulnerability for 1 second by dropping your bow. Sneak while dropping it to tumble backwards.\n"
+ ChatColor.WHITE+"- "+ChatColor.BOLD+"Sniping Mode:"+ChatColor.RESET+ChatColor.WHITE+" \n"
+ ChatColor.GRAY+" Headshot collision area increases by x3. Headshots will deal an extra x0.25 damage for each headshot landed, up to a cap of 8 stacks. Each stack also increases your Slowness level by 1. You lose 10% dodge chance per Slowness stack, but gain one Resistance level and 10% critical chance per Slowness stack.\n"
+ ChatColor.GRAY+" Headshot collision area increases by x3. Headshots will deal an extra x0.125 damage for each headshot landed, up to a cap of 8 stacks. Each stack also increases your Slowness level by 1. You lose 10% dodge chance per Slowness stack, but gain one Resistance level and 10% critical chance per Slowness stack.\n"
+ ChatColor.WHITE+" Arrows are lightning-fast in Sniping Mode.\n"
+ ChatColor.GRAY+" Press the drop key in Sniping Mode to unleash 26 piercing arrows rapidly against your enemies.\n\n"
+ ChatColor.WHITE+"- "+ChatColor.BOLD+"Debilitation Mode:"+ChatColor.RESET+ChatColor.WHITE+" \n"
+ ChatColor.GRAY+" Adds a stack of Poison when hitting non-poisoned targets (20 second duration). Hitting mobs in this mode refreshes the duration of the poison stacks. Headshots made in this mode will increase the level of Poison on the mob, making the mob more and more vulnerable.\n"
+ ChatColor.GRAY+" Adds a stack of Poison when hitting non-poisoned targets (15 second duration). Headshots made in this mode will increase the level of Poison on the mob, making the mob more and more vulnerable.\n"
+ ChatColor.WHITE+" Press the drop key in Debilitation Mode when at least 1 poisoned target is nearby. Deals (Poison Level x 10) True Damage and Slows all targets the same level as the number of poison stacks applied to nearby targets for 15 seconds, and grants 4 Absorption health (2 hearts) to the Ranger per poison stack. Refreshes Poison duration on all nearby poisoned targets.\n"),
DEFENDER(ChatColor.GRAY,"D","Defender",
ChatColor.GRAY+""+ChatColor.BOLD+"Defender mode Perks: "+ChatColor.RESET+"\n"
@ -63,7 +63,7 @@ public enum PlayerMode {
+ ChatColor.WHITE+"->Barbarians deal 20% more damage for every 20% of an enemy's missing health.\n"
+ ChatColor.GRAY+"->Barbarians gain Bonus Lifesteal stacks as they hit enemies. Each stack increases Lifesteal by 1%, up to a cap of 100% extra Lifesteal. The stacks refresh every hit, but wear off after 5 seconds.\n"
+ ChatColor.WHITE+"->Barbarians do not instantly take full damage when hit. Instead, the HP is stored in a 'Damage Pool' and distributed every second.\n"
+ ChatColor.GRAY+"->If Barbarians have points in their 'Damage Pool', they will take up to 15 damage (+1% of their damage pool) every second. The amount taken goes down by wearing Barbarian gear.\n"
+ ChatColor.GRAY+"->If Barbarians have points in their 'Damage Pool', they will take up to 15 damage (+3% of their damage pool) every second. The amount taken goes down by wearing Barbarian gear.\n"
+ ChatColor.WHITE+"->When a monster is killed by a Barbarian, the amount of remaining damage in their Damage Pool is divided by 4.\n"
+ ChatColor.GRAY+"->Extra health from Lifestealing that is not used for healing your health will heal up your Damage Pool instead."
+ ChatColor.WHITE+"->Barbarians automatically consume Rotten Flesh and Spider Eyes that are picked up. Each one heals for 1% of their health. Rotten Flesh and Spider Eyes in a Barbarian's inventory will automatically be consumed as the Barbarian gets hungry.\n"

@ -240,6 +240,13 @@ public class Pronouns {
"fought until the very end of their life. But it was not enough.",
};
}
case 19:{
pronouns = new String[]{
"pulverized into Darkness...",
"did not time their jump properly, submitting to Darkness.",
"got slammed into the earth by Darkness.",
};
}
}
return pronouns[(int)(Math.random()*pronouns.length)];
}

@ -27,6 +27,7 @@ import sig.plugin.TwosideKeeper.TwosideKeeper;
import sig.plugin.TwosideKeeper.HelperStructures.CloudRunnable;
import sig.plugin.TwosideKeeper.HelperStructures.LivingEntityDifficulty;
import sig.plugin.TwosideKeeper.HelperStructures.Common.GenericFunctions;
import sig.plugin.TwosideKeeper.HelperStructures.Utils.Classes.ColoredParticle;
public class EntityUtils {
final public static BlockFace[] faces = new BlockFace[]{BlockFace.EAST,BlockFace.SOUTH_EAST,BlockFace.SOUTH,
@ -94,12 +95,18 @@ public class EntityUtils {
public static void createPotionEffectSwirls(LivingEntity l, Color col, int delay) {
Bukkit.getScheduler().runTaskLater(TwosideKeeper.plugin, ()->{
AreaEffectCloud aec = (AreaEffectCloud)l.getWorld().spawnEntity(l.getLocation(), EntityType.AREA_EFFECT_CLOUD);
/*AreaEffectCloud aec = (AreaEffectCloud)l.getWorld().spawnEntity(l.getLocation(), EntityType.AREA_EFFECT_CLOUD);
aec.setColor(col);
aec.setDuration(5);
aec.setRadiusOnUse(0.1f);
aec.setRadiusPerTick(0f);
aec.setRadius(0.1f);
aec.setRadius(0.1f);*/
Location origloc = l.getLocation();
for (int i=0;i<5;i++) {
ColoredParticle.MOB_SPELL.send(origloc.clone().add(Math.random()*2-1,
Math.random()*2-1,
Math.random()*2-1), 10, col.getRed(), col.getGreen(), col.getBlue());
}
},delay);
}

@ -193,43 +193,45 @@ public class LivingEntityStructure {
//Updates the glow color for all players. We base it on default statuses here. CALL THIS INSTEAD OF
// SETTING THE GLOW DIRECTLY ANYMORE!
for (Player p : Bukkit.getOnlinePlayers()) {
if (GenericFunctions.isSuppressed(m)) {
setGlow(p,GlowAPI.Color.BLACK);
} else
if (getElite()) {
boolean handled=false;
for (EliteMonster em : TwosideKeeper.elitemonsters) {
if (em.getMonster().equals(m)) {
setGlow(p,em.getGlow());
handled=true;
if (p!=null && p.isValid() && !p.isDead()) {
if (GenericFunctions.isSuppressed(m)) {
setGlow(p,GlowAPI.Color.BLACK);
} else
if (getElite()) {
boolean handled=false;
for (EliteMonster em : TwosideKeeper.elitemonsters) {
if (em.getMonster().equals(m)) {
setGlow(p,em.getGlow());
handled=true;
}
}
if (!handled) {
setGlow(p,GlowAPI.Color.DARK_PURPLE);
}
} else
if (getLeader() || (m instanceof Monster && GenericFunctions.isBossMonster((Monster)m))) {
setGlow(p,GlowAPI.Color.DARK_RED);
} else
if (GenericFunctions.isIsolatedTarget(m, p)) {
setGlow(p,GlowAPI.Color.WHITE);
}
if (!handled) {
setGlow(p,GlowAPI.Color.DARK_PURPLE);
if (Knight.isKnight(m)) {
setGlow(p,GlowAPI.Color.AQUA);
}
} else
if (getLeader() || (m instanceof Monster && GenericFunctions.isBossMonster((Monster)m))) {
setGlow(p,GlowAPI.Color.DARK_RED);
} else
if (GenericFunctions.isIsolatedTarget(m, p)) {
setGlow(p,GlowAPI.Color.WHITE);
}
if (Knight.isKnight(m)) {
setGlow(p,GlowAPI.Color.AQUA);
}
else {
//No glow.
//setGlow(p,null);
if (glowcolorlist.containsKey(p.getUniqueId())) {
GlowAPI.setGlowing(m, null, p);
glowcolorlist.remove(p.getUniqueId());
else {
//No glow.
//setGlow(p,null);
if (glowcolorlist.containsKey(p.getUniqueId())) {
GlowAPI.setGlowing(m, null, p);
glowcolorlist.remove(p.getUniqueId());
}
}
if (!GlowAPI.isGlowing(m, p) && glowcolorlist.containsKey(p.getUniqueId())) {
GlowAPI.setGlowing(m, glowcolorlist.get(p.getUniqueId()), p);
} else
if (GlowAPI.isGlowing(m, p) && (p==null || !glowcolorlist.get(p.getUniqueId()).equals(GlowAPI.getGlowColor(m, p)))) {
GlowAPI.setGlowing(m, glowcolorlist.get(p.getUniqueId()), p);
}
}
if (!GlowAPI.isGlowing(m, p) && glowcolorlist.containsKey(p.getUniqueId())) {
GlowAPI.setGlowing(m, glowcolorlist.get(p.getUniqueId()), p);
} else
if (GlowAPI.isGlowing(m, p) && (p==null || !glowcolorlist.get(p.getUniqueId()).equals(GlowAPI.getGlowColor(m, p)))) {
GlowAPI.setGlowing(m, glowcolorlist.get(p.getUniqueId()), p);
}
}
}
@ -313,4 +315,8 @@ public class LivingEntityStructure {
LivingEntityStructure les = LivingEntityStructure.GetLivingEntityStructure(l);
les.prefix = barString;
}
public static String getChannelingBar(LivingEntity l) {
LivingEntityStructure les = LivingEntityStructure.GetLivingEntityStructure(l);
return les.prefix;
}
}

@ -38,6 +38,7 @@ public class DarkSpider extends CustomMonster{
List<LivingEntity> temp_spiders = new ArrayList<LivingEntity>();
final Spell SPIDERSUMMON = new Spell("Summon Spider",new int[]{100,60,40},new int[]{600,500,400});
final Spell ULTRABURST = new Spell("UltraBurst",new int[]{80,80,80},new int[]{1200,900,800}, new MixedDamage[]{MixedDamage.v(200),MixedDamage.v(1000),MixedDamage.v(50,0.95)});
MixedDamage[] BASIC_ATTACK_DAMAGE = new MixedDamage[]{MixedDamage.v(20),MixedDamage.v(40),MixedDamage.v(40, 0.01)};
int randomness = 16;
@ -88,7 +89,7 @@ public class DarkSpider extends CustomMonster{
m.getWorld().spawnParticle(Particle.EXPLOSION_HUGE, m.getLocation(), 2);
SoundUtils.playGlobalSound(m.getLocation(), Sound.ENTITY_GENERIC_EXPLODE, 1.0f, 0.7f);
DealSpellDamageToNearbyPlayers(ULTRABURST,50,true,false,5);
DealSpellDamageToNearbyPlayers(ULTRABURST,50,true,false,3);
m.remove();
}, 40);
}
@ -112,6 +113,10 @@ public class DarkSpider extends CustomMonster{
temp_spiders.add(s);
return dsm;
}
public MixedDamage getBasicAttackDamage() {
return BASIC_ATTACK_DAMAGE[getDifficultySlot()];
}
protected void CastSpell(Spell spell) {
if (hasValidKnight() &&
@ -136,7 +141,7 @@ public class DarkSpider extends CustomMonster{
}
public static boolean isDarkSpider(LivingEntity m) {
return (m instanceof Spider) &&
return (m instanceof Spider && !(m instanceof CaveSpider)) &&
m.getMaxHealth()==100000 &&
MonsterController.getLivingEntityDifficulty(m)==LivingEntityDifficulty.NORMAL;
}

@ -11,8 +11,10 @@ import sig.plugin.TwosideKeeper.LivingEntityStructure;
import sig.plugin.TwosideKeeper.MonsterController;
import sig.plugin.TwosideKeeper.HelperStructures.LivingEntityDifficulty;
import sig.plugin.TwosideKeeper.HelperStructures.Spell;
import sig.plugin.TwosideKeeper.HelperStructures.Utils.Classes.MixedDamage;
public class DarkSpiderMinion extends DarkSpider{
MixedDamage[] BASIC_ATTACK_DAMAGE = new MixedDamage[]{MixedDamage.v(40),MixedDamage.v(80),MixedDamage.v(80, 0.02)};
public DarkSpiderMinion(LivingEntity m) {
super(m);
@ -28,6 +30,10 @@ public class DarkSpiderMinion extends DarkSpider{
}
}
public MixedDamage getBasicAttackDamage() {
return BASIC_ATTACK_DAMAGE[getDifficultySlot()];
}
public static boolean isDarkSpiderMinion(LivingEntity m) {
return (m instanceof CaveSpider) &&
(m.getMaxHealth()==MINION_HEALTH[0] ||

@ -106,5 +106,9 @@ public class Dummy extends CustomMonster{
lastHitTime=TwosideKeeper.getServerTickTime();
numbOfHits++;
dmgdealt+=dmg;
Bukkit.getScheduler().runTaskLater(TwosideKeeper.plugin, ()->{
m.setVelocity(new Vector(0,0,0));
}, 1);
}
}

@ -11,6 +11,7 @@ import org.bukkit.Location;
import org.bukkit.Material;
import org.bukkit.Particle;
import org.bukkit.Sound;
import org.bukkit.attribute.Attribute;
import org.bukkit.block.BlockFace;
import org.bukkit.boss.BarColor;
import org.bukkit.boss.BarFlag;
@ -25,14 +26,19 @@ import org.bukkit.entity.Skeleton;
import org.bukkit.entity.Skeleton.SkeletonType;
import org.inventivetalent.glow.GlowAPI.Color;
import org.bukkit.entity.Spider;
import org.bukkit.inventory.Inventory;
import org.bukkit.inventory.ItemStack;
import org.bukkit.potion.PotionEffect;
import org.bukkit.potion.PotionEffectType;
import org.bukkit.util.Vector;
import sig.plugin.TwosideKeeper.Buff;
import sig.plugin.TwosideKeeper.ChargeZombie;
import sig.plugin.TwosideKeeper.CustomDamage;
import sig.plugin.TwosideKeeper.CustomMonster;
import sig.plugin.TwosideKeeper.LivingEntityStructure;
import sig.plugin.TwosideKeeper.MonsterController;
import sig.plugin.TwosideKeeper.PlayerStructure;
import sig.plugin.TwosideKeeper.TwosideKeeper;
import sig.plugin.TwosideKeeper.Events.EntityChannelCastEvent;
import sig.plugin.TwosideKeeper.HelperStructures.Channel;
@ -54,17 +60,25 @@ public class Knight extends CustomMonster{
protected List<Player> participantlist = new ArrayList<Player>();
protected HashMap<String,Double> dpslist = new HashMap<String,Double>();
BossBar healthbar;
BossBar shieldbar;
long lasthit;
boolean startedfight=false;
boolean isFlying=false;
private long stuckTimer=0;
int scroll=0;
private Location lastLoc = null;
Location lastlandedloc = null;
final static double[] SHIELD_AMT = new double[]{1800,4700,16000};
final static int[] ASSASSINATE_COOLDOWN = new int[]{320,280,240};
long lastusedassassinate = TwosideKeeper.getServerTickTime();
final Spell DARKSLASH = new Spell("Dark Slash",new int[]{60,40,40},new int[]{400,300,200},new MixedDamage[]{MixedDamage.v(150),MixedDamage.v(300),MixedDamage.v(300,0.1)});
final Spell LINEDRIVE = new Spell("Line Drive",new int[]{20,10,10},new int[]{800,700,600},new MixedDamage[]{MixedDamage.v(200),MixedDamage.v(400),MixedDamage.v(400, 0.2)});
MixedDamage[] BASIC_ATTACK_DAMAGE = new MixedDamage[]{MixedDamage.v(200),MixedDamage.v(400),MixedDamage.v(400, 0.2)};
final Spell DARKCLEANSE = new Spell("Dark Cleanse",new int[]{200,240,300},new int[]{1500,1200,1200},new MixedDamage[]{MixedDamage.v(100),MixedDamage.v(300),MixedDamage.v(500, 0.3)});
long lastusedgrandslam = TwosideKeeper.getServerTickTime();
final static int[] GRANDSLAM_COOLDOWN = new int[]{900,700,600};
MixedDamage[] GRANDSLAM_DAMAGE = new MixedDamage[]{MixedDamage.v(450),MixedDamage.v(700),MixedDamage.v(700, 0.55)};
int randomness = 20;
@ -86,11 +100,13 @@ public class Knight extends CustomMonster{
}break;
}
m.setHealth(m.getMaxHealth());
m.getAttribute(Attribute.GENERIC_MOVEMENT_SPEED).setBaseValue(0.31f);
relinkToSpider();
m.setAI(false);
createBossHealthbar();
//GenericFunctions.setGlowing(m, Color.AQUA);
setupDarkSword();
GenericFunctions.logAndRemovePotionEffectFromEntity(PotionEffectType.INVISIBILITY, m);
}
public void runTick() {
@ -107,6 +123,28 @@ public class Knight extends CustomMonster{
performSpells();
}
public void onPlayerSlayEvent(Player p, String reason) {
if (reason.equalsIgnoreCase("Line Drive Knight")) {
changeAggroToRandomNewTarget();
attemptSpellCast(LINEDRIVE);
SoundUtils.playGlobalSound(m.getLocation(), Sound.UI_BUTTON_CLICK, 1.0f, 0.9f);
}
}
public double getDarkSubmissionMultiplier(Player p) {
double mult = 0.0;
if (Buff.hasBuff(p, "DARKSUBMISSION")) {
Buff b = Buff.getBuff(p, "DARKSUBMISSION");
mult += 0.01 * b.getAmplifier();
}
return mult;
}
public boolean isOnGround(Player p) {
return (p.getLocation().getBlock().getRelative(BlockFace.DOWN).getType()!=Material.AIR &&
!p.getLocation().getBlock().getRelative(BlockFace.DOWN).isLiquid());
}
public void runChannelCastEvent(EntityChannelCastEvent ev) {
switch (ev.getAbilityName()) {
case "Dark Slash":{
@ -124,37 +162,114 @@ public class Knight extends CustomMonster{
DARKSLASH.setLastCastedTime(TwosideKeeper.getServerTickTime());
}break;
case "Line Drive":{
m.setVelocity(new Vector(0,0.6,0));
m.setVelocity(new Vector(0,0.15,0));
Bukkit.getScheduler().runTaskLater(TwosideKeeper.plugin, ()->{
m.setVelocity(m.getLocation().getDirection().multiply(8));
int range = 8;
m.setVelocity(m.getLocation().getDirection().multiply(6));
int range = 6;
double xspd = m.getLocation().getDirection().getX()*2;
double zspd = m.getLocation().getDirection().getZ()*2;
for (int i=0;i<range;i++) {
Location particlepos = m.getLocation().add(i*xspd,0,i*zspd);
for (int j=0;j<50;j++) {
particlepos.add(j*(xspd/50),0,j*(zspd/50));
aPlugin.API.displayEndRodParticle(particlepos.add(0,-0.5,0), 0, 0, 0, 0, 1);
}
Location newpos = m.getLocation().add(i*xspd,0,i*zspd);
if (!BlockUtils.isPassThrough(newpos)) {
break;
}
Bukkit.getScheduler().runTaskLater(TwosideKeeper.plugin,
()->{
()->{
MixedDamage dmg = LINEDRIVE.getDamageValues()[getDifficultySlot()];
List<Player> players = GenericFunctions.DealDamageToNearbyPlayers(newpos, dmg.getDmgComponent(), 2, true, true, 0.4d, m, "Line Drive", false, false);
if (dmg.getTruePctDmgComponent()>0) {GenericFunctions.DealDamageToNearbyPlayers(newpos, dmg.getTruePctDmgComponent(), 2, true, true, 0.4d, m, "Line Drive", false, true);}
if (dmg.getTrueDmgComponent()>0) {GenericFunctions.DealDamageToNearbyPlayers(newpos, dmg.getTrueDmgComponent(), 2, true, true, 0.4d, m, "Line Drive", true, false);}
for (Player p : players) {
double missinghp=p.getMaxHealth()-p.getHealth();
switch (getDifficultySlot()) {
case 0:{
CustomDamage.ApplyDamage(missinghp*0.15, m, p, null, "Line Drive Knight", CustomDamage.IGNOREDODGE|CustomDamage.IGNORE_DAMAGE_TICK);
}break;
case 1:{
CustomDamage.ApplyDamage(missinghp*0.25, m, p, null, "Line Drive Knight", CustomDamage.IGNOREDODGE|CustomDamage.IGNORE_DAMAGE_TICK);
}break;
case 2:{
CustomDamage.ApplyDamage(missinghp*0.3, m, p, null, "Line Drive Knight", CustomDamage.IGNOREDODGE|CustomDamage.IGNORE_DAMAGE_TICK);
}break;
}
},2);
}
},2);
}
}, 4);
LINEDRIVE.setLastCastedTime(TwosideKeeper.getServerTickTime());
}break;
case "Dark Cleanse":{
double shieldremaining = CustomDamage.getAbsorptionHearts(m);
if (shieldbar!=null) {
shieldbar.removeAll();
shieldbar=null;
}
if (shieldremaining>0) {
//Failed to clear the shield.
removeAllBuffsFromPlayers();
MixedDamage dmgvalues = DARKCLEANSE.getDamageValues()[getDifficultySlot()];
GenericFunctions.DealDamageToNearbyPlayers(m.getLocation(), dmgvalues.getDmgComponent(), 50, false, false, 0, m, "Dark Cleanse Attack", false, false);
if (dmgvalues.getTruePctDmgComponent()>0) {GenericFunctions.DealDamageToNearbyPlayers(m.getLocation(), dmgvalues.getTruePctDmgComponent(), 50, false, false, 0, m, "Dark Cleanse Attack", false, true);}
if (dmgvalues.getTrueDmgComponent()>0) {GenericFunctions.DealDamageToNearbyPlayers(m.getLocation(), dmgvalues.getTrueDmgComponent(), 50, false, false, 0, m, "Dark Cleanse Attack", true, false);}
Buff.addBuff(m, "DARKSUBMISSION", new Buff("Dark Submission",20*20,10,org.bukkit.Color.BLACK,ChatColor.BLACK+""+ChatColor.MAGIC+"☁"+ChatColor.RESET,false), true);
announceMessageToParticipants(ChatColor.RED+"The "+GenericFunctions.getDisplayName(m)+ChatColor.RESET+""+ChatColor.RED+" screams "+ChatColor.BOLD+"\"SUBMIT TO DARKNESS\"!");
for (Player p : participantlist) {
GenericFunctions.logAndApplyPotionEffectToEntity(PotionEffectType.BLINDNESS, 20*3, 1, p, true);
}
for (int i=0;i<3;i++) {
Bukkit.getScheduler().runTaskLater(TwosideKeeper.plugin, ()->{
SoundUtils.playGlobalSound(m.getLocation(), Sound.ENTITY_WITCH_AMBIENT, 1.0f, 0.6f);
}, i*3);
}
}
CustomDamage.setAbsorptionHearts(m, 0);
DARKCLEANSE.setLastCastedTime(TwosideKeeper.getServerTickTime());
}break;
}
}
protected void CastSpell(Spell spell) {
private void announceMessageToParticipants(String msg) {
for (Player p : participantlist) {
p.sendMessage(msg);
}
}
private void removeAllBuffsFromPlayers() {
for (Player p : participantlist) {
for (PotionEffect pe : p.getActivePotionEffects()) {
if (!GenericFunctions.isBadEffect(pe.getType())) {
GenericFunctions.logAndRemovePotionEffectFromEntity(pe.getType(), p);
}
}
}
for (String s : Buff.getBuffData(m).keySet()) {
Buff b = Buff.getBuff(m, s);
if (b!=null && b.hasBuff(m, s) && b.isGoodBuff()) {
Bukkit.getScheduler().runTaskLater(TwosideKeeper.plugin, ()->{
Buff.removeBuff(m, s);
}, 1);
}
}
}
protected boolean attemptSpellCast(Spell spell) {
if (cooldownIsAvailable(spell.getLastCastedTime(),spell)) {
//Face target.
FaceTarget(m);
Channel.createNewChannel(m, spell.getName(), spell.getCastTimes()[getDifficultySlot()]);
Bukkit.getScheduler().runTaskLater(TwosideKeeper.plugin, ()->{FaceTarget(m);}, 5);
return true;
}
return false;
}
public MixedDamage getBasicAttackDamage() {
return BASIC_ATTACK_DAMAGE[getDifficultySlot()];
}
private void FaceTarget(LivingEntity m) {
@ -172,8 +287,16 @@ public class Knight extends CustomMonster{
private void performSpells() {
final Runnable[] actions = new Runnable[]{
()->{performAssassinate();},
()->{CastSpell(DARKSLASH);},
()->{changeAggroToRandomNewTarget();CastSpell(LINEDRIVE);}};
()->{attemptSpellCast(DARKSLASH);},
()->{
if (attemptSpellCast(LINEDRIVE)) {changeAggroToRandomNewTarget();
SoundUtils.playGlobalSound(m.getLocation(), Sound.UI_BUTTON_CLICK, 1.0f, 0.9f);}},
()->{
if (attemptSpellCast(DARKCLEANSE)) {
CustomDamage.setAbsorptionHearts(m, (float)SHIELD_AMT[getDifficultySlot()]);}},
()->{
performGrandSlam();}
};
if (canCastSpells()) {
for (Runnable r : actions) {
if (Math.random()<=1d/actions.length) {
@ -184,13 +307,72 @@ public class Knight extends CustomMonster{
}
}
private void performGrandSlam() {
isFlying=true;
lastlandedloc=m.getLocation().clone();
Bukkit.getScheduler().scheduleSyncDelayedTask(TwosideKeeper.plugin, new Runnable() {
public void run() {
m.addPotionEffect(new PotionEffect(PotionEffectType.LEVITATION,Integer.MAX_VALUE,60));
}
},8);
m.addPotionEffect(new PotionEffect(PotionEffectType.LEVITATION,Integer.MAX_VALUE,20));
for (Player p : participantlist) {
PlayerStructure pd = PlayerStructure.GetPlayerStructure(p);
pd.customtitle.modifyLargeCenterTitle(ChatColor.RED+"WARNING!", 20);
}
Bukkit.getScheduler().runTaskLater(TwosideKeeper.plugin,()->{
for (int i=0;i<3;i++) {
Bukkit.getScheduler().runTaskLater(TwosideKeeper.plugin, ()->{
SoundUtils.playGlobalSound(m.getLocation(), Sound.ENTITY_WITCH_AMBIENT, 1.0f, 0.6f);
}, i*3);
}
announceMessageToParticipants(ChatColor.YELLOW+""+ChatColor.ITALIC+"\"Hehe, I'm going to "+ChatColor.RESET+""+ChatColor.DARK_RED+""+ChatColor.BOLD+"CRUSH YOU!"+ChatColor.RESET+""+ChatColor.YELLOW+""+ChatColor.ITALIC+"\"");
//SoundUtils.playGlobalSound(loc,Sound.BLOCK_PORTAL_TRIGGER, 0.2f, 2.0f);
SoundUtils.playLocalGlobalSound(Sound.BLOCK_PORTAL_TRIGGER, 0.2f, 2.0f);
},40);
Bukkit.getScheduler().runTaskLater(TwosideKeeper.plugin,()->{
for (Player p : participantlist) {
GenericFunctions.logAndApplyPotionEffectToEntity(PotionEffectType.BLINDNESS, 20, 0, p, true);
}
SoundUtils.playLocalGlobalSound(Sound.ENTITY_GENERIC_EXTINGUISH_FIRE, 1.0f, 0.5f);
},80);
Bukkit.getScheduler().runTaskLater(TwosideKeeper.plugin,()->{
for (Player p : participantlist) {
GenericFunctions.logAndApplyPotionEffectToEntity(PotionEffectType.NIGHT_VISION, 10, 0, p, true);
}
SoundUtils.playLocalGlobalSound(Sound.ENTITY_GENERIC_EXTINGUISH_FIRE, 1.0f, 0.5f);
},90);
Bukkit.getScheduler().runTaskLater(TwosideKeeper.plugin,()->{
isFlying=false;
GenericFunctions.logAndRemovePotionEffectFromEntity(PotionEffectType.LEVITATION, m);
m.teleport(lastlandedloc);
for (int i=0;i<5;i++) {
Bukkit.getScheduler().runTaskLater(TwosideKeeper.plugin, ()->{
//SoundUtils.playGlobalSound(m.getLocation(), Sound.ENTITY_WITCH_AMBIENT, 1.0f, 0.6f);
SoundUtils.playLocalGlobalSound(Sound.ENTITY_GENERIC_EXPLODE, (float)(Math.random()*0.5+0.5), (float)(0.8+Math.random()*0.2));
}, i*4);
}
for (Player p : participantlist) {
//if (p.isOnGround() || !(p.getLocation().getBlock().isLiquid() || p.getLocation().getBlock().getType()==Material.AIR)) {
if (isOnGround(p)) {
MixedDamage dmg = GRANDSLAM_DAMAGE[getDifficultySlot()];
CustomDamage.ApplyDamage(dmg.getDmgComponent(), m, p, null, "Grand Slam",CustomDamage.IGNORE_DAMAGE_TICK|CustomDamage.IGNOREDODGE);
if (dmg.getTruePctDmgComponent()>0) {CustomDamage.ApplyDamage(dmg.getTruePctDmgComponent()*p.getMaxHealth(), m, p, null, "Grand Slam",CustomDamage.IGNORE_DAMAGE_TICK|CustomDamage.IGNOREDODGE|CustomDamage.TRUEDMG);}
if (dmg.getTrueDmgComponent()>0) {CustomDamage.ApplyDamage(dmg.getTrueDmgComponent()*p.getMaxHealth(), m, p, null, "Grand Slam",CustomDamage.IGNORE_DAMAGE_TICK|CustomDamage.IGNOREDODGE|CustomDamage.TRUEDMG);}
}
}
},100);
lastusedgrandslam = TwosideKeeper.getServerTickTime();
}
private void performAssassinate() {
if (lastusedassassinate+ASSASSINATE_COOLDOWN[getDifficultySlot()]<=TwosideKeeper.getServerTickTime()) {
lastusedassassinate=TwosideKeeper.getServerTickTime();
Player p = setAggroOnRandomTarget();
Location teleloc = p.getLocation().add(p.getLocation().getDirection().multiply(-1d));
if (teleloc.getBlock().getType().isSolid() ||
teleloc.getBlock().getRelative(0,1,0).getType().isSolid()) {
teleloc.getBlock().getRelative(0,1,0).getType().isSolid() &&
teleloc.distanceSquared(m.getLocation())<=2500) {
teleloc = p.getLocation();
}
m.teleport(teleloc);
@ -243,9 +425,11 @@ public class Knight extends CustomMonster{
}
private Player pickRandomTarget() {
updateTargetList();
if (participantlist.size()>0) {
for (Player p : participantlist) {
if (Math.random()<=1d/participantlist.size()) {
if (Math.random()<=1d/participantlist.size() &&
!p.isDead() && p.isValid()) {
return p;
}
}
@ -255,8 +439,20 @@ public class Knight extends CustomMonster{
}
}
private void updateTargetList() {
if (!isFlying) {
for (int i=0;i<participantlist.size();i++) {
Player p = participantlist.get(i);
if (p==null || !p.isValid() || p.isDead() ||
p.getLocation().distanceSquared(m.getLocation())>2500) {
participantlist.remove(i--);
}
}
}
}
private boolean canCastSpells() {
return Math.random()<=1/20d && !Buff.hasBuff(m, "SILENCE") && startedfight && !Channel.isChanneling(m);
return Math.random()<=1/16d && !Buff.hasBuff(m, "SILENCE") && startedfight && !Channel.isChanneling(m) && !isFlying;
}
private void preventTargetFromBeingTheSameAsSpider() {
@ -308,12 +504,20 @@ public class Knight extends CustomMonster{
//Teleport randomly.
double numb = Math.random();
if (numb<=0.33) {
SoundUtils.playGlobalSound(m.getLocation(), Sound.ENTITY_ENDERMEN_TELEPORT, 0.4f, 0.95f);
m.teleport(m.getLocation().add(Math.random()*10-5,0,0));
Location newloc = m.getLocation().add(Math.random()*10-5,0,0);
if (!newloc.getBlock().getType().isSolid() &&
!newloc.getBlock().getRelative(0,1,0).getType().isSolid()) {
SoundUtils.playGlobalSound(m.getLocation(), Sound.ENTITY_ENDERMEN_TELEPORT, 0.4f, 0.95f);
m.teleport(newloc);
}
} else
if (numb<=0.5) {
SoundUtils.playGlobalSound(m.getLocation(), Sound.ENTITY_ENDERMEN_TELEPORT, 0.4f, 0.95f);
m.teleport(m.getLocation().add(0,0,Math.random()*10-5));
Location newloc = m.getLocation().add(0,0,Math.random()*10-5);
if (!newloc.getBlock().getType().isSolid() &&
!newloc.getBlock().getRelative(0,1,0).getType().isSolid()) {
SoundUtils.playGlobalSound(m.getLocation(), Sound.ENTITY_ENDERMEN_TELEPORT, 0.4f, 0.95f);
m.teleport(newloc);
}
}
stuckTimer=0;
}
@ -323,6 +527,9 @@ public class Knight extends CustomMonster{
private void keepSpiderPetNearby() {
if (isValidSpiderPet()) {
LivingEntityStructure les = LivingEntityStructure.GetLivingEntityStructure(spider_pet.GetMonster());
if (spider_pet.GetMonster().getLocation().distanceSquared(m.getLocation())>625) {
spider_pet.GetMonster().teleport(m);
}
les.SetTarget(m);
}
}
@ -330,10 +537,18 @@ public class Knight extends CustomMonster{
private void keepHealthbarUpdated() {
healthbar.setProgress(m.getHealth()/m.getMaxHealth());
Monster me = (Monster)m;
healthbar.setTitle(GenericFunctions.getDisplayName(m) + ((me.getTarget()!=null && (me.getTarget() instanceof Player))?(ChatColor.DARK_AQUA+" "+arrow+" "+ChatColor.YELLOW+((Player)me.getTarget()).getName()):""));
String healthbarfooter = ((me.getTarget()!=null && (me.getTarget() instanceof Player))?(ChatColor.DARK_AQUA+" "+arrow+" "+ChatColor.YELLOW+((Player)me.getTarget()).getName()):"");
if (Channel.isChanneling(m)) {
healthbar.setTitle(LivingEntityStructure.getChannelingBar(m)+healthbarfooter);
} else {
healthbar.setTitle(GenericFunctions.getDisplayName(m)+healthbarfooter);
}
if (isValidSpiderPet()) {
spider_pet.GetMonster().setHealth(spider_pet.GetMonster().getMaxHealth());
}
if (shieldbar!=null) {
shieldbar.setProgress(Math.min(CustomDamage.getAbsorptionHearts(m)/SHIELD_AMT[getDifficultySlot()],1));
}
}
private void regenerateHealthAndResetBossIfIdle() {
@ -366,7 +581,7 @@ public class Knight extends CustomMonster{
//See if there's another participant in the list. Choose randomly.
while (participantlist.size()>0) {
Player p = participantlist.get((int)(Math.random()*participantlist.size()));
if (p!=null && p.isValid() &&
if (p!=null && p.isValid() && !p.isDead() &&
(isFlying || p.getLocation().distanceSquared(mm.getLocation())<=2500)) {
mm.setTarget(p);
les.SetTarget(p);
@ -450,6 +665,9 @@ public class Knight extends CustomMonster{
public void onHitEvent(LivingEntity damager, double damage) {
addTarget(damager,damage);
Bukkit.getScheduler().scheduleSyncDelayedTask(TwosideKeeper.plugin, ()->{
m.setVelocity(m.getVelocity().multiply(0.1));
}, 1);
healthbar.setProgress(m.getHealth()/m.getMaxHealth());
lasthit=TwosideKeeper.getServerTickTime();
if (!startedfight) {
@ -514,14 +732,34 @@ public class Knight extends CustomMonster{
for (Player p : healthbar.getPlayers()) {
if (p.getLocation().distanceSquared(m.getLocation())>2500) {
healthbar.removePlayer(p);
if (shieldbar!=null) {
shieldbar.removePlayer(p);
}
}
}
for (Entity e : m.getNearbyEntities(50, 50, 50)) {
if (e instanceof Player) {
Player p = (Player)e;
healthbar.addPlayer(p);
if (shieldbar!=null) {
shieldbar.addPlayer(p);
}
}
}
if (shieldbar==null && CustomDamage.getAbsorptionHearts(m)>0) {
shieldbar = Bukkit.getServer().createBossBar(GenericFunctions.getDisplayName(m)+"'s Shield", BarColor.WHITE, BarStyle.SEGMENTED_6, BarFlag.CREATE_FOG);
GenericFunctions.logAndApplyPotionEffectToEntity(PotionEffectType.INVISIBILITY, DARKCLEANSE.getCastTimes()[getDifficultySlot()], 1, m, true);
shieldbar.setProgress(Math.min(CustomDamage.getAbsorptionHearts(m)/SHIELD_AMT[getDifficultySlot()],1));
for (Player p : healthbar.getPlayers()) {
shieldbar.addPlayer(p);
}
}
if (shieldbar!=null && m.hasPotionEffect(PotionEffectType.INVISIBILITY) &&
CustomDamage.getAbsorptionHearts(m)<=0) {
GenericFunctions.logAndRemovePotionEffectFromEntity(PotionEffectType.INVISIBILITY, m);
shieldbar.removeAll();
shieldbar=null;
}
}
private void SetupSpiderPet(LivingEntity m) {
@ -576,6 +814,9 @@ public class Knight extends CustomMonster{
public void cleanup() {
healthbar.removeAll();
if (shieldbar!=null) {
shieldbar.removeAll();
}
if (startedfight) {
announceFailedTakedown();
startedfight=false;
@ -600,4 +841,15 @@ public class Knight extends CustomMonster{
}break;
}
}
public void onDeathEvent() {
Bukkit.getServer().broadcastMessage(ChatColor.YELLOW+"DPS Breakdown:");
Bukkit.getServer().broadcastMessage(generateDPSReport());
aPlugin.API.discordSendRaw(ChatColor.YELLOW+"DPS Breakdown:"+"\n```\n"+generateDPSReport()+"\n```");
cleanup();
}
public List<Player> getParticipants() {
return participantlist;
}
}

@ -294,7 +294,7 @@ public class PlayerStructure {
this.customtitle = new AdvancedTitle(p);
//Set defaults first, in case this is a new user.
loadConfig();
p.getInventory().addItem(new ItemStack(Material.PORTAL));
//p.getInventory().addItem(new ItemStack(Material.PORTAL));
//Check if new player.
if (this.firstjoined == serverTickTime) {

@ -447,7 +447,7 @@ public class TwosideKeeper extends JavaPlugin implements Listener {
public static final int ASSASSINATE_COOLDOWN=200;
public static final int LIFESAVER_COOLDOWN=6000;
public static final int ARROWBARRAGE_COOLDOWN=2400;
public static final int SIPHON_COOLDOWN = 700;
public static final int SIPHON_COOLDOWN = 900;
public static final int MOCK_COOLDOWN = 400;
public static final int ICEWAND_COOLDOWN = 1200;
public static final int WINDSLASH_COOLDOWN = 100;
@ -1175,7 +1175,7 @@ public class TwosideKeeper extends JavaPlugin implements Listener {
/*MonsterTemplate newtemp = new MonsterTemplate(new File(filesave+"/monsterdata/KingSlime.md"));
int newint = (int)newtemp.getValue("timeToLive");
log(Integer.toString(newint),0);*/
log(" This is here to change the file size if necessary Kappa Kappa Kappa No Copy-pasterino Kappachino Lulu c: Please update version number. lololol cy@ storm is boosted",5);
log(" This is here to change the file size if necessary Kappa Kappa Kappa No Copy-pasterino Kappachino Lulu c: Please update version number. lololol cy@ storm is boosted. This is nice.",5);
}
private static void InitializeBotCommands() {
@ -2030,6 +2030,16 @@ public class TwosideKeeper extends JavaPlugin implements Listener {
);
}
}break;
case "DARKSUBMISSION":{
//TwosideKeeper.log(EntityUtils.getFacingDirection(p).name(),0);
Buff.addBuff(p,"DARKSUBMISSION",new Buff("Dark Submission",20*20,Integer.parseInt(args[1]),Color.BLACK,ChatColor.BLACK+""+ChatColor.MAGIC+"☁"+ChatColor.RESET,false));
}break;
case "ABSORBENEMY":{
Skeleton s = (Skeleton)Bukkit.getWorld("world").spawnEntity(p.getLocation(), EntityType.SKELETON);
GlowAPI.setGlowing(s, GlowAPI.Color.AQUA, Bukkit.getOnlinePlayers());
GenericFunctions.logAndApplyPotionEffectToEntity(PotionEffectType.ABSORPTION, 999999, 254, s, true);
GenericFunctions.logAndApplyPotionEffectToEntity(PotionEffectType.INVISIBILITY, 999999, 254, s, true);
}
}
}
//LivingEntity m = MonsterController.convertMonster((Monster)p.getWorld().spawnEntity(p.getLocation(),EntityType.ZOMBIE), MonsterDifficulty.ELITE);
@ -3342,7 +3352,8 @@ public class TwosideKeeper extends JavaPlugin implements Listener {
GenericFunctions.DealExplosionDamageToEntities(ev.getEntity().getLocation(), 500f, 4, b);
aPlugin.API.sendSoundlessExplosion(ev.getEntity().getLocation(), 4);
SoundUtils.playGlobalSound(ev.getEntity().getLocation(), Sound.ENTITY_GENERIC_EXPLODE, 0.6f, 0.5f);
temporary_lava_list.add(new TemporaryLava(ev.getEntity().getLocation().getBlock().getRelative(0, 1, 0),4,true));
temporary_lava_list.add(new TemporaryLava(ev.getEntity().getLocation().getBlock().getRelative(0, 1, 0),8,true));
//runServerHeartbeat.CreateLavaPlume(ev.getEntity().getLocation().getBlock().getRelative(0, 0, 0));
}break;
default:{
@ -4793,9 +4804,16 @@ public class TwosideKeeper extends JavaPlugin implements Listener {
case "Orni": {
return "was killed by merely existing.";
}
case "Dark Slash":{
case "Dark Slash":
case "Line Drive Knight":{
return "was sliced into darkness.";
}
case "Dark Cleanse Attack":{
return "bursted into the shadow realm.";
}
case "Grand Slam":{
return Pronouns.ChoosePronoun(19);
}
default:{
return "has died by "+pd.lasthitdesc;
}
@ -5132,7 +5150,7 @@ public class TwosideKeeper extends JavaPlugin implements Listener {
}
}
private void UpdateUnstoppableTeamBuff(Player p, PlayerStructure pd) {
Buff b = new Buff("Unstoppable Team Unavailable",PlayerUtils.cooldownTimeRemaining(pd.lastusedunstoppableteam, UNSTOPPABLETEAM_COOLDOWN, p),0,null,ChatColor.WHITE+"",true);
Buff b = new Buff("Unstoppable Team Unavailable",PlayerUtils.cooldownTimeRemaining(pd.lastusedunstoppableteam, UNSTOPPABLETEAM_COOLDOWN, p),0,null,ChatColor.WHITE+"",true,true);
b.setDisplayTimerAlways(true);
Buff.addBuff(p, "Unstoppable Team Unavailable", b);
}
@ -7714,6 +7732,15 @@ public class TwosideKeeper extends JavaPlugin implements Listener {
em.Cleanup();
elitemonsters.remove(em);
}},1);
if (TwosideKeeper.custommonsters.containsKey(m.getUniqueId())) {
CustomMonster cm = TwosideKeeper.custommonsters.get(m.getUniqueId());
if (cm instanceof Knight) {
Bukkit.getScheduler().scheduleSyncDelayedTask(this, new Runnable() {
public void run() {
cm.onDeathEvent();
}},1);
}
}
GenericFunctions.generateNewElite(null,"");
}
@ -7960,6 +7987,13 @@ public class TwosideKeeper extends JavaPlugin implements Listener {
ev.setRespawnLocation(newloc.add(0,10,0));
}
for (String s : Buff.getBuffData(p).keySet()) {
Buff b = Buff.getBuffData(p).get(s);
Bukkit.getScheduler().runTaskLater(plugin,()->{
Buff.removeBuff(p, s);
},1);
}
pd.lastdeath=getServerTickTime();
pd.hasDied=false;
pd.slayermodehp=10;
@ -8084,7 +8118,7 @@ public class TwosideKeeper extends JavaPlugin implements Listener {
@EventHandler(priority=EventPriority.LOW,ignoreCancelled = true)
public void onItemConsume(PlayerItemConsumeEvent ev) {
//TwosideKeeper.log("Player is holding "+ev.getPlayer().getEquipment().getItemInMainHand(), 0);
TwosideKeeper.log("Player is holding "+ev.getPlayer().getEquipment().getItemInMainHand(), 0);
if (EatingSoupFromOffHand(ev.getPlayer())) {
//TwosideKeeper.log("Eating soup from OffHand.", 0);
//We know vanilla minecraft will bug this out. Replace the bowl in the off-hand with the consumed item (with 1 smaller stack size)
@ -8830,7 +8864,13 @@ public class TwosideKeeper extends JavaPlugin implements Listener {
public static void ShootPiercingArrow(Projectile arr, Player p) {
PlayerStructure pd = PlayerStructure.GetPlayerStructure(p);
SoundUtils.playLocalSound(p, Sound.ENTITY_ARROW_SHOOT, 1.0f, 1.6f);
pd.lastarrowwasinrangermode=true;
if (GenericFunctions.getBowMode(p)==BowMode.SNIPE) {
pd.lastarrowwasinrangermode=true;
pd.lastarrowpower=9000;
} else {
pd.lastarrowwasinrangermode=false;
pd.lastarrowpower=9;
}
Collection<LivingEntity> targets = aPlugin.API.rayTraceTargetEntities(p, 100);
Location arrowloc = arr.getLocation().clone();
Vector dir = arr.getVelocity().clone();
@ -8922,6 +8962,23 @@ public class TwosideKeeper extends JavaPlugin implements Listener {
TwosideKeeper.log("Launch event.", 5);
if (ev.getEntity() instanceof Projectile) {
Projectile arr = (Projectile)ev.getEntity();
if (arr.getShooter() instanceof Player) {
Player p = (Player)(arr.getShooter());
Bukkit.getScheduler().scheduleSyncDelayedTask(TwosideKeeper.plugin, ()->{
ItemStack tempitem = p.getEquipment().getItemInMainHand().clone();
Location loc = p.getLocation().clone();
p.getEquipment().setItemInMainHand(new ItemStack(Material.AIR));
Bukkit.getScheduler().scheduleSyncDelayedTask(TwosideKeeper.plugin, ()->{
if (p!=null && p.isValid()) {
p.getEquipment().setItemInMainHand(tempitem);
} else {
GenericFunctions.dropItem(tempitem, loc);
}
}, 1);
}, 1);
}
//Arrow newarrow = arr.getLocation().getWorld().spawnArrow(arr.getLocation(), arr.getVelocity(), 1, 12);
//TwosideKeeper.log(GenericFunctions.GetEntityDisplayName(arr)+" being shot.", 0);
if (arr instanceof Fireball && (arr.getShooter() instanceof Ghast)) {
@ -9512,9 +9569,9 @@ public class TwosideKeeper extends JavaPlugin implements Listener {
@EventHandler(priority=EventPriority.LOW,ignoreCancelled = true)
public void MinecartExitEvent(VehicleEnterEvent ev) {
//Attempt to update the entity a few ticks later.
Bukkit.getScheduler().runTaskLater(plugin, ()->{
/*Bukkit.getScheduler().runTaskLater(plugin, ()->{
ev.getEntered().teleport(ev.getVehicle());
}, 5);
}, 5);*/
}
@EventHandler(priority=EventPriority.LOW,ignoreCancelled = true)
@ -10558,7 +10615,7 @@ public class TwosideKeeper extends JavaPlugin implements Listener {
if (PlayerMode.isDefender(p)) {
double dodgechance=0.0;
if (!p.isBlocking()) {
dodgechance+=ItemSet.GetTotalBaseAmount(p, ItemSet.SONGSTEEL)/100d;
dodgechance+=ItemSet.GetMultiplicativeTotalBaseAmount(p, ItemSet.SONGSTEEL);
}
if (all || dodgechance>0) {
receiver.sendMessage(ChatColor.GRAY+""+ChatColor.ITALIC+"Block Chance: "+ChatColor.RESET+""+ChatColor.DARK_AQUA+df.format((CustomDamage.CalculateDodgeChance(p)+dodgechance)*100)+"%");

@ -509,7 +509,7 @@ final class runServerHeartbeat implements Runnable {
if (ent!=null && Buff.hasBuff(ent, "BURN")) {
CustomDamage.ApplyDamage(Buff.getBuff(ent, "BURN").getAmplifier(), null, ent, null, "Burn", CustomDamage.IGNOREDODGE|CustomDamage.TRUEDMG|CustomDamage.IGNORE_DAMAGE_TICK);
les.lastBurnTick=TwosideKeeper.getServerTickTime();
SoundUtils.playLocalSound((Player)ent, Sound.ENTITY_GENERIC_EXTINGUISH_FIRE, 1.0f, 1.0f);
SoundUtils.playGlobalSound(ent.getLocation(), Sound.ENTITY_GENERIC_EXTINGUISH_FIRE, 1.0f, 1.0f);
}
}, (int)(Math.random()*10));
}
@ -797,7 +797,7 @@ final class runServerHeartbeat implements Runnable {
private void DepleteDamagePool(final long serverTickTime, Player p, PlayerStructure pd) {
if (pd.damagepool>0 && pd.damagepooltime+20<=serverTickTime) {
double transferdmg = CustomDamage.getTransferDamage(p)+(pd.damagepool*0.01);
double transferdmg = CustomDamage.getTransferDamage(p)+(pd.damagepool*0.03);
TwosideKeeper.log("Transfer Dmg is "+transferdmg+". Damage Pool: "+pd.damagepool, 5);
CustomDamage.ApplyDamage(transferdmg, null, p, null, "Damage Pool", CustomDamage.IGNORE_DAMAGE_TICK|CustomDamage.TRUEDMG|CustomDamage.IGNOREDODGE);
if (pd.damagepool-transferdmg<1) {
@ -1093,7 +1093,7 @@ final class runServerHeartbeat implements Runnable {
}*/
}
private void CreateLavaPlume(final Block b) {
public static void CreateLavaPlume(final Block b) {
//FallingBlock fb = b.getWorld().spawnFallingBlock(b.getLocation().add(0,1,0), Material.REDSTONE_BLOCK, (byte)0);
TwosideKeeper.lavaplume_list.add(new LavaPlume(90,b.getLocation()));
/*fb.setMetadata("DESTROY", new FixedMetadataValue(TwosideKeeper.plugin,true));

@ -1,6 +1,9 @@
package sig.plugin.TwosideKeeper;
import org.bukkit.Bukkit;
import org.bukkit.ChatColor;
import org.bukkit.Material;
import org.bukkit.block.BlockFace;
import org.bukkit.entity.Player;
import sig.plugin.TwosideKeeper.HelperStructures.Common.BlockModifyQueue;
@ -21,12 +24,21 @@ public class runServerTick implements Runnable{
/*if (Bukkit.getPlayer("sigonasr2")!=null) {
Player p = Bukkit.getPlayer("sigonasr2");
for (int i=0;i<200;i++) {
ColoredParticle.RED_DUST.send(p.getEyeLocation().add(
p.getLocation().getDirection()).add(0,-0.05*i,0)
, 20, 0, 0, 0);
if (p.getLocation().getBlock().getRelative(BlockFace.DOWN).getType()!=Material.AIR &&
!p.getLocation().getBlock().getRelative(BlockFace.DOWN).isLiquid()) {
PlayerStructure pd = PlayerStructure.GetPlayerStructure(p);
pd.customtitle.modifyLargeCenterTitle(ChatColor.RED+"A", 5);
}
}*/
/*
/*if (Bukkit.getPlayer("sigonasr2")!=null) {
for (int i=0;i<200;i++) {
ColoredParticle.RED_DUST.send(p.getEyeLocation().add(
p.getLocation().getDirection()).add(0,-0.05*i,0)
, 20, 0, 0, 0);
}
}*/
}
}

Loading…
Cancel
Save