mirror of
https://github.com/darksaid98/AlathranWars.git
synced 2026-12-02 06:28:52 +00:00
fix and complete teleportation and withdrawal during raid/siege
This commit is contained in:
1 parent
6586d92046
commit
63bf909b0c
2 files changed
+108
-39
No files matched your search
@@ -852,14 +852,16 @@ public class Raid {
|
||||
final int homeBlockXCoordRaided = Raid.this.getRaidedTown().getHomeBlock().getCoord().getX() * 16;
|
||||
final int homeBlockZCoordRaided = Raid.this.getRaidedTown().getHomeBlock().getCoord().getZ() * 16;
|
||||
Player p = Bukkit.getPlayer(player);
|
||||
//Carryover from sieges
|
||||
if (Math.abs(p.getLocation().getBlockX() - homeBlockXCoordRaided) <= 200 && Math.abs(p.getLocation().getBlockZ() - homeBlockZCoordRaided) <= 200) {
|
||||
playerCloseToHomeBlockRaid = true;
|
||||
}
|
||||
if(p != null) {
|
||||
//Carryover from sieges
|
||||
if (Math.abs(p.getLocation().getBlockX() - homeBlockXCoordRaided) <= 200 && Math.abs(p.getLocation().getBlockZ() - homeBlockZCoordRaided) <= 200) {
|
||||
playerCloseToHomeBlockRaid = true;
|
||||
}
|
||||
|
||||
WorldCoord playercoord = WorldCoord.parseWorldCoord(Bukkit.getPlayer(player));
|
||||
if (Raid.this.getRaidedTown().hasTownBlock(playercoord) || playerCloseToHomeBlockRaid) {
|
||||
startCombat();
|
||||
WorldCoord playercoord = WorldCoord.parseWorldCoord(Bukkit.getPlayer(player));
|
||||
if (Raid.this.getRaidedTown().hasTownBlock(playercoord) || playerCloseToHomeBlockRaid) {
|
||||
startCombat();
|
||||
}
|
||||
}
|
||||
} catch (TownyException e) {
|
||||
e.printStackTrace();
|
||||
|
||||
Reference in new issue
Block a user