Typos
This commit is contained in:
parent
d5fc1f32c3
commit
1591c1592a
|
@ -28,7 +28,7 @@ public class KitUndeadSummoner extends KitCastleSiege
|
||||||
click(false, "your eggs to spawn undead mobs to help you fight")
|
click(false, "your eggs to spawn undead mobs to help you fight")
|
||||||
};
|
};
|
||||||
|
|
||||||
private static final String REDUCE_COOLDOWN = reduceCooldown("Undead Potions", 2);
|
private static final String REDUCE_COOLDOWN = reduceCooldown("Undead Eggs", 2);
|
||||||
|
|
||||||
private static final MobPotion SILVER_FISH = new MobPotion(
|
private static final MobPotion SILVER_FISH = new MobPotion(
|
||||||
new ItemBuilder(Material.MONSTER_EGG, UtilEnt.getEntityEggData(EntityType.SLIME))
|
new ItemBuilder(Material.MONSTER_EGG, UtilEnt.getEntityEggData(EntityType.SLIME))
|
||||||
|
|
|
@ -10,6 +10,7 @@ import org.bukkit.entity.LivingEntity;
|
||||||
import org.bukkit.entity.Player;
|
import org.bukkit.entity.Player;
|
||||||
import org.bukkit.entity.Slime;
|
import org.bukkit.entity.Slime;
|
||||||
import org.bukkit.event.EventHandler;
|
import org.bukkit.event.EventHandler;
|
||||||
|
import org.bukkit.event.entity.EntityDamageEvent.DamageCause;
|
||||||
import org.bukkit.event.entity.EntityDeathEvent;
|
import org.bukkit.event.entity.EntityDeathEvent;
|
||||||
import org.bukkit.event.entity.EntityTargetEvent;
|
import org.bukkit.event.entity.EntityTargetEvent;
|
||||||
import org.bukkit.event.player.PlayerInteractEvent;
|
import org.bukkit.event.player.PlayerInteractEvent;
|
||||||
|
@ -18,7 +19,6 @@ import org.bukkit.potion.PotionEffect;
|
||||||
import org.bukkit.potion.PotionEffectType;
|
import org.bukkit.potion.PotionEffectType;
|
||||||
import org.bukkit.util.Vector;
|
import org.bukkit.util.Vector;
|
||||||
|
|
||||||
import mineplex.core.common.util.UtilAlg;
|
|
||||||
import mineplex.core.common.util.UtilPlayer;
|
import mineplex.core.common.util.UtilPlayer;
|
||||||
import mineplex.core.common.util.UtilTime;
|
import mineplex.core.common.util.UtilTime;
|
||||||
import mineplex.core.recharge.Recharge;
|
import mineplex.core.recharge.Recharge;
|
||||||
|
@ -44,7 +44,7 @@ public class PerkMobPotions extends Perk
|
||||||
|
|
||||||
public PerkMobPotions(long cooldown, MobPotion... mobPotions)
|
public PerkMobPotions(long cooldown, MobPotion... mobPotions)
|
||||||
{
|
{
|
||||||
super("Mob Potions");
|
super("Mob Egg");
|
||||||
|
|
||||||
_cooldown = cooldown;
|
_cooldown = cooldown;
|
||||||
_mobPotions = mobPotions;
|
_mobPotions = mobPotions;
|
||||||
|
@ -89,7 +89,7 @@ public class PerkMobPotions extends Perk
|
||||||
|
|
||||||
event.setCancelled(true);
|
event.setCancelled(true);
|
||||||
|
|
||||||
if (!Recharge.Instance.use(player, GetName(), COOLDOWN, false, false) || !Recharge.Instance.use(player, ChatColor.stripColor(clickedPotion.getItemStack().getItemMeta().getDisplayName()), _cooldown, true, true))
|
if (!Recharge.Instance.use(player, GetName(), COOLDOWN, true, false) || !Recharge.Instance.use(player, ChatColor.stripColor(clickedPotion.getItemStack().getItemMeta().getDisplayName()), _cooldown, true, true))
|
||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -207,6 +207,29 @@ public class PerkMobPotions extends Perk
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@EventHandler
|
||||||
|
public void updateDamage(UpdateEvent event)
|
||||||
|
{
|
||||||
|
if (event.getType() != UpdateType.FAST)
|
||||||
|
{
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
for (SummonedEntity entity : _entities)
|
||||||
|
{
|
||||||
|
// Slimes are weird and don't damage players normally.
|
||||||
|
if (entity.Summoned instanceof Slime)
|
||||||
|
{
|
||||||
|
LivingEntity target = entity.Summoned;
|
||||||
|
|
||||||
|
for (Player player : UtilPlayer.getNearby(target.getLocation(), 2))
|
||||||
|
{
|
||||||
|
Manager.GetDamage().NewDamageEvent(player, entity.Owner, null, DamageCause.CUSTOM, 2, true, true, false, entity.Summoned.getCustomName(), "Minion");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
public MobPotion[] getMobPotions()
|
public MobPotion[] getMobPotions()
|
||||||
{
|
{
|
||||||
return _mobPotions;
|
return _mobPotions;
|
||||||
|
|
|
@ -253,6 +253,7 @@ public class ProgressingKitManager implements Listener
|
||||||
|
|
||||||
if (!game.InProgress() || !(kit instanceof ProgressingKit))
|
if (!game.InProgress() || !(kit instanceof ProgressingKit))
|
||||||
{
|
{
|
||||||
|
player.sendMessage("No in progress");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -277,6 +278,7 @@ public class ProgressingKitManager implements Listener
|
||||||
|
|
||||||
if (game.SplitKitXP || dataList == null)
|
if (game.SplitKitXP || dataList == null)
|
||||||
{
|
{
|
||||||
|
player.sendMessage("Adding data");
|
||||||
addData(player, game, (ProgressingKit) kit);
|
addData(player, game, (ProgressingKit) kit);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -323,6 +325,7 @@ public class ProgressingKitManager implements Listener
|
||||||
|
|
||||||
if (dataList == null || xpGained == null)
|
if (dataList == null || xpGained == null)
|
||||||
{
|
{
|
||||||
|
player.sendMessage("dataList=" + (dataList == null) + " xpGained=" + (xpGained == null));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue