From 02cd9ad28d087d699142511d105dd7c0599c4772 Mon Sep 17 00:00:00 2001 From: taoneill Date: Sun, 20 Mar 2011 21:54:06 -0400 Subject: [PATCH] Closes gh-93. Closes gh-104. Closes gh-105. Placing a team spawn over signs doens't cause sign spam anymore. Fixed player remaining on fire after score cap reached. Made wall trigger distance 6 blocks instead of 5 in last commit. --- war/src/main/java/com/tommytony/war/Warzone.java | 2 ++ .../com/tommytony/war/jobs/ScoreCapReachedJob.java | 11 ++--------- .../main/java/com/tommytony/war/volumes/Volume.java | 6 +++--- 3 files changed, 7 insertions(+), 12 deletions(-) diff --git a/war/src/main/java/com/tommytony/war/Warzone.java b/war/src/main/java/com/tommytony/war/Warzone.java index 76f7a6b..455de2c 100644 --- a/war/src/main/java/com/tommytony/war/Warzone.java +++ b/war/src/main/java/com/tommytony/war/Warzone.java @@ -398,6 +398,8 @@ public class Warzone { // Fill hp player.setHealth(20); + player.setFireTicks(0); + player.setRemainingAir(300); // Teleport the player back to spawn // Location playerLoc = player.getLocation(); diff --git a/war/src/main/java/com/tommytony/war/jobs/ScoreCapReachedJob.java b/war/src/main/java/com/tommytony/war/jobs/ScoreCapReachedJob.java index 28ccde3..b63938f 100644 --- a/war/src/main/java/com/tommytony/war/jobs/ScoreCapReachedJob.java +++ b/war/src/main/java/com/tommytony/war/jobs/ScoreCapReachedJob.java @@ -1,7 +1,6 @@ package com.tommytony.war.jobs; import org.bukkit.entity.Player; -import org.bukkit.inventory.PlayerInventory; import com.tommytony.war.Team; import com.tommytony.war.Warzone; @@ -9,7 +8,6 @@ import com.tommytony.war.Warzone; public class ScoreCapReachedJob implements Runnable { private final Warzone zone; - private boolean giveReward; private final String winnersStr; public ScoreCapReachedJob(Warzone zone, String winnersStr) { @@ -22,6 +20,8 @@ public class ScoreCapReachedJob implements Runnable { t.teamcast(winnersStr); for(Player tp : t.getPlayers()) { tp.teleportTo(zone.getTeleport()); // TODO: change this to a more general rally point (which will enable linking zones together) + tp.setFireTicks(0); + tp.setRemainingAir(300); if(zone.hasPlayerInventory(tp.getName())){ zone.restorePlayerInventory(tp); } @@ -36,11 +36,4 @@ public class ScoreCapReachedJob implements Runnable { t.getPlayers().clear(); // empty the team } } - - public void giveReward(boolean giveReward) { - this.giveReward = giveReward; - // TODO Auto-generated method stub - - } - } diff --git a/war/src/main/java/com/tommytony/war/volumes/Volume.java b/war/src/main/java/com/tommytony/war/volumes/Volume.java index 58c0476..ae0e659 100644 --- a/war/src/main/java/com/tommytony/war/volumes/Volume.java +++ b/war/src/main/java/com/tommytony/war/volumes/Volume.java @@ -400,15 +400,15 @@ public class Volume { if(hasTwoCorners() && getBlockTypes() != null) { int x = getMinX(); for(int i = 0; i < getSizeX(); i++){ - int y = getMinY(); - for(int j = 0; j < getSizeY(); j++){ + int y = getMaxY(); + for(int j = getSizeY(); j > 0; j--){ int z = getMinZ(); for(int k = 0;k < getSizeZ(); k++) { Block currentBlock = getWorld().getBlockAt(x, y, z); currentBlock.setType(material); z++; } - y++; + y--; } x++; }