Projects >> war >>bd872be244c0af684be499c38465ba44ea1e6a25

Chunk
Conflicting content
					int currentIndex = (selection.getSelectedIndex() + 1) % (playerWarzone.getExtraLoadouts().keySet().size() + 1);
					selection.setSelectedIndex(currentIndex);
					
<<<<<<< HEAD
					playerWarzone.equipPlayerLoadoutSelection(event.getPlayer(), playerTeam);
=======
					if (currentIndex == 0) {
						if (!playerWarzone.isRespawning(event.getPlayer())) playerWarzone.resetInventory(playerTeam, event.getPlayer(), playerWarzone.getLoadout());
						War.war.msg(event.getPlayer(), "Equipped default loadout.");
					} else {
						int i = 0;
						Iterator it = playerWarzone.getExtraLoadouts().entrySet().iterator();
					    while (it.hasNext()) {
					        Map.Entry pairs = (Map.Entry)it.next();
					        if (i == currentIndex - 1) {
					        	if (!playerWarzone.isRespawning(event.getPlayer())) playerWarzone.resetInventory(playerTeam, event.getPlayer(), (HashMap)pairs.getValue());
								War.war.msg(event.getPlayer(), "Equipped " + pairs.getKey() + " loadout.");
					        }
					        i++;
					    }
					}
>>>>>>> cd158cc9a994f9aff53947f03a4c9e25a52ea4a3
				} else {
					War.war.badMsg(event.getPlayer(), "Can't change loadout after exiting the spawn.");
				}
Solution content
					int currentIndex = (selection.getSelectedIndex() + 1) % (playerWarzone.getExtraLoadouts().keySet().size() + 1);
					selection.setSelectedIndex(currentIndex);
					
					playerWarzone.equipPlayerLoadoutSelection(event.getPlayer(), playerTeam);
				} else {
					War.war.badMsg(event.getPlayer(), "Can't change loadout after exiting the spawn.");
				}
File
WarPlayerListener.java
Developer's decision
Version 1
Kind of conflict
If statement
Method invocation
Chunk
Conflicting content
			}

			Block locationBlock = this.location.getWorld().getBlockAt(this.location.getBlockX(), this.location.getBlockY(), this.location.getBlockZ());
<<<<<<< HEAD
			this.volume.setWorld(this.location.getWorld());
			this.volume.setCornerOne(locationBlock.getFace(back).getFace(left, halfHubWidth).getFace(BlockFace.DOWN));
			this.volume.setCornerTwo(locationBlock.getFace(right, halfHubWidth).getFace(front, hubDepth).getFace(BlockFace.UP, hubHeigth));
=======
			this.volume.setCornerOne(locationBlock.getRelative(back).getRelative(left, halfHubWidth).getRelative(BlockFace.DOWN));
			this.volume.setCornerTwo(locationBlock.getRelative(right, halfHubWidth).getRelative(front, hubDepth).getRelative(BlockFace.UP, hubHeigth));
>>>>>>> cd158cc9a994f9aff53947f03a4c9e25a52ea4a3
			this.volume.saveBlocks();

			// glass floor
Solution content
			}

			Block locationBlock = this.location.getWorld().getBlockAt(this.location.getBlockX(), this.location.getBlockY(), this.location.getBlockZ());

			this.volume.setWorld(this.location.getWorld());
			this.volume.setCornerOne(locationBlock.getRelative(back).getRelative(left, halfHubWidth).getRelative(BlockFace.DOWN));
			this.volume.setCornerTwo(locationBlock.getRelative(right, halfHubWidth).getRelative(front, hubDepth).getRelative(BlockFace.UP, hubHeigth));
			this.volume.saveBlocks();

			// glass floor
File
WarHub.java
Developer's decision
Combination
Kind of conflict
Method invocation
Chunk
Conflicting content
		} else {
		}

		Block zoneGate = this.zoneGateBlocks.get(zone.getName());
