Mirror von
https://github.com/IntellectualSites/FastAsyncWorldEdit.git
synchronisiert 2024-11-07 20:10:06 +01:00
Replace remaining instances of worldeditregentempworld
Dieser Commit ist enthalten in:
Ursprung
722c411219
Commit
d6695d23f0
@ -222,7 +222,7 @@ public final class PaperweightAdapter implements BukkitImplAdapter<net.minecraft
|
|||||||
|
|
||||||
try {
|
try {
|
||||||
Class.forName("org.spigotmc.SpigotConfig");
|
Class.forName("org.spigotmc.SpigotConfig");
|
||||||
SpigotConfig.config.set("world-settings.worldeditregentempworld.verbose", false);
|
SpigotConfig.config.set("world-settings.faweregentempworld.verbose", false);
|
||||||
} catch (ClassNotFoundException ignored) {
|
} catch (ClassNotFoundException ignored) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -628,7 +628,7 @@ public final class PaperweightAdapter implements BukkitImplAdapter<net.minecraft
|
|||||||
Path tempDir = Files.createTempDirectory("FastAsyncWorldEditWorldGen");
|
Path tempDir = Files.createTempDirectory("FastAsyncWorldEditWorldGen");
|
||||||
LevelStorageSource levelStorage = LevelStorageSource.createDefault(tempDir);
|
LevelStorageSource levelStorage = LevelStorageSource.createDefault(tempDir);
|
||||||
ResourceKey<LevelStem> worldDimKey = getWorldDimKey(env);
|
ResourceKey<LevelStem> worldDimKey = getWorldDimKey(env);
|
||||||
try (LevelStorageSource.LevelStorageAccess session = levelStorage.createAccess("worldeditregentempworld", worldDimKey)) {
|
try (LevelStorageSource.LevelStorageAccess session = levelStorage.createAccess("faweregentempworld", worldDimKey)) {
|
||||||
ServerLevel originalWorld = ((CraftWorld) bukkitWorld).getHandle();
|
ServerLevel originalWorld = ((CraftWorld) bukkitWorld).getHandle();
|
||||||
PrimaryLevelData levelProperties = (PrimaryLevelData) originalWorld.getServer()
|
PrimaryLevelData levelProperties = (PrimaryLevelData) originalWorld.getServer()
|
||||||
.getWorldData().overworldData();
|
.getWorldData().overworldData();
|
||||||
@ -640,7 +640,7 @@ public final class PaperweightAdapter implements BukkitImplAdapter<net.minecraft
|
|||||||
: originalOpts;
|
: originalOpts;
|
||||||
|
|
||||||
LevelSettings newWorldSettings = new LevelSettings(
|
LevelSettings newWorldSettings = new LevelSettings(
|
||||||
"worldeditregentempworld",
|
"faweregentempworld",
|
||||||
levelProperties.settings.gameType(),
|
levelProperties.settings.gameType(),
|
||||||
levelProperties.settings.hardcore(),
|
levelProperties.settings.hardcore(),
|
||||||
levelProperties.settings.difficulty(),
|
levelProperties.settings.difficulty(),
|
||||||
@ -674,7 +674,7 @@ public final class PaperweightAdapter implements BukkitImplAdapter<net.minecraft
|
|||||||
try {
|
try {
|
||||||
@SuppressWarnings("unchecked")
|
@SuppressWarnings("unchecked")
|
||||||
Map<String, org.bukkit.World> map = (Map<String, org.bukkit.World>) worldsField.get(Bukkit.getServer());
|
Map<String, org.bukkit.World> map = (Map<String, org.bukkit.World>) worldsField.get(Bukkit.getServer());
|
||||||
map.remove("worldeditregentempworld");
|
map.remove("faweregentempworld");
|
||||||
} catch (IllegalAccessException ignored) {
|
} catch (IllegalAccessException ignored) {
|
||||||
}
|
}
|
||||||
SafeFiles.tryHardToDeleteDir(tempDir);
|
SafeFiles.tryHardToDeleteDir(tempDir);
|
||||||
|
@ -223,7 +223,7 @@ public final class PaperweightAdapter implements BukkitImplAdapter<net.minecraft
|
|||||||
|
|
||||||
try {
|
try {
|
||||||
Class.forName("org.spigotmc.SpigotConfig");
|
Class.forName("org.spigotmc.SpigotConfig");
|
||||||
SpigotConfig.config.set("world-settings.worldeditregentempworld.verbose", false);
|
SpigotConfig.config.set("world-settings.faweregentempworld.verbose", false);
|
||||||
} catch (ClassNotFoundException ignored) {
|
} catch (ClassNotFoundException ignored) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -625,7 +625,7 @@ public final class PaperweightAdapter implements BukkitImplAdapter<net.minecraft
|
|||||||
Path tempDir = Files.createTempDirectory("FastAsyncWorldEditWorldGen");
|
Path tempDir = Files.createTempDirectory("FastAsyncWorldEditWorldGen");
|
||||||
LevelStorageSource levelStorage = LevelStorageSource.createDefault(tempDir);
|
LevelStorageSource levelStorage = LevelStorageSource.createDefault(tempDir);
|
||||||
ResourceKey<LevelStem> worldDimKey = getWorldDimKey(env);
|
ResourceKey<LevelStem> worldDimKey = getWorldDimKey(env);
|
||||||
try (LevelStorageSource.LevelStorageAccess session = levelStorage.createAccess("worldeditregentempworld", worldDimKey)) {
|
try (LevelStorageSource.LevelStorageAccess session = levelStorage.createAccess("faweregentempworld", worldDimKey)) {
|
||||||
ServerLevel originalWorld = ((CraftWorld) bukkitWorld).getHandle();
|
ServerLevel originalWorld = ((CraftWorld) bukkitWorld).getHandle();
|
||||||
PrimaryLevelData levelProperties = (PrimaryLevelData) originalWorld.getServer()
|
PrimaryLevelData levelProperties = (PrimaryLevelData) originalWorld.getServer()
|
||||||
.getWorldData().overworldData();
|
.getWorldData().overworldData();
|
||||||
@ -637,7 +637,7 @@ public final class PaperweightAdapter implements BukkitImplAdapter<net.minecraft
|
|||||||
: originalOpts;
|
: originalOpts;
|
||||||
|
|
||||||
LevelSettings newWorldSettings = new LevelSettings(
|
LevelSettings newWorldSettings = new LevelSettings(
|
||||||
"worldeditregentempworld",
|
"faweregentempworld",
|
||||||
levelProperties.settings.gameType(),
|
levelProperties.settings.gameType(),
|
||||||
levelProperties.settings.hardcore(),
|
levelProperties.settings.hardcore(),
|
||||||
levelProperties.settings.difficulty(),
|
levelProperties.settings.difficulty(),
|
||||||
@ -671,7 +671,7 @@ public final class PaperweightAdapter implements BukkitImplAdapter<net.minecraft
|
|||||||
try {
|
try {
|
||||||
@SuppressWarnings("unchecked")
|
@SuppressWarnings("unchecked")
|
||||||
Map<String, org.bukkit.World> map = (Map<String, org.bukkit.World>) worldsField.get(Bukkit.getServer());
|
Map<String, org.bukkit.World> map = (Map<String, org.bukkit.World>) worldsField.get(Bukkit.getServer());
|
||||||
map.remove("worldeditregentempworld");
|
map.remove("faweregentempworld");
|
||||||
} catch (IllegalAccessException ignored) {
|
} catch (IllegalAccessException ignored) {
|
||||||
}
|
}
|
||||||
SafeFiles.tryHardToDeleteDir(tempDir);
|
SafeFiles.tryHardToDeleteDir(tempDir);
|
||||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren