Permalink
Browse files

v0.7.20.0 - feature freeze

  • Loading branch information...
1 parent 63cfaf8 commit 9cbb61532b66d69e7879b14d3e53fe6c515b3eab @slipcor committed May 2, 2012
View
@@ -30,7 +30,7 @@ A PVP experience enhancing plugin.
=== Dependencies
-* CraftBukkit Beta 1.2.3-R0.2
+* CraftBukkit Beta 1.2.5-R1.0
-----------------------------------------------------------------------------------------------------------------------
@@ -46,6 +46,8 @@ A PVP experience enhancing plugin.
=== Changelog
+* v0.7.20.0 - feature freeze, future updates will just add/update modules or fix bugs
+* v0.7.19.5 - fix messy code about random spawns
* v0.7.19.4 - fix teams/ctf/pumpkin spawn setting not working
* v0.7.19.3 - fix region NPE
* v0.7.19.2 - fix missing messages
View
@@ -1,4 +1,4 @@
-== PVP-Arena v1 Changelog
+== PVP-Arena v0.1 Changelog
* v0.1.13 - place bets on a match
* v0.1.12 - display stats with /pa users | /pa teams
View
@@ -1,4 +1,4 @@
-== PVP-Arena v2 Changelog
+== PVP-Arena v0.2 Changelog
* v0.2.1 - cleanup, comments, iConomy 6 support
* v0.2.0 - language support
View
@@ -1,4 +1,4 @@
-== PVP-Arena v3 Changelog
+== PVP-Arena v0.3 Changelog
* v0.3.14 - timed arena modes
* v0.3.13 - Telepass via Permission
View
@@ -1,4 +1,4 @@
-== PVP-Arena v4 Changelog
+== PVP-Arena v0.4 Changelog
* v0.4.4 - Random spawns per team, not shared
* v0.4.3 - max / min bet
View
@@ -1,4 +1,4 @@
-== PVP-Arena v5 Changelog
+== PVP-Arena v0.5 Changelog
* v0.5.11 - CTF flag bug, command error msg improvement
* v0.5.10 - fight temp perms, custom class drops, spectate fix
View
@@ -1,4 +1,4 @@
-== PVP-Arena v6 Changelog
+== PVP-Arena v0.6 Changelog
* v0.6.41.1 - fix the Potion Type NPE
* v0.6.41.0 - possibility to customize the Arena prefix
@@ -911,11 +911,6 @@ public void respawnPlayer(Player player, int lives, DamageCause cause,
type.parseRespawn(player, team, lives, cause, damager);
- if (!type.allowsRandomSpawns() && !team.getName().equals("free")) {
- tpPlayerToCoordName(player, team.getName() + "spawn");
- } else {
- tpPlayerToCoordName(player, "spawn");
- }
player.setFireTicks(0);
player.setNoDamageTicks(60);
EntityListener.addBurningPlayer(player);
@@ -1004,15 +999,10 @@ public void teleportAllToSpawn() {
db.i("teleporting all players to their spawns");
for (ArenaTeam team : teams) {
for (ArenaPlayer ap : team.getTeamMembers()) {
- try {
- Thread.sleep(30);
- } catch (InterruptedException e) {
- e.printStackTrace();
- }
- if (!type.allowsRandomSpawns()) {
- tpPlayerToCoordName(ap.get(), team.getName() + "spawn");
- } else {
+ if (team.getName().equals("free")) {
tpPlayerToCoordName(ap.get(), "spawn");
+ } else {
+ tpPlayerToCoordName(ap.get(), team.getName() + "spawn");
}
ap.setStatus(Status.FIGHT);
playerCount++;
@@ -28,76 +28,49 @@
public TeamArena() {
super("teams");
}
-
+
@Override
public String version() {
return "v0.7.10.6";
}
@Override
public String checkSpawns(Set<String> list) {
- if (allowsRandomSpawns()) {
-
- // now we need 1 spawn and a lounge for every team
-
- db.i("parsing random");
-
- Iterator<String> iter = list.iterator();
- int spawns = 0;
- int lounges = 0;
- while (iter.hasNext()) {
- String s = iter.next();
- db.i("parsing '" + s + "'");
- if (s.equals("lounge"))
- continue; // skip
- if (s.startsWith("spawn"))
- spawns++;
- if (s.endsWith("lounge"))
- lounges++;
- }
- if (spawns > 3 && lounges >= arena.getTeams().size()) {
- return null;
- }
-
- return spawns + "/" + 4 + "x spawn ; " + lounges + "/"
- + arena.getTeams().size() + "x lounge";
- } else {
- // not random! we need teams * 2 (lounge + spawn) + exit + spectator
- db.i("parsing not random");
- Iterator<String> iter = list.iterator();
- int spawns = 0;
- int lounges = 0;
- HashSet<String> setTeams = new HashSet<String>();
- while (iter.hasNext()) {
- String s = iter.next();
- db.i("parsing '" + s + "'");
- db.i("spawns: " + spawns + "; lounges: " + lounges);
- if (s.endsWith("spawn") && (!s.equals("spawn"))) {
- spawns++;
- } else if (s.endsWith("lounge") && (!s.equals("lounge"))) {
- lounges++;
- } else if (s.contains("spawn") && (!s.equals("spawn"))) {
- String[] temp = s.split("spawn");
- if (Teams.getTeam(arena, temp[0]) != null) {
- if (setTeams.contains(temp[0])) {
- db.i("team already set");
- continue;
- }
- db.i("adding team");
- setTeams.add(temp[0]);
- spawns++;
+ // not random! we need teams * 2 (lounge + spawn) + exit + spectator
+ db.i("parsing not random");
+ Iterator<String> iter = list.iterator();
+ int spawns = 0;
+ int lounges = 0;
+ HashSet<String> setTeams = new HashSet<String>();
+ while (iter.hasNext()) {
+ String s = iter.next();
+ db.i("parsing '" + s + "'");
+ db.i("spawns: " + spawns + "; lounges: " + lounges);
+ if (s.endsWith("spawn") && (!s.equals("spawn"))) {
+ spawns++;
+ } else if (s.endsWith("lounge") && (!s.equals("lounge"))) {
+ lounges++;
+ } else if (s.contains("spawn") && (!s.equals("spawn"))) {
+ String[] temp = s.split("spawn");
+ if (Teams.getTeam(arena, temp[0]) != null) {
+ if (setTeams.contains(temp[0])) {
+ db.i("team already set");
+ continue;
}
+ db.i("adding team");
+ setTeams.add(temp[0]);
+ spawns++;
}
}
- if (spawns == arena.getTeams().size()
- && lounges == arena.getTeams().size()) {
- return null;
- }
-
- return spawns + "/" + arena.getTeams().size() + "x spawn ; "
- + lounges + "/" + arena.getTeams().size() + "x lounge";
-
}
+ if (spawns == arena.getTeams().size()
+ && lounges == arena.getTeams().size()) {
+ return null;
+ }
+
+ return spawns + "/" + arena.getTeams().size() + "x spawn ; " + lounges
+ + "/" + arena.getTeams().size() + "x lounge";
+
}
public void parseRespawn(Player respawnPlayer, ArenaTeam respawnTeam,
@@ -108,5 +81,7 @@ public void parseRespawn(Player respawnPlayer, ArenaTeam respawnTeam,
arena.parseDeathCause(respawnPlayer, cause, damager),
String.valueOf(lives)));
arena.lives.put(respawnPlayer.getName(), lives);
+ arena.tpPlayerToCoordName(respawnPlayer, respawnTeam.getName()
+ + "spawn");
}
}
@@ -48,10 +48,6 @@ public void commit(Arena arena, CommandSender sender, String[] args) {
} else if (args[0].equalsIgnoreCase("exit")) {
Spawns.setCoords(arena, player, "exit");
Arenas.tellPlayer(player, Language.parse("setexit"), arena);
- } else if (arena.type().allowsRandomSpawns()
- && (args[0].startsWith("spawn"))) {
- Spawns.setCoords(arena, player, args[0]);
- Arenas.tellPlayer(player, Language.parse("setspawn", args[0]), arena);
} else {
HashSet<String> spawns = new HashSet<String>();
@@ -50,7 +50,7 @@
*
* @author slipcor
*
- * @version v0.7.11
+ * @version v0.7.19
*
*/
@@ -300,10 +300,10 @@ public void onPlayerInteract(PlayerInteractEvent event) {
return;
}
- if (!arena.type().allowsRandomSpawns()) {
- arena.tpPlayerToCoordName(player, team.getName() + "spawn");
- } else {
+ if (team.getName().equals("free")) {
arena.tpPlayerToCoordName(player, "spawn");
+ } else {
+ arena.tpPlayerToCoordName(player, team.getName() + "spawn");
}
arena.playerCount++;
PVPArena.instance.getAmm().lateJoin(arena, player);
@@ -111,13 +111,6 @@ public boolean allowsJoinInBattle() {
}
/**
- * does the arena type allow random spawns?
- */
- public boolean allowsRandomSpawns() {
- return arena.cfg.getBoolean("arenatype.randomSpawn", false);
- }
-
- /**
* check if the arena match is over
*
* @return true if the match is over
@@ -503,6 +496,7 @@ public void parseMove(Player player) {
*/
public void parseRespawn(Player respawnPlayer, ArenaTeam respawnTeam,
int lives, DamageCause cause, Entity damager) {
+ arena.tpPlayerToCoordName(respawnPlayer, respawnTeam.getName() + "spawn");
return;
}
View
@@ -1,7 +1,7 @@
name: pvparena
author: slipcor
main: net.slipcor.pvparena.PVPArena
-version: 0.7.19.4
+version: 0.7.19.5
website: http://dev.bukkit.org/server-mods/pvp-arena
dev-url: http://dev.bukkit.org/server-mods/pvp-arena
commands:

0 comments on commit 9cbb615

Please sign in to comment.