Increase spawn proximity threshold for class change checks.
Previously, players needed to be within 5 blocks of their spawn to switch classes. This threshold has been increased to 10 blocks, providing a better balance between gameplay flexibility and restrictions.
This commit is contained in:
parent
fa8d320da9
commit
f5bb1564ae
|
|
@ -48,7 +48,7 @@ public class SelectClass extends SubCommand {
|
||||||
TeamPlayer teamPlayer = optionalTeamPlayer.get();
|
TeamPlayer teamPlayer = optionalTeamPlayer.get();
|
||||||
if (!teamPlayer.isDead()
|
if (!teamPlayer.isDead()
|
||||||
&& !gamePhase.equals(GamePhase.CLASS_SELECTION)
|
&& !gamePhase.equals(GamePhase.CLASS_SELECTION)
|
||||||
&& teamPlayer.getTeam().getSpawnLocation().distance(player.getLocation()) > 5) {
|
&& teamPlayer.getTeam().getSpawnLocation().distance(player.getLocation()) > 10) {
|
||||||
commandSender.sendRichMessage("<red>You have to be near your spawn to change classes.</red>");
|
commandSender.sendRichMessage("<red>You have to be near your spawn to change classes.</red>");
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user