mirror of
https://github.com/Jikoo/OpenInv.git
synced 2026-11-04 08:42:05 -05:00
Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
fc239aa70b | ||
|
|
e27d996ad8 | ||
|
|
98230c6f5b | ||
|
|
53c9586220 | ||
|
|
15a8052115 | ||
|
|
fae3231272 |
No files matched your search
+1
-1
@@ -1,6 +1,6 @@
|
||||
# Project meta
|
||||
group=com.lishid.openinv
|
||||
version=5.3.4
|
||||
version=5.3.5
|
||||
description=A Bukkit plugin for opening normally-inaccessible inventories.
|
||||
|
||||
# Gradle configuration
|
||||
|
||||
@@ -8,9 +8,9 @@ shadow = "9.6.1"
|
||||
folia-scheduler-wrapper = "v0.0.3"
|
||||
errorprone-core = "2.50.0"
|
||||
errorprone-gradle = "5.1.1"
|
||||
slf4j = "2.0.18"
|
||||
slf4j = "2.0.20"
|
||||
sqlite-jdbc = "3.49.1.0"
|
||||
mockito-core = "5.23.0"
|
||||
mockito-core = "5.24.0"
|
||||
junit-jupiter = "6.1.3"
|
||||
hamcrest = "3.0"
|
||||
|
||||
|
||||
Vendored
BIN
Binary file not shown.
+1
-1
@@ -1,6 +1,6 @@
|
||||
distributionBase=GRADLE_USER_HOME
|
||||
distributionPath=wrapper/dists
|
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-9.7.1-bin.zip
|
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-9.8.0-bin.zip
|
||||
networkTimeout=10000
|
||||
retries=0
|
||||
retryBackOffMs=500
|
||||
|
||||
Vendored
+41
-11
@@ -26,6 +26,33 @@
|
||||
@rem Set local scope for the variables, and ensure extensions are enabled
|
||||
setlocal EnableExtensions
|
||||
|
||||
@rem Catch executions from older scripts and ensure they exit cleanly.
|
||||
@rem This can be removed once we can be reasonably confident that few people
|
||||
@rem will be migrating directly to this new wrapper.
|
||||
goto afterSafetyNet
|
||||
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
|
||||
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
|
||||
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
|
||||
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
|
||||
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
|
||||
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
|
||||
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
|
||||
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
|
||||
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
|
||||
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
|
||||
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
|
||||
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
|
||||
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
|
||||
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
|
||||
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
|
||||
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
|
||||
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
|
||||
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
|
||||
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
|
||||
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
|
||||
goto exitWithErrorLevel
|
||||
:afterSafetyNet
|
||||
|
||||
set DIRNAME=%~dp0
|
||||
if "%DIRNAME%"=="" set DIRNAME=.
|
||||
@rem This is normally unused
|
||||
@@ -45,13 +72,14 @@ set JAVA_EXE=java.exe
|
||||
%JAVA_EXE% -version >NUL 2>&1
|
||||
if %ERRORLEVEL% equ 0 goto execute
|
||||
|
||||
echo. 1>&2
|
||||
echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. 1>&2
|
||||
echo. 1>&2
|
||||
echo Please set the JAVA_HOME variable in your environment to match the 1>&2
|
||||
echo location of your Java installation. 1>&2
|
||||
1>&2 echo.
|
||||
1>&2 echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
|
||||
1>&2 echo.
|
||||
1>&2 echo Please set the JAVA_HOME variable in your environment to match the
|
||||
1>&2 echo location of your Java installation.
|
||||
|
||||
"%COMSPEC%" /c exit 1
|
||||
goto exitWithErrorLevel
|
||||
|
||||
:findJavaFromJavaHome
|
||||
set JAVA_HOME=%JAVA_HOME:"=%
|
||||
@@ -59,13 +87,14 @@ set JAVA_EXE=%JAVA_HOME%/bin/java.exe
|
||||
|
||||
if exist "%JAVA_EXE%" goto execute
|
||||
|
||||
echo. 1>&2
|
||||
echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% 1>&2
|
||||
echo. 1>&2
|
||||
echo Please set the JAVA_HOME variable in your environment to match the 1>&2
|
||||
echo location of your Java installation. 1>&2
|
||||
1>&2 echo.
|
||||
1>&2 echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%
|
||||
1>&2 echo.
|
||||
1>&2 echo Please set the JAVA_HOME variable in your environment to match the
|
||||
1>&2 echo location of your Java installation.
|
||||
|
||||
"%COMSPEC%" /c exit 1
|
||||
goto exitWithErrorLevel
|
||||
|
||||
:execute
|
||||
@rem Setup the command line
|
||||
@@ -75,8 +104,9 @@ echo location of your Java installation. 1>&2
|
||||
@rem Execute gradlew
|
||||
@rem endlocal doesn't take effect until after the line is parsed and variables are expanded
|
||||
@rem which allows us to clear the local environment before executing the java command
|
||||
endlocal & "%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -jar "%APP_HOME%\gradle\wrapper\gradle-wrapper.jar" %* & call :exitWithErrorLevel
|
||||
endlocal & "%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -jar "%APP_HOME%\gradle\wrapper\gradle-wrapper.jar" %* & call :exitWithErrorLevel & goto exitWithErrorLevel
|
||||
|
||||
@rem This label must not be changed. We rely on old scripts being able to jump to this point.
|
||||
:exitWithErrorLevel
|
||||
@rem Use "%COMSPEC%" /c exit to allow operators to work properly in scripts
|
||||
"%COMSPEC%" /c exit %ERRORLEVEL%
|
||||
+5
-1
@@ -259,8 +259,9 @@ public class PlayerManager implements com.github.jikoo.openinv.internal.PlayerMa
|
||||
CompoundTag extraData = new CompoundTag();
|
||||
|
||||
// Copy extra data out of existing player.
|
||||
CraftPlayer oldPlayer = nmsPlayer.getBukkitEntity();
|
||||
ValueOutput output = TagValueOutput.createWrappingWithContext(scopedCollector, nmsPlayer.registryAccess(), extraData);
|
||||
nmsPlayer.getBukkitEntity().setExtraData(output);
|
||||
oldPlayer.setExtraData(output);
|
||||
|
||||
MinecraftServer server = nmsPlayer.level().getServer();
|
||||
injectPlayer(server, nmsPlayer);
|
||||
@@ -269,6 +270,9 @@ public class PlayerManager implements com.github.jikoo.openinv.internal.PlayerMa
|
||||
// Set extra data in new player.
|
||||
ValueInput input = TagValueInput.create(scopedCollector, nmsPlayer.registryAccess(), extraData);
|
||||
newPlayer.readExtraData(input);
|
||||
// The persistent data container belongs to the Bukkit wrapper, not the ServerPlayer.
|
||||
// Without copying it, saving drops all plugin data from the player file
|
||||
newPlayer.getPersistentDataContainer().putAll(oldPlayer.getPersistentDataContainer().toTagCompound());
|
||||
|
||||
return newPlayer;
|
||||
}
|
||||
|
||||
+5
-1
@@ -197,8 +197,9 @@ public class PlayerManager implements com.github.jikoo.openinv.internal.PlayerMa
|
||||
|
||||
try (ProblemReporter.ScopedCollector scopedCollector = new ProblemReporter.ScopedCollector(nmsPlayer.problemPath(), logger)) {
|
||||
// Copy extra data out of existing player.
|
||||
CraftPlayer oldPlayer = nmsPlayer.getBukkitEntity();
|
||||
TagValueOutput output = TagValueOutput.createWithContext(scopedCollector, nmsPlayer.registryAccess());
|
||||
nmsPlayer.getBukkitEntity().setExtraData(output);
|
||||
oldPlayer.setExtraData(output);
|
||||
|
||||
injectPlayer(nmsPlayer);
|
||||
CraftPlayer newPlayer = nmsPlayer.getBukkitEntity();
|
||||
@@ -206,6 +207,9 @@ public class PlayerManager implements com.github.jikoo.openinv.internal.PlayerMa
|
||||
// Set extra data in new player.
|
||||
ValueInput input = TagValueInput.create(scopedCollector, nmsPlayer.registryAccess(), output.buildResult());
|
||||
newPlayer.readExtraData(input);
|
||||
// The persistent data container belongs to the Bukkit wrapper, not the ServerPlayer.
|
||||
// Without copying it, saving drops all plugin data from the player file
|
||||
newPlayer.getPersistentDataContainer().putAll(oldPlayer.getPersistentDataContainer().toTagCompound());
|
||||
|
||||
return newPlayer;
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user