<<<<<<< HEAD
		if (zoneGate != null) {
			Block block = zoneGate.getFace(left).getFace(back, 1);
			if (block.getType() != Material.SIGN_POST) {
				block.setType(Material.SIGN_POST);
			}
			block.setData(data);
	
			int zoneCap = 0;
			int zonePlayers = 0;
			for (Team t : zone.getTeams()) {
				zonePlayers += t.getPlayers().size();
				zoneCap += zone.getTeamCap();
			}
			String[] lines = new String[4];
			lines[0] = "Warzone";
			lines[1] = zone.getName();
			lines[2] = zonePlayers + "/" + zoneCap + " players";
			lines[3] = zone.getTeams().size() + " teams";
			SignHelper.setToSign(War.war, block, data, lines);
			War.war.log("Failed to find warhub gate for " + zone.getName() + " warzone.", Level.WARNING);
=======
		Block block = zoneGate.getRelative(left).getRelative(back, 1);
		if (block.getType() != Material.SIGN_POST) {
			block.setType(Material.SIGN_POST);
		}
		block.setData(data);

		int zoneCap = 0;
		int zonePlayers = 0;
		for (Team t : zone.getTeams()) {
			zonePlayers += t.getPlayers().size();
			zoneCap += zone.getTeamCap();
>>>>>>> cd158cc9a994f9aff53947f03a4c9e25a52ea4a3
		}
	}
Solution content
		}

		Block zoneGate = this.zoneGateBlocks.get(zone.getName());
		if (zoneGate != null) {
			Block block = zoneGate.getRelative(left).getRelative(back, 1);
			if (block.getType() != Material.SIGN_POST) {
				block.setType(Material.SIGN_POST);
			}
			block.setData(data);
	
			int zoneCap = 0;
			int zonePlayers = 0;
			for (Team t : zone.getTeams()) {
				zonePlayers += t.getPlayers().size();
				zoneCap += zone.getTeamCap();
			}
			String[] lines = new String[4];
			lines[0] = "Warzone";
			lines[1] = zone.getName();
			lines[2] = zonePlayers + "/" + zoneCap + " players";
			lines[3] = zone.getTeams().size() + " teams";
			SignHelper.setToSign(War.war, block, data, lines);
		} else {
			War.war.log("Failed to find warhub gate for " + zone.getName() + " warzone.", Level.WARNING);
		}
	}
File
WarHub.java
Developer's decision
Combination
Kind of conflict
Array access
For statement
If statement
Method invocation
Variable
Chunk
Conflicting content
		}
		return authors;
	}
<<<<<<< HEAD

	public void equipPlayerLoadoutSelection(Player player, Team playerTeam) {
		LoadoutSelection selection = this.getLoadoutSelections().get(player.getName());
		if (selection != null) {
			int currentIndex = selection.getSelectedIndex();
			if (currentIndex == 0) {
				this.resetInventory(playerTeam, player, this.getLoadout());
				War.war.msg(player, "Equipped default loadout.");
			} else {
				int i = 0;
				Iterator it = this.getExtraLoadouts().entrySet().iterator();
			    while (it.hasNext()) {
			        Map.Entry pairs = (Map.Entry)it.next();
			        if (i == currentIndex - 1) {
						this.resetInventory(playerTeam, player, (HashMap)pairs.getValue());
						War.war.msg(player, "Equipped " + pairs.getKey() + " loadout.");
			        }
			        i++;
			    }
			}
		}
=======
	
	public void setRespawnTimer(int respawnTimer) {
		this.respawnTimer = respawnTimer;
	}

	public int getRespawnTimer() {
		return this.respawnTimer;
>>>>>>> cd158cc9a994f9aff53947f03a4c9e25a52ea4a3
	}
}
Solution content
		}
		return authors;
	}

	public void equipPlayerLoadoutSelection(Player player, Team playerTeam) {
		LoadoutSelection selection = this.getLoadoutSelections().get(player.getName());
		if (selection != null && this.isRespawning(player)) {
			int currentIndex = selection.getSelectedIndex();
			if (currentIndex == 0) {
				this.resetInventory(playerTeam, player, this.getLoadout());
				War.war.msg(player, "Equipped default loadout.");
			} else {
				int i = 0;
				Iterator it = this.getExtraLoadouts().entrySet().iterator();
			    while (it.hasNext()) {
			        Map.Entry pairs = (Map.Entry)it.next();
			        if (i == currentIndex - 1) {
						this.resetInventory(playerTeam, player, (HashMap)pairs.getValue());
						War.war.msg(player, "Equipped " + pairs.getKey() + " loadout.");
			        }
			        i++;
			    }
			}
		}
	}

	public void setRespawnTimer(int respawnTimer) {
		this.respawnTimer = respawnTimer;
	}

	public int getRespawnTimer() {
		return this.respawnTimer;
	}
}
File
Warzone.java
Developer's decision
Manual
Kind of conflict
Attribute
If statement
Method declaration
Method invocation
Method signature
Return statement
Variable
Chunk
Conflicting content
		this.wall = opposite; // a player facing south places a lobby that looks just like a lobby stuck to the north wall

		this.calculateLobbyWidth();
