mirror of
https://github.com/IntellectualSites/PlotSquared.git
synced 2024-11-22 13:16:45 +01:00
Merge branch 'breaking' into we
This commit is contained in:
commit
1a923063b5
@ -22,7 +22,7 @@ dependencies {
|
|||||||
implementation("org.spigotmc:spigot-api:1.14.4-R0.1-SNAPSHOT")
|
implementation("org.spigotmc:spigot-api:1.14.4-R0.1-SNAPSHOT")
|
||||||
compile(group: "com.sk89q.worldedit", name: "worldedit-bukkit", version: "7.0.0")
|
compile(group: "com.sk89q.worldedit", name: "worldedit-bukkit", version: "7.0.0")
|
||||||
compile("io.papermc:paperlib:1.0.2")
|
compile("io.papermc:paperlib:1.0.2")
|
||||||
compile(group: "com.squareup.retrofit2", name: "retrofit", version: "2.6.2")
|
compile(group: "com.squareup.retrofit2", name: "retrofit", version: "2.4.0")
|
||||||
implementation("net.kyori:text-adapter-bukkit:3.0.3")
|
implementation("net.kyori:text-adapter-bukkit:3.0.3")
|
||||||
compile("net.milkbowl.vault:VaultAPI:1.7") {
|
compile("net.milkbowl.vault:VaultAPI:1.7") {
|
||||||
exclude(module: "bukkit")
|
exclude(module: "bukkit")
|
||||||
@ -81,9 +81,9 @@ shadowJar {
|
|||||||
include(dependency(":Core"))
|
include(dependency(":Core"))
|
||||||
// update notification stuff
|
// update notification stuff
|
||||||
include(dependency("com.github.Sauilitired:Jenkins4J:2.0-SNAPSHOT"))
|
include(dependency("com.github.Sauilitired:Jenkins4J:2.0-SNAPSHOT"))
|
||||||
include(dependency("com.squareup.retrofit2:retrofit:2.6.2"))
|
include(dependency("com.squareup.retrofit2:retrofit:2.4.0"))
|
||||||
include(dependency("com.squareup.okhttp3:okhttp:4.2.2"))
|
include(dependency("com.squareup.okhttp3:okhttp:3.12.0"))
|
||||||
include(dependency("com.squareup.okio:okio:2.4.1"))
|
include(dependency("com.squareup.okio:okio:2.2.2"))
|
||||||
include(dependency("org.jetbrains.kotlin:kotlin-stdlib:1.3.50"))
|
include(dependency("org.jetbrains.kotlin:kotlin-stdlib:1.3.50"))
|
||||||
include(dependency("io.papermc:paperlib:1.0.2"))
|
include(dependency("io.papermc:paperlib:1.0.2"))
|
||||||
include(dependency("net.kyori:text-adapter-bukkit:3.0.3"))
|
include(dependency("net.kyori:text-adapter-bukkit:3.0.3"))
|
||||||
|
@ -26,8 +26,12 @@ public class BukkitTaskManager extends TaskManager {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override public void taskAsync(Runnable runnable) {
|
@Override public void taskAsync(Runnable runnable) {
|
||||||
@NotNull BukkitTask task = this.bukkitMain.getServer().getScheduler()
|
if (this.bukkitMain.isEnabled()) {
|
||||||
|
this.bukkitMain.getServer().getScheduler()
|
||||||
.runTaskAsynchronously(this.bukkitMain, runnable);
|
.runTaskAsynchronously(this.bukkitMain, runnable);
|
||||||
|
} else {
|
||||||
|
runnable.run();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override public void task(Runnable runnable) {
|
@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.MainUtil;
|
||||||
import com.github.intellectualsites.plotsquared.plot.util.MathMan;
|
import com.github.intellectualsites.plotsquared.plot.util.MathMan;
|
||||||
import com.github.intellectualsites.plotsquared.plot.util.StringComparison;
|
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.UUIDHandler;
|
||||||
import com.github.intellectualsites.plotsquared.plot.util.WorldUtil;
|
import com.github.intellectualsites.plotsquared.plot.util.WorldUtil;
|
||||||
import com.github.intellectualsites.plotsquared.plot.util.world.BlockUtil;
|
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) {
|
@Override @Nullable public String[] getSign(@NonNull final Location location) {
|
||||||
Block block = getWorld(location.getWorld())
|
Block block = getWorld(location.getWorld()).getBlockAt(location.getX(), location.getY(), location.getZ());
|
||||||
.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) {
|
if (block.getState() instanceof Sign) {
|
||||||
Sign sign = (Sign) block.getState();
|
Sign sign = (Sign) block.getState();
|
||||||
return sign.getLines();
|
this.value = sign.getLines();
|
||||||
}
|
}
|
||||||
return null;
|
}
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override public Location getSpawn(@NonNull final PlotPlayer player) {
|
@Override public Location getSpawn(@NonNull final PlotPlayer player) {
|
||||||
|
@ -5,18 +5,18 @@ def textVersion = "3.0.2"
|
|||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
implementation("org.yaml:snakeyaml:1.25")
|
implementation("org.yaml:snakeyaml:1.25")
|
||||||
implementation("com.google.code.gson:gson:2.8.6") {
|
implementation("com.google.code.gson:gson:2.8.0") {
|
||||||
because("Minecraft uses GSON 2.8.0")
|
because("Minecraft uses GSON 2.8.0")
|
||||||
force = true
|
force = true
|
||||||
}
|
}
|
||||||
implementation("org.projectlombok:lombok:1.18.10")
|
implementation("org.projectlombok:lombok:1.18.8")
|
||||||
compileOnly("org.projectlombok:lombok:1.18.8")
|
compileOnly("org.projectlombok:lombok:1.18.8")
|
||||||
testCompileOnly("org.projectlombok:lombok:1.18.8")
|
testCompileOnly("org.projectlombok:lombok:1.18.8")
|
||||||
annotationProcessor("org.projectlombok:lombok:1.18.8")
|
annotationProcessor("org.projectlombok:lombok:1.18.8")
|
||||||
testAnnotationProcessor("org.projectlombok:lombok:1.18.8")
|
testAnnotationProcessor("org.projectlombok:lombok:1.18.8")
|
||||||
implementation("com.github.Sauilitired:Jenkins4J:2.0-SNAPSHOT")
|
implementation("com.github.Sauilitired:Jenkins4J:2.0-SNAPSHOT")
|
||||||
implementation("com.squareup.okhttp3:okhttp:4.2.2")
|
implementation("com.squareup.okhttp3:okhttp:3.12.0")
|
||||||
implementation("com.squareup.okio:okio:2.4.1")
|
implementation("com.squareup.okio:okio:2.2.2")
|
||||||
implementation("org.jetbrains.kotlin:kotlin-stdlib:1.3.50")
|
implementation("org.jetbrains.kotlin:kotlin-stdlib:1.3.50")
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -20,6 +20,10 @@ import java.util.UUID;
|
|||||||
requiredType = RequiredType.NONE, confirmation = true) public class Owner extends SetCommand {
|
requiredType = RequiredType.NONE, confirmation = true) public class Owner extends SetCommand {
|
||||||
|
|
||||||
@Override public boolean set(final PlotPlayer player, final Plot plot, String value) {
|
@Override public boolean set(final PlotPlayer player, final Plot plot, String value) {
|
||||||
|
if (value == null || value.isEmpty()) {
|
||||||
|
Captions.SET_OWNER_MISSING_PLAYER.send(player);
|
||||||
|
return false;
|
||||||
|
}
|
||||||
Set<Plot> plots = plot.getConnectedPlots();
|
Set<Plot> plots = plot.getConnectedPlots();
|
||||||
UUID uuid = null;
|
UUID uuid = null;
|
||||||
String name = null;
|
String name = null;
|
||||||
@ -75,8 +79,7 @@ import java.util.UUID;
|
|||||||
final String finalName = name;
|
final String finalName = name;
|
||||||
final UUID finalUUID = uuid;
|
final UUID finalUUID = uuid;
|
||||||
final boolean removeDenied = plot.isDenied(finalUUID);
|
final boolean removeDenied = plot.isDenied(finalUUID);
|
||||||
Runnable run = new Runnable() {
|
Runnable run = () -> {
|
||||||
@Override public void run() {
|
|
||||||
if (plot.setOwner(finalUUID, player)) {
|
if (plot.setOwner(finalUUID, player)) {
|
||||||
if (removeDenied)
|
if (removeDenied)
|
||||||
plot.removeDenied(finalUUID);
|
plot.removeDenied(finalUUID);
|
||||||
@ -89,7 +92,6 @@ import java.util.UUID;
|
|||||||
} else {
|
} else {
|
||||||
MainUtil.sendMessage(player, Captions.SET_OWNER_CANCELLED);
|
MainUtil.sendMessage(player, Captions.SET_OWNER_CANCELLED);
|
||||||
}
|
}
|
||||||
}
|
|
||||||
};
|
};
|
||||||
if (hasConfirmation(player)) {
|
if (hasConfirmation(player)) {
|
||||||
CmdConfirm.addPending(player, "/plot set owner " + value, run);
|
CmdConfirm.addPending(player, "/plot set owner " + value, run);
|
||||||
|
@ -578,6 +578,7 @@ public enum Captions {
|
|||||||
//<editor-fold desc="Set Owner">
|
//<editor-fold desc="Set Owner">
|
||||||
SET_OWNER("$4You successfully set the plot owner", "Owner"),
|
SET_OWNER("$4You successfully set the plot owner", "Owner"),
|
||||||
SET_OWNER_CANCELLED("$2The set owner action was cancelled", "Owner"),
|
SET_OWNER_CANCELLED("$2The set owner action was cancelled", "Owner"),
|
||||||
|
SET_OWNER_MISSING_PLAYER("$1You need to specify a new owner. Correct usage is: $2/plot setowner <owner>", "Owner"),
|
||||||
NOW_OWNER("$4You are now owner of plot %s", "Owner"),
|
NOW_OWNER("$4You are now owner of plot %s", "Owner"),
|
||||||
//</editor-fold>
|
//</editor-fold>
|
||||||
//<editor-fold desc="Signs">
|
//<editor-fold desc="Signs">
|
||||||
|
@ -83,7 +83,7 @@ subprojects {
|
|||||||
because("Minecraft uses Guava 21 as of 1.13")
|
because("Minecraft uses Guava 21 as of 1.13")
|
||||||
}
|
}
|
||||||
compileOnly("org.jetbrains:annotations:17.0.0")
|
compileOnly("org.jetbrains:annotations:17.0.0")
|
||||||
compileClasspath("org.projectlombok:lombok:1.18.10")
|
compileClasspath("org.projectlombok:lombok:1.18.8")
|
||||||
testCompileOnly("org.projectlombok:lombok:1.18.8")
|
testCompileOnly("org.projectlombok:lombok:1.18.8")
|
||||||
annotationProcessor("org.projectlombok:lombok:1.18.8")
|
annotationProcessor("org.projectlombok:lombok:1.18.8")
|
||||||
testAnnotationProcessor("org.projectlombok:lombok:1.18.8")
|
testAnnotationProcessor("org.projectlombok:lombok:1.18.8")
|
||||||
|
Loading…
Reference in New Issue
Block a user