Merge branch 'master' of ssh://184.154.0.242:7999/min/Mineplex
This commit is contained in:
commit
dc5584d51b
@ -28,8 +28,6 @@ import org.bukkit.event.entity.EntityDamageEvent.DamageCause;
|
||||
|
||||
public class StaticLazer extends SkillChargeSword
|
||||
{
|
||||
private NautHashMap<Player, Float> _chargeStore = new NautHashMap<Player, Float>();
|
||||
|
||||
public StaticLazer(SkillFactory skills, String name,
|
||||
ClassType classType, SkillType skillType,
|
||||
int cost, int maxLevel)
|
||||
@ -107,7 +105,7 @@ public class StaticLazer extends SkillChargeSword
|
||||
|
||||
//Damage Event
|
||||
Factory.Damage().NewDamageEvent(other, player, null,
|
||||
DamageCause.CUSTOM, 2 + (5 + level) * hit.get(other), true, true, false,
|
||||
DamageCause.CUSTOM, (2 + (5 + level) * hit.get(other)) * charge, true, true, false,
|
||||
player.getName(), GetName());
|
||||
|
||||
}
|
||||
@ -117,8 +115,6 @@ public class StaticLazer extends SkillChargeSword
|
||||
|
||||
//Effect
|
||||
player.getWorld().playSound(player.getEyeLocation(), Sound.ZOMBIE_REMEDY, 0.5f + player.getExp(), 1.75f - charge);
|
||||
|
||||
_chargeStore.put(player, charge);
|
||||
}
|
||||
|
||||
@EventHandler(priority = EventPriority.NORMAL)
|
||||
|
@ -5,7 +5,9 @@ import mineplex.core.recharge.Recharge;
|
||||
import mineplex.core.updater.UpdateType;
|
||||
import mineplex.core.updater.event.UpdateEvent;
|
||||
import mineplex.minecraft.game.classcombat.Class.IPvpClass.ClassType;
|
||||
import mineplex.minecraft.game.classcombat.Skill.event.SkillTriggerEvent;
|
||||
|
||||
import org.bukkit.Bukkit;
|
||||
import org.bukkit.entity.Player;
|
||||
import org.bukkit.event.EventHandler;
|
||||
import org.bukkit.event.EventPriority;
|
||||
@ -58,6 +60,13 @@ public abstract class SkillChargeSword extends SkillCharge implements Listener
|
||||
if (!_canChargeInWater && cur.getLocation().getBlock().isLiquid())
|
||||
continue;
|
||||
|
||||
//Check Allowed
|
||||
SkillTriggerEvent triggerEvent = new SkillTriggerEvent(cur, GetName(), GetClassType());
|
||||
Bukkit.getServer().getPluginManager().callEvent(triggerEvent);
|
||||
|
||||
if (triggerEvent.IsCancelled())
|
||||
continue;
|
||||
|
||||
//Recharged Check (uses recharge upon activation)
|
||||
if (!_charge.containsKey(cur))
|
||||
if (!Recharge.Instance.usable(cur, GetName()))
|
||||
|
@ -333,7 +333,7 @@ public class Paintball extends TeamGame
|
||||
|
||||
player.setVelocity(new Vector(0,1.2,0));
|
||||
|
||||
_doubles.put(player, new PlayerCopy(this, player));
|
||||
_doubles.put(player, new PlayerCopy(this, player, GetTeam(player).GetColor()));
|
||||
}
|
||||
|
||||
// @EventHandler
|
||||
|
@ -19,7 +19,7 @@ public class PlayerCopy
|
||||
private Skeleton _ent;
|
||||
private Player _owner;
|
||||
|
||||
public PlayerCopy(Game host, Player owner)
|
||||
public PlayerCopy(Game host, Player owner, ChatColor nameColor)
|
||||
{
|
||||
Host = host;
|
||||
|
||||
@ -36,7 +36,7 @@ public class PlayerCopy
|
||||
//Armor
|
||||
_ent.getEquipment().setArmorContents(owner.getInventory().getArmorContents());
|
||||
|
||||
_ent.setCustomName(C.cWhite + C.Bold + C.Scramble + "XX" + ChatColor.RESET + " " + C.cYellow + owner.getName() + " " + C.cWhite + C.Bold + C.Scramble + "XX");
|
||||
_ent.setCustomName(C.cWhite + C.Bold + C.Scramble + "XX" + ChatColor.RESET + " " + nameColor + owner.getName() + " " + C.cWhite + C.Bold + C.Scramble + "XX");
|
||||
_ent.setCustomNameVisible(true);
|
||||
|
||||
//Disguise
|
||||
|
@ -540,7 +540,7 @@ public class WitherGame extends TeamGame implements IBlockRestorer
|
||||
|
||||
player.setVelocity(new Vector(0,1.2,0));
|
||||
|
||||
_doubles.put(player, new PlayerCopy(this, player));
|
||||
_doubles.put(player, new PlayerCopy(this, player, ChatColor.YELLOW));
|
||||
}
|
||||
|
||||
public void playerIn(final Player player, final LivingEntity copy)
|
||||
|
Loading…
Reference in New Issue
Block a user