Merge branch 'Myst_EVO'
This commit is contained in:
commit
191392825f
@ -25,7 +25,6 @@ import mineplex.core.recharge.Recharge;
|
||||
import mineplex.core.updater.UpdateType;
|
||||
import mineplex.core.updater.event.UpdateEvent;
|
||||
import mineplex.minecraft.game.core.combat.CombatComponent;
|
||||
import mineplex.minecraft.game.core.combat.DeathMessageType;
|
||||
import mineplex.minecraft.game.core.combat.CombatManager.AttackReason;
|
||||
import mineplex.minecraft.game.core.combat.DeathMessageType;
|
||||
import mineplex.minecraft.game.core.combat.event.CombatDeathEvent;
|
||||
@ -74,6 +73,7 @@ import org.bukkit.event.entity.EntityCombustEvent;
|
||||
import org.bukkit.event.entity.PlayerDeathEvent;
|
||||
import org.bukkit.event.player.PlayerInteractEvent;
|
||||
import org.bukkit.event.player.PlayerItemHeldEvent;
|
||||
import org.bukkit.event.player.PlayerQuitEvent;
|
||||
import org.bukkit.util.Vector;
|
||||
|
||||
public class Evolution extends SoloGame
|
||||
@ -223,6 +223,12 @@ public class Evolution extends SoloGame
|
||||
upgradeKit(event.GetPlayer(), false);
|
||||
}
|
||||
|
||||
@EventHandler
|
||||
public void removeToken(PlayerQuitEvent event)
|
||||
{
|
||||
_tokens.remove(event.getPlayer().getName());
|
||||
}
|
||||
|
||||
// //Double Kit
|
||||
// @EventHandler(priority = EventPriority.MONITOR)
|
||||
// public void storeTokens(GameStateChangeEvent event)
|
||||
@ -369,9 +375,12 @@ public class Evolution extends SoloGame
|
||||
}
|
||||
}
|
||||
|
||||
@EventHandler
|
||||
@EventHandler(priority = EventPriority.MONITOR)
|
||||
public void onDamage(CustomDamageEvent event)
|
||||
{
|
||||
if (event.IsCancelled())
|
||||
return;
|
||||
|
||||
if (!IsLive())
|
||||
return;
|
||||
|
||||
@ -747,7 +756,11 @@ public class Evolution extends SoloGame
|
||||
|
||||
for (int i = 0 ; i < tokens.size() ; i++)
|
||||
{
|
||||
players.add(tokens.get(i).Player);
|
||||
Player cur = tokens.get(i).Player;
|
||||
if (!cur.isOnline())
|
||||
continue;
|
||||
|
||||
players.add(cur);
|
||||
}
|
||||
|
||||
//Award Gems
|
||||
|
@ -61,7 +61,7 @@ public class KitHealth extends Kit
|
||||
if (!Manager.GetGame().IsLive())
|
||||
return;
|
||||
|
||||
Player killer = UtilPlayer.searchExact(event.GetLog().GetPlayer().GetName());
|
||||
Player killer = UtilPlayer.searchExact(event.GetLog().GetKiller().GetName());
|
||||
if (killer == null || !killer.isOnline())
|
||||
return;
|
||||
|
||||
@ -74,6 +74,6 @@ public class KitHealth extends Kit
|
||||
if (!HasKit(killer))
|
||||
return;
|
||||
|
||||
killer.setHealth(killer.getMaxHealth());
|
||||
UtilPlayer.health(killer, 9999);
|
||||
}
|
||||
}
|
||||
|
@ -1,6 +1,7 @@
|
||||
package nautilus.game.arcade.game.games.evolution.mobs;
|
||||
|
||||
import mineplex.core.common.util.C;
|
||||
import mineplex.core.common.util.UtilBlock;
|
||||
import mineplex.core.common.util.UtilEvent;
|
||||
import mineplex.core.common.util.UtilEvent.ActionType;
|
||||
import mineplex.core.common.util.UtilGear;
|
||||
@ -66,6 +67,9 @@ public class KitChicken extends EvoKit
|
||||
if (!UtilEvent.isAction(event, ActionType.R))
|
||||
return;
|
||||
|
||||
if (UtilBlock.usable(event.getClickedBlock()))
|
||||
return;
|
||||
|
||||
if (!Manager.GetGame().IsLive())
|
||||
return;
|
||||
|
||||
|
@ -55,6 +55,9 @@ public class PerkBounceEVO extends Perk
|
||||
|
||||
if (!UtilEvent.isAction(event, ActionType.R))
|
||||
return;
|
||||
|
||||
if (UtilBlock.usable(event.getClickedBlock()))
|
||||
return;
|
||||
|
||||
if (UtilBlock.usable(event.getClickedBlock()))
|
||||
return;
|
||||
|
@ -65,6 +65,9 @@ public class PerkDoubleJumpEVO extends Perk
|
||||
|
||||
if (player.getGameMode() == GameMode.CREATIVE)
|
||||
return;
|
||||
|
||||
event.setCancelled(true);
|
||||
player.setFlying(false);
|
||||
|
||||
EvolutionAbilityUseEvent useEvent = new EvolutionAbilityUseEvent(player, GetName(), 0);
|
||||
Bukkit.getServer().getPluginManager().callEvent(useEvent);
|
||||
@ -72,9 +75,6 @@ public class PerkDoubleJumpEVO extends Perk
|
||||
if (useEvent.isCancelled())
|
||||
return;
|
||||
|
||||
event.setCancelled(true);
|
||||
player.setFlying(false);
|
||||
|
||||
//Disable Flight
|
||||
player.setAllowFlight(false);
|
||||
|
||||
|
@ -5,6 +5,7 @@ import java.util.Map.Entry;
|
||||
|
||||
import mineplex.core.common.util.C;
|
||||
import mineplex.core.common.util.NautHashMap;
|
||||
import mineplex.core.common.util.UtilBlock;
|
||||
import mineplex.core.common.util.UtilEvent;
|
||||
import mineplex.core.common.util.UtilPlayer;
|
||||
import mineplex.core.common.util.UtilTime;
|
||||
@ -49,6 +50,9 @@ public class PerkFlamingSwordEVO extends Perk
|
||||
if (!UtilEvent.isAction(event, ActionType.R))
|
||||
return;
|
||||
|
||||
if (UtilBlock.usable(event.getClickedBlock()))
|
||||
return;
|
||||
|
||||
if (!Manager.GetGame().IsLive())
|
||||
return;
|
||||
|
||||
|
@ -71,6 +71,9 @@ public class PerkSiesmicSlamEVO extends Perk
|
||||
if (!UtilEvent.isAction(event, ActionType.R))
|
||||
return;
|
||||
|
||||
if (UtilBlock.usable(event.getClickedBlock()))
|
||||
return;
|
||||
|
||||
if (!UtilInv.IsItem(event.getItem(), Material.IRON_INGOT, (byte) 0))
|
||||
return;
|
||||
|
||||
|
@ -2,6 +2,7 @@ package nautilus.game.arcade.game.games.evolution.mobs.perks;
|
||||
|
||||
import mineplex.core.common.util.F;
|
||||
import mineplex.core.common.util.UtilAction;
|
||||
import mineplex.core.common.util.UtilBlock;
|
||||
import mineplex.core.common.util.UtilEnt;
|
||||
import mineplex.core.common.util.UtilEvent;
|
||||
import mineplex.core.common.util.UtilEvent.ActionType;
|
||||
@ -55,6 +56,9 @@ public class PerkSulphurBombEVO extends Perk implements IThrown
|
||||
if (!UtilEvent.isAction(event, ActionType.R))
|
||||
return;
|
||||
|
||||
if (UtilBlock.usable(event.getClickedBlock()))
|
||||
return;
|
||||
|
||||
if (!UtilInv.IsItem(event.getItem(), Material.SULPHUR, (byte) 0))
|
||||
return;
|
||||
|
||||
|
@ -1,6 +1,7 @@
|
||||
package nautilus.game.arcade.game.games.evolution.mobs.perks;
|
||||
|
||||
import mineplex.core.common.util.UtilAction;
|
||||
import mineplex.core.common.util.UtilBlock;
|
||||
import mineplex.core.common.util.UtilEvent;
|
||||
import mineplex.core.common.util.UtilEvent.ActionType;
|
||||
import mineplex.core.common.util.UtilInv;
|
||||
@ -39,6 +40,9 @@ public class PerkWebEVO extends Perk implements IThrown
|
||||
if (!UtilEvent.isAction(event, ActionType.R))
|
||||
return;
|
||||
|
||||
if (UtilBlock.usable(event.getClickedBlock()))
|
||||
return;
|
||||
|
||||
if (!Manager.GetGame().IsLive())
|
||||
return;
|
||||
|
||||
@ -109,7 +113,11 @@ public class PerkWebEVO extends Perk implements IThrown
|
||||
public void Web(ProjectileUser data)
|
||||
{
|
||||
Location loc = data.GetThrown().getLocation();
|
||||
|
||||
data.GetThrown().remove();
|
||||
|
||||
if (loc.getBlock().getType() != Material.AIR)
|
||||
return;
|
||||
|
||||
Manager.GetBlockRestore().Add(loc.getBlock(), 30, (byte)0, 4000);
|
||||
}
|
||||
|
@ -29,6 +29,9 @@ public class NoAbilityTracker extends StatTracker<Evolution>
|
||||
@EventHandler(priority = EventPriority.MONITOR)
|
||||
public void onEvolutionAbility(EvolutionAbilityUseEvent event)
|
||||
{
|
||||
if (event.isCancelled())
|
||||
return;
|
||||
|
||||
if (!getGame().IsLive())
|
||||
return;
|
||||
|
||||
|
@ -849,11 +849,16 @@ public class GameFlagManager implements Listener
|
||||
|
||||
if (game.HungerSet != -1)
|
||||
for (Player player : game.GetPlayers(true))
|
||||
{
|
||||
player.setFoodLevel(game.HungerSet);
|
||||
player.setSaturation(1F);
|
||||
}
|
||||
|
||||
if (game.HealthSet != -1)
|
||||
for (Player player : game.GetPlayers(true))
|
||||
{
|
||||
player.setHealth(game.HealthSet);
|
||||
}
|
||||
}
|
||||
|
||||
@EventHandler(priority = EventPriority.LOWEST)
|
||||
|
Loading…
Reference in New Issue
Block a user