Mirror von
https://github.com/PaperMC/Paper.git
synchronisiert 2024-12-15 19:10:09 +01:00
1358d1e914
Upstream has released updates that appear to apply and compile correctly. This update has not been tested by PaperMC and as with ANY update, please do your own testing Bukkit Changes: 881e06e5 PR-725: Add Item Unlimited Lifetime APIs CraftBukkit Changes: 74c08312 SPIGOT-6962: Call EntityChangeBlockEvent when when FallingBlockEntity starts to fall 64db5126 SPIGOT-6959: Make /loot command ignore empty items for spawn 2d760831 Increase outdated build delay 9ed7e4fb SPIGOT-6138, SPIGOT-6415: Don't call CreatureSpawnEvent after cross-dimensional travel fc4ad813 SPIGOT-6895: Trees grown with applyBoneMeal() don't fire the StructureGrowthEvent 59733a2e SPIGOT-6961: Actually return a copy of the ItemMeta Spigot Changes: ffceeae3 SPIGOT-6956: Drop unload queue patch as attempt at fixing stop issue e19ddabd PR-1011: Add Item Unlimited Lifetime APIs 34d40b0e SPIGOT-2942: give command fires PlayerDropItemEvent, cancelling it causes Item Duplication
44 Zeilen
1.7 KiB
Diff
44 Zeilen
1.7 KiB
Diff
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
|
From: Jason Penilla <11360596+jpenilla@users.noreply.github.com>
|
|
Date: Fri, 26 Nov 2021 15:09:58 -0800
|
|
Subject: [PATCH] Remove client-side code using deprecated for removal
|
|
AccessController
|
|
|
|
Fixes warnings on build
|
|
|
|
diff --git a/src/main/java/net/minecraft/Util.java b/src/main/java/net/minecraft/Util.java
|
|
index d5a4e7d0ba2aff89e9aec64c8545c105926dcab4..e0a77a776533e48a3f8e2165eb77d4765213b79e 100644
|
|
--- a/src/main/java/net/minecraft/Util.java
|
|
+++ b/src/main/java/net/minecraft/Util.java
|
|
@@ -23,7 +23,6 @@ import java.net.URL;
|
|
import java.nio.file.Files;
|
|
import java.nio.file.Path;
|
|
import java.nio.file.spi.FileSystemProvider;
|
|
-import java.security.AccessController;
|
|
import java.security.PrivilegedActionException;
|
|
import java.security.PrivilegedExceptionAction;
|
|
import java.time.Duration;
|
|
@@ -764,21 +763,7 @@ public class Util {
|
|
}
|
|
|
|
public void openUrl(URL url) {
|
|
- try {
|
|
- Process process = AccessController.doPrivileged((PrivilegedExceptionAction<Process>)(() -> {
|
|
- return Runtime.getRuntime().exec(this.getOpenUrlArguments(url));
|
|
- }));
|
|
-
|
|
- for(String string : IOUtils.readLines(process.getErrorStream())) {
|
|
- Util.LOGGER.error(string);
|
|
- }
|
|
-
|
|
- process.getInputStream().close();
|
|
- process.getErrorStream().close();
|
|
- process.getOutputStream().close();
|
|
- } catch (IOException | PrivilegedActionException var5) {
|
|
- Util.LOGGER.error("Couldn't open url '{}'", url, var5);
|
|
- }
|
|
+ throw new IllegalStateException("This method is not useful on dedicated servers."); // Paper
|
|
|
|
}
|
|
|