diff --git a/.github/workflows/gradle.yml b/.github/workflows/gradle.yml index b43b9e16..e2b11f47 100644 --- a/.github/workflows/gradle.yml +++ b/.github/workflows/gradle.yml @@ -13,6 +13,14 @@ jobs: uses: actions/setup-java@v1 with: java-version: 16 + - uses: actions/cache@v2 + with: + path: | + ~/.gradle/caches + ~/.gradle/wrapper + key: "${{ runner.os }}-bluemap-${{ hashFiles('**/*.gradle*') }}" + restore-keys: | + ${{ runner.os }}-bluemap- - name: Build with Gradle run: ./gradlew clean test build - uses: actions/upload-artifact@v2 diff --git a/implementations/sponge-8.0.0/src/main/java/de/bluecolored/bluemap/sponge8/SpongePlayer.java b/implementations/sponge-8.0.0/src/main/java/de/bluecolored/bluemap/sponge8/SpongePlayer.java index 8f8d08a2..12bf54e4 100644 --- a/implementations/sponge-8.0.0/src/main/java/de/bluecolored/bluemap/sponge8/SpongePlayer.java +++ b/implementations/sponge-8.0.0/src/main/java/de/bluecolored/bluemap/sponge8/SpongePlayer.java @@ -122,7 +122,7 @@ public void update() { Optional> effects = player.get(Keys.POTION_EFFECTS); if (effects.isPresent()) { for (PotionEffect effect : effects.get()) { - if (effect.type().equals(PotionEffectTypes.INVISIBILITY.get()) && effect.duration() > 0) invis = true; + if (effect.type().equals(PotionEffectTypes.INVISIBILITY.get()) && effect.duration().ticks() > 0) invis = true; } } }