Part 1 of upstream merge and format

This commit is contained in:
MattBDev
2020-07-13 22:50:59 -04:00
parent 79771e83e0
commit 3bc692ff11
576 changed files with 3979 additions and 3421 deletions

View File

@ -27,7 +27,7 @@ import org.slf4j.LoggerFactory;
import java.io.File;
/**
* YAMLConfiguration but with setting for no op permissions and plugin root data folder
* YAMLConfiguration but with setting for no op permissions and plugin root data folder.
*/
public class BukkitConfiguration extends YAMLConfiguration {
@ -59,8 +59,8 @@ public class BukkitConfiguration extends YAMLConfiguration {
File toDir = new File(getWorkingDirectory(), file);
if (fromDir.exists() & !toDir.exists()) {
if (fromDir.renameTo(toDir)) {
plugin.getLogger().info("Migrated " + name + " folder '" + file +
"' from server root to plugin data folder.");
plugin.getLogger().info("Migrated " + name + " folder '" + file
+ "' from server root to plugin data folder.");
} else {
plugin.getLogger().warning("Error while migrating " + name + " folder!");
}

View File

@ -19,9 +19,6 @@
package com.sk89q.worldedit.bukkit;
import static com.google.common.base.Preconditions.checkNotNull;
import com.boydti.fawe.util.TaskManager;
import com.sk89q.worldedit.bukkit.adapter.BukkitImplAdapter;
import com.sk89q.worldedit.entity.BaseEntity;
import com.sk89q.worldedit.entity.Entity;
@ -35,9 +32,10 @@ import org.bukkit.entity.EntityType;
import java.lang.ref.WeakReference;
import java.util.Locale;
import javax.annotation.Nullable;
import static com.google.common.base.Preconditions.checkNotNull;
/**
* An adapter to adapt a Bukkit entity into a WorldEdit one.
*/

View File

@ -406,10 +406,11 @@ public final class FAWE_Spigot_v1_14_R4 extends CachedBukkitAdapter implements I
SingleThreadQueueExtent extent = new SingleThreadQueueExtent();
extent.init(null, (x, z) -> new BukkitGetBlocks_1_14(freshWorld, x, z) {
@Override
public Chunk ensureLoaded(World nmsWorld, int X, int Z) {
Chunk cached = nmsWorld.getChunkIfLoaded(X, Z);
public Chunk ensureLoaded(World nmsWorld, int chunkX, int chunkZ) {
Chunk cached = nmsWorld.getChunkIfLoaded(chunkX, chunkZ);
if (cached != null) return cached;
Future<Chunk> future = Fawe.get().getQueueHandler().sync((Supplier<Chunk>) () -> freshWorld.getChunkAt(X, Z));
Future<Chunk> future = Fawe.get().getQueueHandler().sync((Supplier<Chunk>) () -> freshWorld.getChunkAt(
chunkX, chunkZ));
while (!future.isDone()) {
// this feels so dirty
freshWorld.getChunkProvider().runTasks();