mirror of
https://github.com/IntellectualSites/PlotSquared.git
synced 2025-06-25 10:14:42 +02:00
Merge branch 'breaking' into we
This commit is contained in:
@ -26,8 +26,12 @@ public class BukkitTaskManager extends TaskManager {
|
||||
}
|
||||
|
||||
@Override public void taskAsync(Runnable runnable) {
|
||||
@NotNull BukkitTask task = this.bukkitMain.getServer().getScheduler()
|
||||
.runTaskAsynchronously(this.bukkitMain, runnable);
|
||||
if (this.bukkitMain.isEnabled()) {
|
||||
this.bukkitMain.getServer().getScheduler()
|
||||
.runTaskAsynchronously(this.bukkitMain, runnable);
|
||||
} else {
|
||||
runnable.run();
|
||||
}
|
||||
}
|
||||
|
||||
@Override public void task(Runnable runnable) {
|
||||
|
@ -11,6 +11,7 @@ import com.github.intellectualsites.plotsquared.plot.object.schematic.PlotItem;
|
||||
import com.github.intellectualsites.plotsquared.plot.util.MainUtil;
|
||||
import com.github.intellectualsites.plotsquared.plot.util.MathMan;
|
||||
import com.github.intellectualsites.plotsquared.plot.util.StringComparison;
|
||||
import com.github.intellectualsites.plotsquared.plot.util.TaskManager;
|
||||
import com.github.intellectualsites.plotsquared.plot.util.UUIDHandler;
|
||||
import com.github.intellectualsites.plotsquared.plot.util.WorldUtil;
|
||||
import com.github.intellectualsites.plotsquared.plot.util.world.BlockUtil;
|
||||
@ -304,13 +305,15 @@ import java.util.Set;
|
||||
}
|
||||
|
||||
@Override @Nullable public String[] getSign(@NonNull final Location location) {
|
||||
Block block = getWorld(location.getWorld())
|
||||
.getBlockAt(location.getX(), location.getY(), location.getZ());
|
||||
if (block.getState() instanceof Sign) {
|
||||
Sign sign = (Sign) block.getState();
|
||||
return sign.getLines();
|
||||
}
|
||||
return null;
|
||||
Block block = getWorld(location.getWorld()).getBlockAt(location.getX(), location.getY(), location.getZ());
|
||||
return TaskManager.IMP.sync(new RunnableVal<String[]>() {
|
||||
@Override public void run(String[] value) {
|
||||
if (block.getState() instanceof Sign) {
|
||||
Sign sign = (Sign) block.getState();
|
||||
this.value = sign.getLines();
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
@Override public Location getSpawn(@NonNull final PlotPlayer player) {
|
||||
|
Reference in New Issue
Block a user