<<<<<<< HEAD
		this.lobbyMiddleWallBlock = new BlockInfo(lobbyWorld.getBlockAt(playerLocation.getBlockX(), playerLocation.getBlockY(), playerLocation.getBlockZ()).getFace(facing, 6));
=======
		this.lobbyMiddleWallBlock = new BlockInfo(this.warzone.getWorld().getBlockAt(playerLocation.getBlockX(), playerLocation.getBlockY(), playerLocation.getBlockZ()).getRelative(facing, 6));
>>>>>>> cd158cc9a994f9aff53947f03a4c9e25a52ea4a3

		Block corner1 = null;
		Block corner2 = null;
Solution content
		this.wall = opposite; // a player facing south places a lobby that looks just like a lobby stuck to the north wall

		this.calculateLobbyWidth();
		this.lobbyMiddleWallBlock = new BlockInfo(lobbyWorld.getBlockAt(playerLocation.getBlockX(), playerLocation.getBlockY(), playerLocation.getBlockZ()).getRelative(facing, 6));

		Block corner1 = null;
		Block corner2 = null;
File
ZoneLobby.java
Developer's decision
Manual
Kind of conflict
Attribute
Method invocation
Chunk
Conflicting content
			}

			// set zone tp
<<<<<<< HEAD
			this.zoneTeleportBlock = new BlockInfo(BlockInfo.getBlock(this.volume.getWorld(), this.lobbyMiddleWallBlock).getFace(this.wall, 6));
=======
			this.zoneTeleportBlock = new BlockInfo(BlockInfo.getBlock(this.warzone.getWorld(), this.lobbyMiddleWallBlock).getRelative(this.wall, 6));
