More fixes
This commit is contained in:
parent
0d7079eae7
commit
c7c8a848b1
@ -1,5 +1,6 @@
|
||||
package nautilus.game.arcade.game.games.castlesiegenew;
|
||||
|
||||
import mineplex.core.common.util.F;
|
||||
import mineplex.core.common.util.UtilPlayer;
|
||||
import mineplex.minecraft.game.core.damage.CustomDamageEvent;
|
||||
import nautilus.game.arcade.events.GameStateChangeEvent;
|
||||
@ -13,6 +14,7 @@ import org.bukkit.entity.Player;
|
||||
import org.bukkit.event.EventHandler;
|
||||
import org.bukkit.event.EventPriority;
|
||||
import org.bukkit.event.Listener;
|
||||
import org.bukkit.event.entity.PlayerDeathEvent;
|
||||
import org.bukkit.event.player.PlayerInteractEntityEvent;
|
||||
import org.bukkit.inventory.ItemStack;
|
||||
|
||||
@ -71,6 +73,7 @@ public class CastleSiegeHorseManager implements Listener
|
||||
|
||||
if (UtilPlayer.isSpectator(player) || !_host.getDefenders().HasPlayer(player))
|
||||
{
|
||||
player.sendMessage(F.main("Game", "You cannot mount horses."));
|
||||
event.setCancelled(true);
|
||||
}
|
||||
else
|
||||
@ -103,4 +106,10 @@ public class CastleSiegeHorseManager implements Listener
|
||||
|
||||
event.SetCancelled("Horse Team Damage");
|
||||
}
|
||||
|
||||
@EventHandler
|
||||
public void playerDeath(PlayerDeathEvent event)
|
||||
{
|
||||
event.getEntity().eject();
|
||||
}
|
||||
}
|
||||
|
@ -37,8 +37,8 @@ public class CastleSiegeKing implements Listener
|
||||
|
||||
private static final int MAX_HEALTH = 40;
|
||||
private static final int DAMAGE_RATE = 400;
|
||||
private static final int KING_PROTECTION_RANGE_SQUARED = 16;
|
||||
private static final int KING_TELEPORT_RANGE_SQUARED = 64;
|
||||
private static final int KING_PROTECTION_RANGE_SQUARED = 4;
|
||||
private static final int KING_TELEPORT_RANGE_SQUARED = 36;
|
||||
|
||||
private final CastleSiegeNew _host;
|
||||
private Location _location;
|
||||
|
@ -78,7 +78,7 @@ public class CastleSiegeNew extends TeamGame
|
||||
private static final int START_TIME = 14000;
|
||||
private static final int UNDEAD_BURN_TIME = 24000;
|
||||
private static final int DEFENDER_WIN_TIME = UNDEAD_BURN_TIME + 100;
|
||||
private static final int WOLF_RESPAWN_TIME = 8;
|
||||
private static final int WOLF_RESPAWN_TIME = 6;
|
||||
private static final long FENCE_NO_CLIP_TIME = TimeUnit.SECONDS.toMillis(2);
|
||||
|
||||
private final Set<Listener> _listeners = new HashSet<>();
|
||||
@ -117,6 +117,7 @@ public class CastleSiegeNew extends TeamGame
|
||||
WorldTimeSet = START_TIME;
|
||||
BlockBreakAllow.add(Material.FENCE.getId());
|
||||
BlockPlaceAllow.add(Material.FENCE.getId());
|
||||
InventoryClick = true;
|
||||
|
||||
registerChatStats(
|
||||
Kills,
|
||||
@ -218,7 +219,7 @@ public class CastleSiegeNew extends TeamGame
|
||||
|
||||
// Convert ticks to milliseconds
|
||||
int timeLeft = (UNDEAD_BURN_TIME - WorldTimeSet) * 50;
|
||||
Scoreboard.write(C.cGoldB + "Sun Rise");
|
||||
Scoreboard.write(C.cGoldB + "Sunrise");
|
||||
|
||||
if (timeLeft > 0)
|
||||
{
|
||||
|
@ -148,7 +148,7 @@ public class CastleSiegeTNTManager implements Listener
|
||||
MapUtil.QuickChangeBlockAt(block.getLocation(), Material.AIR);
|
||||
|
||||
player.sendMessage(F.main("Game", "You picked up " + F.skill("TNT") + "."));
|
||||
player.sendMessage(F.main("Game", "Clicking will detonated yourself."));
|
||||
player.sendMessage(F.main("Game", "Clicking will detonate yourself."));
|
||||
_tntCarrier.put(player, System.currentTimeMillis());
|
||||
}
|
||||
|
||||
|
@ -13,6 +13,7 @@ import mineplex.minecraft.game.core.damage.CustomDamageEvent;
|
||||
import nautilus.game.arcade.game.GameTeam;
|
||||
import org.bukkit.Location;
|
||||
import org.bukkit.Material;
|
||||
import org.bukkit.entity.Entity;
|
||||
import org.bukkit.entity.Player;
|
||||
import org.bukkit.event.EventHandler;
|
||||
import org.bukkit.event.entity.EntityDamageEvent.DamageCause;
|
||||
@ -111,7 +112,9 @@ public class SpawnShieldModule extends Module
|
||||
{
|
||||
if (UtilMath.offsetSquared(player.getLocation(), location) < _velocityRadiusSquared)
|
||||
{
|
||||
UtilAction.velocity(player, UtilAlg.getTrajectory(location, player.getLocation()).setY(0.4));
|
||||
Entity passenger = player.getPassenger();
|
||||
|
||||
UtilAction.velocity(passenger == null ? player : passenger, UtilAlg.getTrajectory(location, player.getLocation()).setY(0.4));
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
@ -80,7 +80,7 @@ public class PerkLeap extends Perk
|
||||
|
||||
Player player = event.getPlayer();
|
||||
|
||||
if (!Kit.HasKit(player))
|
||||
if (!hasPerk(player))
|
||||
return;
|
||||
|
||||
//Check Uses
|
||||
|
Loading…
Reference in New Issue
Block a user