diff --git a/src/main/java/com/alttd/ctf/commands/subcommands/CreateTeam.java b/src/main/java/com/alttd/ctf/commands/subcommands/CreateTeam.java index 0a50ee7..bcb3665 100644 --- a/src/main/java/com/alttd/ctf/commands/subcommands/CreateTeam.java +++ b/src/main/java/com/alttd/ctf/commands/subcommands/CreateTeam.java @@ -75,7 +75,7 @@ public class CreateTeam extends SubCommand { int highestId = gameManager.getMaxTeamId(); Team team = new Team(MiniMessage.miniMessage().deserialize(String.format("%s", color, name)), - highestId + 1, player.getLocation(), player.getLocation(), teamColor); + highestId + 1, player.getLocation(), player.getLocation(), player.getLocation(), teamColor); return consumer.apply(team); } diff --git a/src/main/java/com/alttd/ctf/flag/Flag.java b/src/main/java/com/alttd/ctf/flag/Flag.java index 493fcf5..b37218b 100644 --- a/src/main/java/com/alttd/ctf/flag/Flag.java +++ b/src/main/java/com/alttd/ctf/flag/Flag.java @@ -160,8 +160,8 @@ public class Flag implements Runnable { spawnFlag(); return; } - double distance = winningTeam.getSpawnLocation().distance(flagCarrier.getLocation()); - if (distance > 5) { + double distance = winningTeam.getFlagTurnInLocation().distance(flagCarrier.getLocation()); + if (distance > 2) { Location location = flagCarrier.getLocation(); location.setY(location.getY() + 1); particleTrail.add(location); diff --git a/src/main/java/com/alttd/ctf/team/Team.java b/src/main/java/com/alttd/ctf/team/Team.java index cdf89c3..90ed6dd 100644 --- a/src/main/java/com/alttd/ctf/team/Team.java +++ b/src/main/java/com/alttd/ctf/team/Team.java @@ -34,6 +34,10 @@ public class Team { @NotNull @Getter private Location worldBorderCenter; // https://github.com/yannicklamprecht/WorldBorderAPI/blob/main/how-to-use.md + @JsonProperty("flagTurnInLocation") + @NotNull + @Getter + private Location flagTurnInLocation; @JsonProperty("teamColor") @NotNull @Getter diff --git a/version.properties b/version.properties index 99f41e5..170972b 100644 --- a/version.properties +++ b/version.properties @@ -1,3 +1,3 @@ -#Sat Feb 08 20:41:32 CET 2025 -buildNumber=18 +#Sat Feb 08 21:02:07 CET 2025 +buildNumber=19 version=0.1