Skip to content

Commit

Permalink
Fix for Player's Health being too large
Browse files Browse the repository at this point in the history
Fix builds and deployment
  • Loading branch information
A5H73Y committed Jan 4, 2021
1 parent a3611f8 commit 5075933
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 7 deletions.
6 changes: 2 additions & 4 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,7 @@ sudo: false
language: java
dist: trusty
jdk:
- oraclejdk9
- oraclejdk11
- openjdk8
- openjdk10
- openjdk11
notifications:
email: false
Expand All @@ -20,6 +17,7 @@ before_deploy:
deploy:
provider: releases
github_token: $PAT
file: "target/Parkour.jar"
file: "target/Parkour-*.jar"
file_glob: true
skip_cleanup: true
api_key: $PAT
Original file line number Diff line number Diff line change
Expand Up @@ -1486,9 +1486,7 @@ private void announceCourseFinishMessage(Player player, ParkourSession session)
*/
private void restoreHealthHunger(Player player) {
double health = PlayerInfo.getSavedHealth(player);
if (health <= 0) {
health = player.getMaxHealth();
}
health = Math.min(Math.max(0, health), player.getMaxHealth());
player.setHealth(health);
player.setFoodLevel(PlayerInfo.getSavedFoodLevel(player));
PlayerInfo.resetSavedHealthFoodLevel(player);
Expand Down

0 comments on commit 5075933

Please sign in to comment.