Remove certain Item sets from rerollable item set list.

This commit is contained in:
sigonasr2 2017-05-13 17:55:14 -07:00
parent c86785c16b
commit dcf5629e76
9 changed files with 150 additions and 54 deletions

Binary file not shown.

View File

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

View File

@ -691,6 +691,8 @@ public class CustomDamage {
performMegaKnockback(damager,target);
if ((damager!=null && damager instanceof Arrow) || (weapon!=null && weapon.getType()!=Material.BOW)) {
removePermEnchantments(p,weapon);
applyShrapnel(p,target);
applyDoTs(p,target);
}
//GenericFunctions.knockOffGreed(p);
castEruption(p,target,weapon);
@ -708,8 +710,6 @@ public class CustomDamage {
damage = applyBarbarianBonuses(p,target,weapon,damage,reason);
increaseWindCharges(p);
applyWindSlashEffects(p,target,damage,reason);
applyShrapnel(p,target);
applyDoTs(p,target);
if (PlayerMode.getPlayerMode(p)==PlayerMode.SLAYER) {
if (isFlagSet(pd.lasthitproperties,IS_CRIT)) {

View File

@ -139,6 +139,7 @@ public class TemporaryBlock {
sb.append(bl.getLocation().getWorld().getName());
sb.append("_");
sb.append(specialKey);
//TwosideKeeper.log("Checking key: "+sb.toString(), 0);
return sb.toString();
} else {
return "";
@ -194,22 +195,25 @@ public class TemporaryBlock {
public static boolean isTemporaryBlock(Block b) {
return TwosideKeeper.temporaryblocks.containsKey(TemporaryBlock.getLocationKey(b));
}
public static boolean isStandingOnSpecialBlock(Player p, String specialKey) {
public static boolean isStandingOnSpecialBlock(Location l, String specialKey) {
//return TwosideKeeper.temporaryblocks.containsKey(TemporaryBlock.getLocationKey(b));
Block b = p.getLocation().getBlock();
Block b = l.getBlock();
//TwosideKeeper.log(b.toString(), 0);
if (b!=null) {
return TwosideKeeper.temporaryblocks.containsKey(TemporaryBlock.getLocationKey(b,specialKey));
} else {
return false;
}
}
public static boolean isInRangeOfSpecialBlock(Player p, double range, String specialKey) {
Block b = p.getLocation().getBlock();
public static boolean isInRangeOfSpecialBlock(Location l, double range, String specialKey) {
Block b = l.getBlock();
//TwosideKeeper.log(b.toString(), 0);
while (range-->0 && b.getLocation().getBlockY()>0) {
if (TwosideKeeper.temporaryblocks.containsKey(TemporaryBlock.getLocationKey(b,specialKey))) {
return true;
} else {
b = b.getRelative(0, -1, 0);
//TwosideKeeper.log(b.toString(), 0);
}
}
return false;

View File

@ -0,0 +1,39 @@
package sig.plugin.TwosideKeeper.HelperStructures.Effects;
import org.bukkit.Location;
import org.bukkit.Particle;
public class TemporaryBlockNode {
Location l;
double range;
int duration;
String specialKey;
Particle effect;
int particleDensity; //Number of particles per second.
public TemporaryBlockNode(Location l, double range, int duration, String key) {
this.l=l;
this.range=range;
this.specialKey=key;
this.duration=duration;
this.effect=null;
this.particleDensity=0;
}
public TemporaryBlockNode(Location l, double range, int duration, String key, Particle effect, int density) {
this.l=l;
this.range=range;
this.specialKey=key;
this.duration=duration;
this.effect=effect;
this.particleDensity=density;
}
public boolean runTick() {
if (duration--<0) {
return false;
} else {
return true;
}
}
}

View File

@ -77,14 +77,14 @@ public enum ItemSet {
ItemSet.DARNYS,
ItemSet.ALIKAHN,
ItemSet.LORASAADI,
ItemSet.SHARD,
ItemSet.TOXIN,
//ItemSet.SHARD,
//ItemSet.TOXIN,
};
public static final ItemSet[] MELEE = new ItemSet[]{
ItemSet.DAWNTRACKER,
ItemSet.PANROS,
ItemSet.SONGSTEEL,
ItemSet.WINDRY,
/*ItemSet.WINDRY,
ItemSet.LORASYS,
ItemSet.LUCI,
ItemSet.PROTECTOR,
@ -92,7 +92,7 @@ public enum ItemSet {
ItemSet.LEGION,
ItemSet.PRIDE,
ItemSet.ASSASSIN,
ItemSet.STEALTH,
ItemSet.STEALTH,*/
};
public static final ItemSet[] TRINKET = new ItemSet[]{
ItemSet.GLADOMAIN,

View File

@ -92,6 +92,8 @@ public class EntityUtils {
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);
},delay);
}

View File

@ -87,6 +87,7 @@ import org.bukkit.event.block.BlockBreakEvent;
import org.bukkit.event.block.BlockDispenseEvent;
import org.bukkit.event.block.BlockPlaceEvent;
import org.bukkit.event.block.SignChangeEvent;
import org.bukkit.event.entity.AreaEffectCloudApplyEvent;
import org.bukkit.event.entity.CreatureSpawnEvent;
import org.bukkit.event.entity.CreatureSpawnEvent.SpawnReason;
import org.bukkit.event.entity.EntityChangeBlockEvent;
@ -1108,7 +1109,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",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",5);
}
private static void InitializeBotCommands() {
@ -1864,9 +1865,9 @@ public class TwosideKeeper extends JavaPlugin implements Listener {
}break;
case "TEMPBLOCK_TEST":{
TwosideKeeper.log("Is temporary block? "+TemporaryBlock.isTemporaryBlock(p.getLocation().getBlock()), 0);
TwosideKeeper.log("Is on special block? "+TemporaryBlock.isStandingOnSpecialBlock(p, "TEST"),0);
TwosideKeeper.log("Range of special block? "+TemporaryBlock.isInRangeOfSpecialBlock(p,5,"TEST"), 0);
TwosideKeeper.log("Range of fake special block? "+TemporaryBlock.isInRangeOfSpecialBlock(p,5,"TEST2"), 0);
TwosideKeeper.log("Is on special block? "+TemporaryBlock.isStandingOnSpecialBlock(p.getLocation(), "TEST"),0);
TwosideKeeper.log("Range of special block? "+TemporaryBlock.isInRangeOfSpecialBlock(p.getLocation(),5,"TEST"), 0);
TwosideKeeper.log("Range of fake special block? "+TemporaryBlock.isInRangeOfSpecialBlock(p.getLocation(),5,"TEST2"), 0);
//new TemporaryBlock(p.getLocation().getBlock(),Material.STAINED_GLASS,(byte)6,200,"TEST");
//TwosideKeeper.log(TextUtils.outputHashmap(TwosideKeeper.temporaryblocks), 0);
}break;
@ -3123,6 +3124,11 @@ public class TwosideKeeper extends JavaPlugin implements Listener {
}
}
@EventHandler(priority=EventPriority.LOW,ignoreCancelled = true)
public void onEffectCloud(AreaEffectCloudApplyEvent ev) {
}
@EventHandler(priority=EventPriority.LOW,ignoreCancelled = true)
public void onArrowHitBlock(ProjectileHitEvent ev) {
if (ev.getEntity() instanceof Arrow) {
@ -3134,9 +3140,21 @@ public class TwosideKeeper extends JavaPlugin implements Listener {
GenericFunctions.DealExplosionDamageToEntities(ev.getEntity().getLocation(), 40f+shooter.getHealth()*0.1, 2, shooter, "Shrapnel Explosion");
aPlugin.API.sendSoundlessExplosion(ev.getEntity().getLocation(), 1);
SoundUtils.playGlobalSound(ev.getEntity().getLocation(), Sound.ENTITY_GENERIC_EXPLODE, 0.6f, 0.5f);
} else
if (ItemSet.hasFullSet(p, ItemSet.TOXIN)) {
TemporaryBlock.createTemporaryBlockCircle(a.getLocation().add(0,-1,0), 2, Material.REDSTONE_BLOCK, (byte)0, 100, "FIRECESSPOOL");
}
else
if (!a.hasMetadata("FIREPOOL") && ItemSet.hasFullSet(p, ItemSet.TOXIN)) {
//TemporaryBlock.createTemporaryBlockCircle(a.getLocation().add(0,-2,0), 2, Material.REDSTONE_BLOCK, (byte)0, 100, "FIRECESSPOOL");
//a.setMetadata("FIREPOOL", new FixedMetadataValue(this,true));
AreaEffectCloud aec = (AreaEffectCloud)a.getWorld().spawnEntity(a.getLocation().getBlock().getLocation(), EntityType.AREA_EFFECT_CLOUD);
aec.setCustomName("FIREPOOL");
aec.setParticle(Particle.DRIP_LAVA);
aec.setDurationOnUse(20*5);
aec.setDuration(20*5);
aec.setRadius(2);
aec.setGlowing(true);
aec.setReapplicationDelay(20);
aec.setWaitTime(0);
aec.addCustomEffect(new PotionEffect(PotionEffectType.HARM,0,0), true);
}
}
a.setCustomName("HIT");

View File

@ -51,6 +51,7 @@ import sig.plugin.TwosideKeeper.HelperStructures.ServerType;
import sig.plugin.TwosideKeeper.HelperStructures.WorldShop;
import sig.plugin.TwosideKeeper.HelperStructures.Common.GenericFunctions;
import sig.plugin.TwosideKeeper.HelperStructures.Effects.LavaPlume;
import sig.plugin.TwosideKeeper.HelperStructures.Effects.TemporaryBlock;
import sig.plugin.TwosideKeeper.HelperStructures.Utils.EntityUtils;
import sig.plugin.TwosideKeeper.HelperStructures.Utils.InventoryUtils;
import sig.plugin.TwosideKeeper.HelperStructures.Utils.ItemCubeUtils;
@ -347,34 +348,44 @@ final class runServerHeartbeat implements Runnable {
PlayerStructure pd = PlayerStructure.GetPlayerStructure((Player)ent);
if (Buff.hasBuff(ent, "Poison") && pd.lastPoisonTick+getPoisonTickDelay(ent)<=TwosideKeeper.getServerTickTime()) {
Bukkit.getScheduler().runTaskLater(TwosideKeeper.plugin, ()->{
CustomDamage.ApplyDamage(Buff.getBuff(ent, "Poison").getAmplifier(), null, ent, null, "POISON", CustomDamage.IGNOREDODGE|CustomDamage.TRUEDMG|CustomDamage.IGNORE_DAMAGE_TICK);
pd.lastPoisonTick=TwosideKeeper.getServerTickTime();
if (ent!=null) {
CustomDamage.ApplyDamage(Buff.getBuff(ent, "Poison").getAmplifier(), null, ent, null, "POISON", CustomDamage.IGNOREDODGE|CustomDamage.TRUEDMG|CustomDamage.IGNORE_DAMAGE_TICK);
pd.lastPoisonTick=TwosideKeeper.getServerTickTime();
}
}, (int)(Math.random()*10));
}
if (Buff.hasBuff(ent, "SHRAPNEL") && pd.lastShrapnelTick<=TwosideKeeper.getServerTickTime()) {
Bukkit.getScheduler().runTaskLater(TwosideKeeper.plugin, ()->{
CustomDamage.ApplyDamage((Buff.getBuff(ent, "SHRAPNEL").getAmplifier()*2)*(1d-CustomDamage.getFireResistance(ent)), null, ent, null, "Shrapnel", CustomDamage.IGNOREDODGE|CustomDamage.TRUEDMG|CustomDamage.IGNORE_DAMAGE_TICK);
pd.lastShrapnelTick=TwosideKeeper.getServerTickTime();
SoundUtils.playLocalSound((Player)ent, Sound.ENTITY_GENERIC_EXTINGUISH_FIRE, 1.0f, 1.0f);
ent.getWorld().spawnParticle(Particle.LAVA, ent.getEyeLocation(), CustomDamage.GetHeartAmount(Buff.getBuff(ent, "SHRAPNEL").getAmplifier())*5);
if (ent!=null) {
CustomDamage.ApplyDamage((Buff.getBuff(ent, "SHRAPNEL").getAmplifier()*2)*(1d-CustomDamage.getFireResistance(ent)), null, ent, null, "Shrapnel", CustomDamage.IGNOREDODGE|CustomDamage.TRUEDMG|CustomDamage.IGNORE_DAMAGE_TICK);
pd.lastShrapnelTick=TwosideKeeper.getServerTickTime();
SoundUtils.playLocalSound((Player)ent, Sound.ENTITY_GENERIC_EXTINGUISH_FIRE, 1.0f, 1.0f);
ent.getWorld().spawnParticle(Particle.LAVA, ent.getEyeLocation(), CustomDamage.GetHeartAmount(Buff.getBuff(ent, "SHRAPNEL").getAmplifier())*5);
}
}, (int)(Math.random()*10));
}
if (Buff.hasBuff(ent, "BLEEDING") && pd.lastBleedingTick<=TwosideKeeper.getServerTickTime()) {
Bukkit.getScheduler().runTaskLater(TwosideKeeper.plugin, ()->{
CustomDamage.ApplyDamage((Buff.getBuff(ent, "BLEEDING").getAmplifier()), null, ent, null, "Bleeding", CustomDamage.IGNOREDODGE|CustomDamage.TRUEDMG|CustomDamage.IGNORE_DAMAGE_TICK);
pd.lastBleedingTick=TwosideKeeper.getServerTickTime();
//SoundUtils.playLocalSound((Player)ent, Sound.ENTITY_GENERIC_EXTINGUISH_FIRE, 1.0f, 1.0f);
//ent.getWorld().spawnParticle(Particle.LAVA, ent.getEyeLocation(), CustomDamage.GetHeartAmount(Buff.getBuff(ent, "SHRAPNEL").getAmplifier())*5);
Bukkit.getScheduler().runTaskLater(TwosideKeeper.plugin, ()->{
if (ent!=null) {
CustomDamage.ApplyDamage((Buff.getBuff(ent, "BLEEDING").getAmplifier()), null, ent, null, "Bleeding", CustomDamage.IGNOREDODGE|CustomDamage.TRUEDMG|CustomDamage.IGNORE_DAMAGE_TICK);
}, 10); //Bleeding DOT is twice as fast.
pd.lastBleedingTick=TwosideKeeper.getServerTickTime();
//SoundUtils.playLocalSound((Player)ent, Sound.ENTITY_GENERIC_EXTINGUISH_FIRE, 1.0f, 1.0f);
//ent.getWorld().spawnParticle(Particle.LAVA, ent.getEyeLocation(), CustomDamage.GetHeartAmount(Buff.getBuff(ent, "SHRAPNEL").getAmplifier())*5);
Bukkit.getScheduler().runTaskLater(TwosideKeeper.plugin, ()->{
if (ent!=null) {
CustomDamage.ApplyDamage((Buff.getBuff(ent, "BLEEDING").getAmplifier()), null, ent, null, "Bleeding", CustomDamage.IGNOREDODGE|CustomDamage.TRUEDMG|CustomDamage.IGNORE_DAMAGE_TICK);
}
}, 10); //Bleeding DOT is twice as fast.
}
}, (int)(Math.random()*10));
}
if (Buff.hasBuff(ent, "INFECTION") && pd.lastInfectionTick<=TwosideKeeper.getServerTickTime()) {
Bukkit.getScheduler().runTaskLater(TwosideKeeper.plugin, ()->{
CustomDamage.ApplyDamage(Buff.getBuff(ent, "INFECTION").getAmplifier(), null, ent, null, "Infection", CustomDamage.IGNOREDODGE|CustomDamage.TRUEDMG|CustomDamage.IGNORE_DAMAGE_TICK);
pd.lastInfectionTick=TwosideKeeper.getServerTickTime();
infectNearbyPlayers(ent,pd.buffs);
if (ent!=null) {
CustomDamage.ApplyDamage(Buff.getBuff(ent, "INFECTION").getAmplifier(), null, ent, null, "Infection", CustomDamage.IGNOREDODGE|CustomDamage.TRUEDMG|CustomDamage.IGNORE_DAMAGE_TICK);
pd.lastInfectionTick=TwosideKeeper.getServerTickTime();
infectNearbyPlayers(ent,pd.buffs);
}
}, (int)(Math.random()*10));
}
if (Buff.hasBuff(ent, "CRIPPLE") && aPlugin.API.getPlayerSpeedMultiplier((Player)ent)>(1-(Buff.getBuff(ent,"CRIPPLE").getAmplifier()*0.1))) {
@ -388,43 +399,58 @@ final class runServerHeartbeat implements Runnable {
}
if (Buff.hasBuff(ent, "BURN") && pd.lastBurnTick<=TwosideKeeper.getServerTickTime()) {
Bukkit.getScheduler().runTaskLater(TwosideKeeper.plugin, ()->{
CustomDamage.ApplyDamage(Buff.getBuff(ent, "BURN").getAmplifier(), null, ent, null, "Burn", CustomDamage.IGNOREDODGE|CustomDamage.TRUEDMG|CustomDamage.IGNORE_DAMAGE_TICK);
pd.lastBurnTick=TwosideKeeper.getServerTickTime();
if (ent!=null) {
CustomDamage.ApplyDamage(Buff.getBuff(ent, "BURN").getAmplifier(), null, ent, null, "Burn", CustomDamage.IGNOREDODGE|CustomDamage.TRUEDMG|CustomDamage.IGNORE_DAMAGE_TICK);
pd.lastBurnTick=TwosideKeeper.getServerTickTime();
}
}, (int)(Math.random()*10));
}
/*if (TemporaryBlock.isInRangeOfSpecialBlock(ent.getLocation(), 1, "FIRECESSPOOL_P")) {
Buff.addBuff(ent, "BURN", new Buff("Burn", 20*5, 1, org.bukkit.Color.ORANGE, ChatColor.AQUA+"", false),true);
}*/
} else {
LivingEntityStructure les = LivingEntityStructure.GetLivingEntityStructure(ent);
if (Buff.hasBuff(ent, "Poison") && les.lastPoisonTick+getPoisonTickDelay(ent)<=TwosideKeeper.getServerTickTime()) {
Bukkit.getScheduler().runTaskLater(TwosideKeeper.plugin, ()->{
CustomDamage.ApplyDamage(Buff.getBuff(ent, "Poison").getAmplifier(), null, ent, null, "POISON", CustomDamage.IGNOREDODGE|CustomDamage.TRUEDMG|CustomDamage.IGNORE_DAMAGE_TICK);
les.lastPoisonTick=TwosideKeeper.getServerTickTime();
if (ent!=null) {
CustomDamage.ApplyDamage(Buff.getBuff(ent, "Poison").getAmplifier(), null, ent, null, "POISON", CustomDamage.IGNOREDODGE|CustomDamage.TRUEDMG|CustomDamage.IGNORE_DAMAGE_TICK);
les.lastPoisonTick=TwosideKeeper.getServerTickTime();
}
}, (int)(Math.random()*10));
}
if (Buff.hasBuff(ent, "SHRAPNEL") && les.lastShrapnelTick<=TwosideKeeper.getServerTickTime()) {
Bukkit.getScheduler().runTaskLater(TwosideKeeper.plugin, ()->{
CustomDamage.ApplyDamage((Buff.getBuff(ent, "SHRAPNEL").getAmplifier()*2)*(1d-CustomDamage.getFireResistance(ent)), null, ent, null, "Shrapnel", CustomDamage.IGNOREDODGE|CustomDamage.TRUEDMG|CustomDamage.IGNORE_DAMAGE_TICK);
les.lastShrapnelTick=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);
ent.getWorld().spawnParticle(Particle.LAVA, ent.getEyeLocation(), CustomDamage.GetHeartAmount(Buff.getBuff(ent, "SHRAPNEL").getAmplifier())*5);
if (ent!=null) {
CustomDamage.ApplyDamage((Buff.getBuff(ent, "SHRAPNEL").getAmplifier()*2)*(1d-CustomDamage.getFireResistance(ent)), null, ent, null, "Shrapnel", CustomDamage.IGNOREDODGE|CustomDamage.TRUEDMG|CustomDamage.IGNORE_DAMAGE_TICK);
les.lastShrapnelTick=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);
ent.getWorld().spawnParticle(Particle.LAVA, ent.getEyeLocation(), CustomDamage.GetHeartAmount(Buff.getBuff(ent, "SHRAPNEL").getAmplifier())*5);
}
}, (int)(Math.random()*10));
}
if (Buff.hasBuff(ent, "BLEEDING") && les.lastBleedingTick<=TwosideKeeper.getServerTickTime()) {
Bukkit.getScheduler().runTaskLater(TwosideKeeper.plugin, ()->{
CustomDamage.ApplyDamage((Buff.getBuff(ent, "BLEEDING").getAmplifier()), null, ent, null, "Bleeding", CustomDamage.IGNOREDODGE|CustomDamage.TRUEDMG|CustomDamage.IGNORE_DAMAGE_TICK);
les.lastBleedingTick=TwosideKeeper.getServerTickTime();
//SoundUtils.playLocalSound((Player)ent, Sound.ENTITY_GENERIC_EXTINGUISH_FIRE, 1.0f, 1.0f);
//ent.getWorld().spawnParticle(Particle.LAVA, ent.getEyeLocation(), CustomDamage.GetHeartAmount(Buff.getBuff(ent, "SHRAPNEL").getAmplifier())*5);
Bukkit.getScheduler().runTaskLater(TwosideKeeper.plugin, ()->{
if (ent!=null) {
CustomDamage.ApplyDamage((Buff.getBuff(ent, "BLEEDING").getAmplifier()), null, ent, null, "Bleeding", CustomDamage.IGNOREDODGE|CustomDamage.TRUEDMG|CustomDamage.IGNORE_DAMAGE_TICK);
}, 10); //Bleeding DOT is twice as fast.
les.lastBleedingTick=TwosideKeeper.getServerTickTime();
//SoundUtils.playLocalSound((Player)ent, Sound.ENTITY_GENERIC_EXTINGUISH_FIRE, 1.0f, 1.0f);
//ent.getWorld().spawnParticle(Particle.LAVA, ent.getEyeLocation(), CustomDamage.GetHeartAmount(Buff.getBuff(ent, "SHRAPNEL").getAmplifier())*5);
Bukkit.getScheduler().runTaskLater(TwosideKeeper.plugin, ()->{
if (ent!=null) {
CustomDamage.ApplyDamage((Buff.getBuff(ent, "BLEEDING").getAmplifier()), null, ent, null, "Bleeding", CustomDamage.IGNOREDODGE|CustomDamage.TRUEDMG|CustomDamage.IGNORE_DAMAGE_TICK);
}
}, 10); //Bleeding DOT is twice as fast.
}
}, (int)(Math.random()*10));
}
if (Buff.hasBuff(ent, "INFECTION") && les.lastInfectionTick<=TwosideKeeper.getServerTickTime()) {
Bukkit.getScheduler().runTaskLater(TwosideKeeper.plugin, ()->{
CustomDamage.ApplyDamage(Buff.getBuff(ent, "INFECTION").getAmplifier(), null, ent, null, "Infection", CustomDamage.IGNOREDODGE|CustomDamage.TRUEDMG|CustomDamage.IGNORE_DAMAGE_TICK);
les.lastInfectionTick=TwosideKeeper.getServerTickTime();
infectNearbyEntities(ent,les.buffs);
if (ent!=null) {
CustomDamage.ApplyDamage(Buff.getBuff(ent, "INFECTION").getAmplifier(), null, ent, null, "Infection", CustomDamage.IGNOREDODGE|CustomDamage.TRUEDMG|CustomDamage.IGNORE_DAMAGE_TICK);
les.lastInfectionTick=TwosideKeeper.getServerTickTime();
infectNearbyEntities(ent,les.buffs);
}
}, (int)(Math.random()*10));
}
if (Buff.hasBuff(ent, "CRIPPLE") && ent.getAttribute(Attribute.GENERIC_MOVEMENT_SPEED).getBaseValue()>=les.original_movespd*(1-(Buff.getBuff(ent,"CRIPPLE").getAmplifier()*0.1))) {
@ -438,10 +464,17 @@ final class runServerHeartbeat implements Runnable {
}
if (Buff.hasBuff(ent, "BURN") && les.lastBurnTick<=TwosideKeeper.getServerTickTime()) {
Bukkit.getScheduler().runTaskLater(TwosideKeeper.plugin, ()->{
CustomDamage.ApplyDamage(Buff.getBuff(ent, "BURN").getAmplifier(), null, ent, null, "Burn", CustomDamage.IGNOREDODGE|CustomDamage.TRUEDMG|CustomDamage.IGNORE_DAMAGE_TICK);
les.lastBurnTick=TwosideKeeper.getServerTickTime();
if (ent!=null) {
CustomDamage.ApplyDamage(Buff.getBuff(ent, "BURN").getAmplifier(), null, ent, null, "Burn", CustomDamage.IGNOREDODGE|CustomDamage.TRUEDMG|CustomDamage.IGNORE_DAMAGE_TICK);
les.lastBurnTick=TwosideKeeper.getServerTickTime();
}
}, (int)(Math.random()*10));
}
/*if (TemporaryBlock.isInRangeOfSpecialBlock(ent.getLocation(), 3, "FIRECESSPOOL")) {
//TwosideKeeper.log("In range.", 0);
SoundUtils.playGlobalSound(ent.getLocation(), Sound.BLOCK_FIRE_AMBIENT, 1.0f, 1.0f);
Buff.addBuff(ent, "BURN", new Buff("Burn", 20*5, 1, org.bukkit.Color.ORANGE, ChatColor.AQUA+"", false),true);
}*/
}
}