>>>>>>> cd158cc9a994f9aff53947f03a4c9e25a52ea4a3
			int yaw = 0;
			if (this.wall == BlockFace.WEST) {
				yaw = 180;
Solution content
			}

			// set zone tp
			this.zoneTeleportBlock = new BlockInfo(BlockInfo.getBlock(this.volume.getWorld(), this.lobbyMiddleWallBlock).getRelative(this.wall, 6));
			int yaw = 0;
			if (this.wall == BlockFace.WEST) {
				yaw = 180;
File
ZoneLobby.java
Developer's decision
Manual
Kind of conflict
Attribute
Method invocation
Chunk
Conflicting content
			this.warzone.setTeleport(new Location(this.volume.getWorld(), this.zoneTeleportBlock.getX(), this.zoneTeleportBlock.getY(), this.zoneTeleportBlock.getZ(), yaw, 0));

			// set zone sign
<<<<<<< HEAD
			Block zoneSignBlock = BlockInfo.getBlock(this.volume.getWorld(), this.lobbyMiddleWallBlock).getFace(this.wall, 4);
=======
			Block zoneSignBlock = BlockInfo.getBlock(this.warzone.getWorld(), this.lobbyMiddleWallBlock).getRelative(this.wall, 4);
>>>>>>> cd158cc9a994f9aff53947f03a4c9e25a52ea4a3
			byte data = 0;
			if (this.wall == BlockFace.NORTH) {
				data = (byte) 4;
Solution content
			this.warzone.setTeleport(new Location(this.volume.getWorld(), this.zoneTeleportBlock.getX(), this.zoneTeleportBlock.getY(), this.zoneTeleportBlock.getZ(), yaw, 0));

			// set zone sign
			Block zoneSignBlock = BlockInfo.getBlock(this.volume.getWorld(), this.lobbyMiddleWallBlock).getRelative(this.wall, 4);
			byte data = 0;
			if (this.wall == BlockFace.NORTH) {
				data = (byte) 4;
File
ZoneLobby.java
Developer's decision
Manual
Kind of conflict
Method invocation
Variable
Chunk
Conflicting content
			// lets get some light in here
			if (this.wall == BlockFace.NORTH || this.wall == BlockFace.SOUTH) {
<<<<<<< HEAD
				BlockInfo.getBlock(this.volume.getWorld(), this.lobbyMiddleWallBlock).getFace(BlockFace.DOWN).getFace(BlockFace.WEST, this.lobbyHalfSide - 1).getFace(this.wall, 9).setType(Material.GLOWSTONE);
				BlockInfo.getBlock(this.volume.getWorld(), this.lobbyMiddleWallBlock).getFace(BlockFace.DOWN).getFace(BlockFace.EAST, this.lobbyHalfSide - 1).getFace(this.wall, 9).setType(Material.GLOWSTONE);
			} else {
				BlockInfo.getBlock(this.volume.getWorld(), this.lobbyMiddleWallBlock).getFace(BlockFace.DOWN).getFace(BlockFace.NORTH, this.lobbyHalfSide - 1).getFace(this.wall, 9).setType(Material.GLOWSTONE);
				BlockInfo.getBlock(this.volume.getWorld(), this.lobbyMiddleWallBlock).getFace(BlockFace.DOWN).getFace(BlockFace.SOUTH, this.lobbyHalfSide - 1).getFace(this.wall, 9).setType(Material.GLOWSTONE);
=======
				BlockInfo.getBlock(this.warzone.getWorld(), this.lobbyMiddleWallBlock).getRelative(BlockFace.DOWN).getRelative(BlockFace.WEST, this.lobbyHalfSide - 1).getRelative(this.wall, 9).setType(Material.GLOWSTONE);
				BlockInfo.getBlock(this.warzone.getWorld(), this.lobbyMiddleWallBlock).getRelative(BlockFace.DOWN).getRelative(BlockFace.EAST, this.lobbyHalfSide - 1).getRelative(this.wall, 9).setType(Material.GLOWSTONE);
			} else {
				BlockInfo.getBlock(this.warzone.getWorld(), this.lobbyMiddleWallBlock).getRelative(BlockFace.DOWN).getRelative(BlockFace.NORTH, this.lobbyHalfSide - 1).getRelative(this.wall, 9).setType(Material.GLOWSTONE);
				BlockInfo.getBlock(this.warzone.getWorld(), this.lobbyMiddleWallBlock).getRelative(BlockFace.DOWN).getRelative(BlockFace.SOUTH, this.lobbyHalfSide - 1).getRelative(this.wall, 9).setType(Material.GLOWSTONE);
>>>>>>> cd158cc9a994f9aff53947f03a4c9e25a52ea4a3
			}
		} else {
			War.war.log("Failed to initalize zone lobby for zone " + this.warzone.getName(), java.util.logging.Level.WARNING);
Solution content
			// lets get some light in here
			if (this.wall == BlockFace.NORTH || this.wall == BlockFace.SOUTH) {
				BlockInfo.getBlock(this.volume.getWorld(), this.lobbyMiddleWallBlock).getRelative(BlockFace.DOWN).getRelative(BlockFace.WEST, this.lobbyHalfSide - 1).getRelative(this.wall, 9).setType(Material.GLOWSTONE);
				BlockInfo.getBlock(this.volume.getWorld(), this.lobbyMiddleWallBlock).getRelative(BlockFace.DOWN).getRelative(BlockFace.EAST, this.lobbyHalfSide - 1).getRelative(this.wall, 9).setType(Material.GLOWSTONE);
			} else {
				BlockInfo.getBlock(this.volume.getWorld(), this.lobbyMiddleWallBlock).getRelative(BlockFace.DOWN).getRelative(BlockFace.NORTH, this.lobbyHalfSide - 1).getRelative(this.wall, 9).setType(Material.GLOWSTONE);
				BlockInfo.getBlock(this.volume.getWorld(), this.lobbyMiddleWallBlock).getRelative(BlockFace.DOWN).getRelative(BlockFace.SOUTH, this.lobbyHalfSide - 1).getRelative(this.wall, 9).setType(Material.GLOWSTONE);
			}
		} else {
			War.war.log("Failed to initalize zone lobby for zone " + this.warzone.getName(), java.util.logging.Level.WARNING);
File
ZoneLobby.java
Developer's decision
Manual
Kind of conflict
Method invocation
Chunk
Conflicting content
				rightSide = BlockFace.SOUTH;
			}
			List teams = this.warzone.getTeams();
<<<<<<< HEAD
			Block autoAssignGateBlock = BlockInfo.getBlock(this.volume.getWorld(), this.autoAssignGate);
			this.setBlock(autoAssignGateBlock.getFace(BlockFace.DOWN), (Material.GLOWSTONE));
=======
			Block autoAssignGateBlock = BlockInfo.getBlock(this.warzone.getWorld(), this.autoAssignGate);
			this.setBlock(autoAssignGateBlock.getRelative(BlockFace.DOWN), (Material.GLOWSTONE));
>>>>>>> cd158cc9a994f9aff53947f03a4c9e25a52ea4a3
			int size = teams.size();
			if (size > 0) {
				TeamKind[] doorBlockKinds = new TeamKind[7];
Solution content
				rightSide = BlockFace.SOUTH;
			}
			List teams = this.warzone.getTeams();
			
			Block autoAssignGateBlock = BlockInfo.getBlock(this.volume.getWorld(), this.autoAssignGate);
			this.setBlock(autoAssignGateBlock.getRelative(BlockFace.DOWN), (Material.GLOWSTONE));
			int size = teams.size();
			if (size > 0) {
				TeamKind[] doorBlockKinds = new TeamKind[7];
File
ZoneLobby.java
Developer's decision
Combination
Kind of conflict
Method invocation
Variable
Chunk
Conflicting content
	}

	public void run() {
<<<<<<< HEAD
		this.zone.equipPlayerLoadoutSelection(player, team);
=======
		if (loadout==0) this.zone.resetInventory(this.team, this.player);
		else {
			int i = 0;
			Iterator it = this.zone.getExtraLoadouts().entrySet().iterator();
		    while (it.hasNext()) {
		        Map.Entry pairs = (Map.Entry)it.next();
		        if (i == loadout - 1) {
		        	this.zone.resetInventory(this.team, this.player, (HashMap)pairs.getValue());
		        }
		        i++;
		    }
		}
>>>>>>> cd158cc9a994f9aff53947f03a4c9e25a52ea4a3
		// Stop fire here, since doing it in the same tick as death doesn't extinguish it
		this.player.setFireTicks(0);
	}
Solution content
	public void run() {
		this.zone.equipPlayerLoadoutSelection(player, team);
		
		// Stop fire here, since doing it in the same tick as death doesn't extinguish it
		this.player.setFireTicks(0);
	}
File
LoadoutResetJob.java
Developer's decision
None
Kind of conflict
If statement
Method invocation