Skip to content

Commit

Permalink
Merge pull request #78 from TiagoFar78/bugs
Browse files Browse the repository at this point in the history
Small bugs fixed
  • Loading branch information
iquelli authored Mar 27, 2024
2 parents 352efcd + 5a633c1 commit 255b88d
Show file tree
Hide file tree
Showing 7 changed files with 14 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -377,6 +377,10 @@ public void playerMove(String playerName, PrisonEscapeLocation loc) {
return;
}

if (!_prisionersTeam.isOnTeam(player)) {
return;
}

if (player.hasEscaped()) {
return;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ public Phase next() {

@Override
public boolean isClockStopped() {
return false;
return true;
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ public Phase next() {

@Override
public boolean isClockStopped() {
return true;
return false;
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ public Phase next() {

@Override
public boolean isClockStopped() {
return false;
return true;
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -70,9 +70,9 @@ public PrisonEscapeLocation getWaitingLobbyLocation() {
}

public boolean isOutsidePrison(PrisonEscapeLocation loc) {
return loc.getX() > _prisonTopLeftCorner.getX() || _prisonBottomRightCorner.getX() < loc.getX() ||
loc.getY() > _prisonTopLeftCorner.getY() || _prisonBottomRightCorner.getY() < loc.getY() ||
loc.getZ() > _prisonTopLeftCorner.getZ() || _prisonBottomRightCorner.getZ() < loc.getZ();
return loc.getX() > _prisonTopLeftCorner.getX() || loc.getX() < _prisonBottomRightCorner.getX() ||
loc.getY() > _prisonTopLeftCorner.getY() || loc.getY() < _prisonBottomRightCorner.getY() ||
loc.getZ() > _prisonTopLeftCorner.getZ() || loc.getZ() < _prisonBottomRightCorner.getZ();
}

public PrisonEscapeLocation getPoliceSpawnLocation(int index) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -167,9 +167,9 @@ private MessageLanguageManager(String language) {
_policeWonSubtitle = createMessage(messages.getString(announcementPath + "PoliceWonSubtitle"));
_victoryWord = messages.getString(announcementPath + "VictoryWord");
_defeatWord = messages.getString(announcementPath + "DefeatWord");
_gameResultMessage = createMessage(messages.getStringList(announcementPath + "GameResultMessage"));
_gameResultMessage = createMessage(messages.getStringList(announcementPath + "GameResult"));
_playerEscapedMessage = createMessage(messages.getString(announcementPath + "PlayerEscaped"));
_gameCancelledNotEnoughPlayers = createMessage(messages.getString(announcementPath + "GameCancelledForFewPlayers"));
_gameCancelledNotEnoughPlayers = createMessage(messages.getString(announcementPath + "GameCancelledFewPlayers"));

String errorPath = messagePath + "Errors.";
_notAllowedMessage = createMessage(messages.getString(errorPath + "NotAllowed"));
Expand Down
4 changes: 2 additions & 2 deletions src/main/resources/languages/english.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ Messages:
PoliceWonSubtitle: "&f{PLAYERS} was still in prison"
VictoryWord: "Victory"
DefeatWord: "Defeat"
GameResultMessage:
GameResult:
- "&6==================================="
- ""
- " &f&l{RESULT}"
Expand All @@ -48,7 +48,7 @@ Messages:
- ""
- "&6==================================="
PlayerEscaped: "&ePlayer &f{PLAYER} &eescaped the prison."
GameCancelledFewPlayersMessage: "&cThe game was cancelled because there were not enough players."
GameCancelledFewPlayers: "&cThe game was cancelled because there were not enough players."
Errors:
NotAllowed: "&cYou don't have permission to do that."
CommandForPlayers: "&cOnly players have permission to use this command."
Expand Down

0 comments on commit 255b88d

Please sign in to comment.