File tree Expand file tree Collapse file tree 8 files changed +33
-10
lines changed
src/main/java/org/spongepowered/api
entity/living/player/server Expand file tree Collapse file tree 8 files changed +33
-10
lines changed Original file line number Diff line number Diff line change @@ -8,9 +8,9 @@ javadocPublishRoot=https://jd.spongepowered.org/
88
99org.gradle.parallel =true
1010
11- adventureVersion =4.11 .0
12- caffeineVersion =3.1.1
13- checkstyleVersion =10.3.4
11+ adventureVersion =4.12 .0
12+ caffeineVersion =3.1.2
13+ checkstyleVersion =10.5.0
1414configurateVersion =4.1.2
1515errorproneVersion =2.16
1616gsonVersion =2.8.9
Original file line number Diff line number Diff line change 11distributionBase =GRADLE_USER_HOME
22distributionPath =wrapper/dists
3- distributionUrl =https\://services.gradle.org/distributions/gradle-7.5.1-bin.zip
3+ distributionUrl =https\://services.gradle.org/distributions/gradle-7.6-bin.zip
4+ networkTimeout =10000
45zipStoreBase =GRADLE_USER_HOME
56zipStorePath =wrapper/dists
Original file line number Diff line number Diff line change 5555# Darwin, MinGW, and NonStop.
5656#
5757# (3) This script is generated from the Groovy template
58- # https://github.com/gradle/gradle/blob/master /subprojects/plugins/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt
58+ # https://github.com/gradle/gradle/blob/HEAD /subprojects/plugins/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt
5959# within the Gradle project.
6060#
6161# You can find Gradle at https://github.com/gradle/gradle/.
8080 esac
8181done
8282
83- APP_HOME=$( cd " ${APP_HOME:- ./ } " && pwd -P ) || exit
84-
85- APP_NAME=" Gradle"
83+ # This is normally unused
84+ # shellcheck disable=SC2034
8685APP_BASE_NAME=${0##*/ }
86+ APP_HOME=$( cd " ${APP_HOME:- ./ } " && pwd -P ) || exit
8787
8888# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
8989DEFAULT_JVM_OPTS=' "-Xmx64m" "-Xms64m"'
143143if ! " $cygwin " && ! " $darwin " && ! " $nonstop " ; then
144144 case $MAX_FD in # (
145145 max* )
146+ # In POSIX sh, ulimit -H is undefined. That's why the result is checked to see if it worked.
147+ # shellcheck disable=SC3045
146148 MAX_FD=$( ulimit -H -n ) ||
147149 warn " Could not query maximum file descriptor limit"
148150 esac
149151 case $MAX_FD in # (
150152 ' ' | soft) : ;; # (
151153 * )
154+ # In POSIX sh, ulimit -n is undefined. That's why the result is checked to see if it worked.
155+ # shellcheck disable=SC3045
152156 ulimit -n " $MAX_FD " ||
153157 warn " Could not set maximum file descriptor limit to $MAX_FD "
154158 esac
Original file line number Diff line number Diff line change @@ -26,6 +26,7 @@ if "%OS%"=="Windows_NT" setlocal
2626
2727set DIRNAME = %~dp0
2828if " %DIRNAME% " == " " set DIRNAME = .
29+ @ rem This is normally unused
2930set APP_BASE_NAME = %~n0
3031set APP_HOME = %DIRNAME%
3132
Original file line number Diff line number Diff line change @@ -10,14 +10,17 @@ pluginManagement {
1010 val indraVersion = " 3.0.1"
1111 id(" org.spongepowered.gradle.event-impl-gen" ) version " 7.0.0"
1212 id(" org.spongepowered.gradle.sponge.dev" ) version " 2.1.1"
13- id(" org.jetbrains.gradle.plugin.idea-ext" ) version " 1.1.6 "
13+ id(" org.jetbrains.gradle.plugin.idea-ext" ) version " 1.1.7 "
1414 id(" net.ltgt.errorprone" ) version " 3.0.1"
1515 id(" net.kyori.indra.publishing" ) version indraVersion
1616 id(" net.kyori.indra.publishing.sonatype" ) version indraVersion
1717 id(" net.kyori.indra.checkstyle" ) version indraVersion
1818 id(" net.kyori.indra.crossdoc" ) version indraVersion
1919 }
2020}
21+ plugins {
22+ id(" org.gradle.toolchains.foojay-resolver-convention" ) version (" 0.3.0" )
23+ }
2124
2225if (JavaVersion .current() < JavaVersion .VERSION_11 ) {
2326 throw GradleException (" SpongeAPI requires at least Java 11 to build, but you have ${JavaVersion .current()} ." )
Original file line number Diff line number Diff line change @@ -947,7 +947,7 @@ public final class Keys {
947947 public static final Key <Value <Ticks >> FUSE_DURATION = Keys .key (ResourceKey .sponge ("fuse_duration" ), Ticks .class );
948948
949949 /**
950- * The {@link GameMode} a {@link Humanoid } has.
950+ * The {@link GameMode} a {@link ServerPlayer } has.
951951 */
952952 public static final Key <Value <GameMode >> GAME_MODE = Keys .key (ResourceKey .sponge ("game_mode" ), GameMode .class );
953953
@@ -2206,6 +2206,11 @@ public final class Keys {
22062206 */
22072207 public static final Key <Value <Integer >> POWER = Keys .key (ResourceKey .sponge ("power" ), Integer .class );
22082208
2209+ /**
2210+ * The previous {@link GameMode} of a {@link ServerPlayer}. Readonly.
2211+ */
2212+ public static final Key <Value <GameMode >> PREVIOUS_GAME_MODE = Keys .key (ResourceKey .sponge ("previous_game_mode" ), GameMode .class );
2213+
22092214 /**
22102215 * A {@link Beacon}'s primary effect.
22112216 */
Original file line number Diff line number Diff line change @@ -344,6 +344,15 @@ default Value.Mutable<GameMode> gameMode() {
344344 return this .requireValue (Keys .GAME_MODE ).asMutable ();
345345 }
346346
347+ /**
348+ * {@link Keys#PREVIOUS_GAME_MODE}
349+ *
350+ * @return The previous game mode of the player
351+ */
352+ default Value <GameMode > previousGameMode () {
353+ return this .requireValue (Keys .PREVIOUS_GAME_MODE );
354+ }
355+
347356 /**
348357 * {@link Keys#STATISTICS}
349358 *
You can’t perform that action at this time.
0 commit comments