geforkt von Mirrors/FastAsyncWorldEdit
Merge pull request 'main' (#6) from Mirrors/FastAsyncWorldEdit:main into main
Alle Prüfungen waren erfolgreich
SteamWarCI Build successful
Alle Prüfungen waren erfolgreich
SteamWarCI Build successful
Reviewed-on: #6
Dieser Commit ist enthalten in:
Commit
9d5e96946c
@ -5,7 +5,7 @@ import org.gradle.api.tasks.testing.logging.TestLogEvent.FAILED
|
||||
import java.net.URI
|
||||
|
||||
plugins {
|
||||
id("io.github.gradle-nexus.publish-plugin") version "1.1.0"
|
||||
id("io.github.gradle-nexus.publish-plugin") version "1.2.0"
|
||||
id("xyz.jpenilla.run-paper") version "2.0.1"
|
||||
}
|
||||
|
||||
@ -33,7 +33,7 @@ logger.lifecycle("""
|
||||
*******************************************
|
||||
""")
|
||||
|
||||
var rootVersion by extra("2.5.2")
|
||||
var rootVersion by extra("2.5.3")
|
||||
var snapshot by extra("SNAPSHOT")
|
||||
var revision: String by extra("")
|
||||
var buildNumber by extra("")
|
||||
|
@ -31,7 +31,7 @@ dependencies {
|
||||
implementation(gradleApi())
|
||||
implementation("org.ajoberstar.grgit:grgit-gradle:4.1.1")
|
||||
implementation("gradle.plugin.com.github.johnrengelman:shadow:7.1.2")
|
||||
implementation("io.papermc.paperweight.userdev:io.papermc.paperweight.userdev.gradle.plugin:1.4.1")
|
||||
implementation("io.papermc.paperweight.userdev:io.papermc.paperweight.userdev.gradle.plugin:1.5.1")
|
||||
}
|
||||
|
||||
kotlin {
|
||||
|
@ -10,10 +10,8 @@ worldguard-bukkit = "7.0.7"
|
||||
mapmanager = "1.8.0-SNAPSHOT"
|
||||
griefprevention = "16.18"
|
||||
griefdefender = "2.1.0-SNAPSHOT"
|
||||
mcore = "7.0.1"
|
||||
residence = "4.5._13.1"
|
||||
towny = "0.98.4.18"
|
||||
redprotect = "1.9.6"
|
||||
|
||||
# Third party
|
||||
bstats = "3.0.0"
|
||||
@ -25,7 +23,7 @@ auto-value = "1.10.1"
|
||||
findbugs = "3.0.2"
|
||||
rhino-runtime = "1.7.14"
|
||||
zstd-jni = "1.4.8-1" # Not latest as it can be difficult to obtain latest ZSTD libs
|
||||
antlr4 = "4.11.1"
|
||||
antlr4 = "4.12.0"
|
||||
json-simple = "1.1.1"
|
||||
jlibnoise = "1.0.0"
|
||||
jchronic = "0.2.4a"
|
||||
@ -55,10 +53,8 @@ worldguard = { group = "com.sk89q.worldguard", name = "worldguard-bukkit", versi
|
||||
mapmanager = { group = "com.github.InventivetalentDev", name = "MapManager", version.ref = "mapmanager" }
|
||||
griefprevention = { group = "com.github.TechFortress", name = "GriefPrevention", version.ref = "griefprevention" }
|
||||
griefdefender = { group = "com.griefdefender", name = "api", version.ref = "griefdefender" }
|
||||
mcore = { group = "com.massivecraft", name = "mcore", version.ref = "mcore" }
|
||||
residence = { group = "com.bekvon.bukkit.residence", name = "Residence", version.ref = "residence" }
|
||||
towny = { group = "com.github.TownyAdvanced", name = "Towny", version.ref = "towny" }
|
||||
redprotect = { group = "net.fabiozumbi12", name = "redprotect", version.ref = "redprotect" }
|
||||
|
||||
# Third Party
|
||||
bstatsBase = { group = "org.bstats", name = "bstats-base", version.ref = "bstats" }
|
||||
|
@ -89,7 +89,6 @@ dependencies {
|
||||
compileOnly(libs.mapmanager) { isTransitive = false }
|
||||
compileOnly(libs.griefprevention) { isTransitive = false }
|
||||
compileOnly(libs.griefdefender) { isTransitive = false }
|
||||
compileOnly(libs.mcore) { isTransitive = false }
|
||||
compileOnly(libs.residence) { isTransitive = false }
|
||||
compileOnly(libs.towny) { isTransitive = false }
|
||||
compileOnly("com.plotsquared:PlotSquared-Bukkit") { isTransitive = false }
|
||||
|
@ -1,6 +1,5 @@
|
||||
package com.fastasyncworldedit.bukkit.listener;
|
||||
|
||||
import com.fastasyncworldedit.core.command.tool.MovableTool;
|
||||
import com.fastasyncworldedit.core.command.tool.ResettableTool;
|
||||
import com.fastasyncworldedit.core.command.tool.scroll.ScrollTool;
|
||||
import com.sk89q.worldedit.LocalSession;
|
||||
@ -8,7 +7,6 @@ import com.sk89q.worldedit.bukkit.BukkitAdapter;
|
||||
import com.sk89q.worldedit.bukkit.BukkitPlayer;
|
||||
import com.sk89q.worldedit.command.tool.Tool;
|
||||
import org.bukkit.Bukkit;
|
||||
import org.bukkit.Location;
|
||||
import org.bukkit.entity.Player;
|
||||
import org.bukkit.event.EventHandler;
|
||||
import org.bukkit.event.EventPriority;
|
||||
@ -16,7 +14,6 @@ import org.bukkit.event.Listener;
|
||||
import org.bukkit.event.block.Action;
|
||||
import org.bukkit.event.player.PlayerInteractEvent;
|
||||
import org.bukkit.event.player.PlayerItemHeldEvent;
|
||||
import org.bukkit.event.player.PlayerMoveEvent;
|
||||
import org.bukkit.plugin.Plugin;
|
||||
|
||||
public class BrushListener implements Listener {
|
||||
@ -49,24 +46,6 @@ public class BrushListener implements Listener {
|
||||
}
|
||||
}
|
||||
|
||||
@EventHandler(priority = EventPriority.MONITOR, ignoreCancelled = true)
|
||||
public void onPlayerMove(PlayerMoveEvent event) {
|
||||
Location from = event.getFrom();
|
||||
Location to = event.getTo();
|
||||
if ((from.getYaw() != to.getYaw() && from.getPitch() != to.getPitch()) || from.getBlockX() != to.getBlockX() || from.getBlockZ() != to
|
||||
.getBlockZ() || from.getBlockY() != to.getBlockY()) {
|
||||
Player bukkitPlayer = event.getPlayer();
|
||||
com.sk89q.worldedit.entity.Player player = BukkitAdapter.adapt(bukkitPlayer);
|
||||
LocalSession session = player.getSession();
|
||||
Tool tool = session.getTool(player);
|
||||
if (tool != null) {
|
||||
if (tool instanceof MovableTool) {
|
||||
((MovableTool) tool).move(player);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@EventHandler(priority = EventPriority.LOWEST)
|
||||
public void onPlayerInteract(final PlayerInteractEvent event) {
|
||||
Player bukkitPlayer = event.getPlayer();
|
||||
|
@ -23,6 +23,7 @@ import com.fastasyncworldedit.bukkit.BukkitPermissionAttachmentManager;
|
||||
import com.fastasyncworldedit.bukkit.FaweBukkit;
|
||||
import com.fastasyncworldedit.core.util.UpdateNotification;
|
||||
import com.fastasyncworldedit.core.Fawe;
|
||||
import com.fastasyncworldedit.core.util.WEManager;
|
||||
import com.google.common.base.Joiner;
|
||||
import com.google.common.collect.ImmutableList;
|
||||
import com.sk89q.bukkit.util.ClassSourceValidator;
|
||||
@ -58,6 +59,7 @@ import com.sk89q.worldedit.world.weather.WeatherTypes;
|
||||
import io.papermc.lib.PaperLib;
|
||||
import org.apache.logging.log4j.Logger;
|
||||
import org.bstats.bukkit.Metrics;
|
||||
import org.bstats.charts.SimplePie;
|
||||
import org.bukkit.Bukkit;
|
||||
import org.bukkit.Material;
|
||||
import org.bukkit.NamespacedKey;
|
||||
@ -220,8 +222,10 @@ public class WorldEditPlugin extends JavaPlugin {
|
||||
}
|
||||
|
||||
// Enable metrics
|
||||
new Metrics(this, BSTATS_ID);
|
||||
|
||||
Metrics m = new Metrics(this, BSTATS_ID);
|
||||
// First introduced in build 349, release 2.5.2
|
||||
m.addCustomChart(new SimplePie("residence", ()
|
||||
-> WEManager.weManager().getManagers().toString().contains("residence") ? "Yes" : "No"));
|
||||
// Check if we are in a safe environment
|
||||
ServerLib.checkUnsafeForks();
|
||||
// Check if a new build is available
|
||||
|
@ -34,7 +34,6 @@ dependencies {
|
||||
implementation("org.apache.logging.log4j:log4j-api")
|
||||
|
||||
// Plugins
|
||||
compileOnly(libs.redprotect) { isTransitive = false }
|
||||
compileOnly("com.plotsquared:PlotSquared-Core") { isTransitive = false }
|
||||
|
||||
// ensure this is on the classpath for the AP
|
||||
|
@ -2,8 +2,16 @@ package com.fastasyncworldedit.core.command.tool;
|
||||
|
||||
import com.sk89q.worldedit.entity.Player;
|
||||
|
||||
/**
|
||||
* @deprecated This interface has no functionality anymore
|
||||
*/
|
||||
@Deprecated(forRemoval = true, since = "2.5.2")
|
||||
public interface MovableTool {
|
||||
|
||||
/**
|
||||
* @deprecated This interface has no functionality anymore
|
||||
*/
|
||||
@Deprecated(forRemoval = true, since = "2.5.2")
|
||||
boolean move(Player player);
|
||||
|
||||
}
|
||||
|
@ -18,9 +18,9 @@ public class PropertyKeySet implements Set<PropertyKey> {
|
||||
|
||||
public static PropertyKeySet ofCollection(Collection<? extends PropertyKey> collection) {
|
||||
PropertyKeySet set = new PropertyKeySet();
|
||||
if (collection instanceof PropertyKeySet) {
|
||||
if (collection instanceof PropertyKeySet pks) {
|
||||
// simple copy
|
||||
set.bits.or(((PropertyKeySet) collection).bits);
|
||||
set.bits.or(pks.bits);
|
||||
return set;
|
||||
}
|
||||
for (PropertyKey key : collection) {
|
||||
@ -51,10 +51,10 @@ public class PropertyKeySet implements Set<PropertyKey> {
|
||||
|
||||
@Override
|
||||
public boolean contains(Object o) {
|
||||
if (!(o instanceof PropertyKey)) {
|
||||
if (!(o instanceof PropertyKey pk)) {
|
||||
return false;
|
||||
}
|
||||
return this.bits.get(((PropertyKey) o).getId());
|
||||
return this.bits.get(pk.getId());
|
||||
}
|
||||
|
||||
@Nonnull
|
||||
@ -92,26 +92,26 @@ public class PropertyKeySet implements Set<PropertyKey> {
|
||||
|
||||
@Override
|
||||
public boolean remove(Object o) {
|
||||
if (!(o instanceof PropertyKey)) {
|
||||
if (!(o instanceof PropertyKey pk)) {
|
||||
return false;
|
||||
}
|
||||
if (!this.bits.get(((PropertyKey) o).getId())) {
|
||||
if (!this.bits.get(pk.getId())) {
|
||||
return false;
|
||||
}
|
||||
this.bits.clear(((PropertyKey) o).getId());
|
||||
this.bits.clear(pk.getId());
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean containsAll(@Nonnull Collection<?> c) {
|
||||
if (c instanceof PropertyKeySet) {
|
||||
return ((PropertyKeySet) c).bits.intersects(this.bits);
|
||||
if (c instanceof PropertyKeySet pks) {
|
||||
return pks.bits.intersects(this.bits);
|
||||
}
|
||||
for (Object o : c) {
|
||||
if (!(o instanceof PropertyKey)) {
|
||||
if (!(o instanceof PropertyKey pk)) {
|
||||
return false;
|
||||
}
|
||||
if (!this.bits.get(((PropertyKey) o).getId())) {
|
||||
if (!this.bits.get(pk.getId())) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
@ -121,8 +121,8 @@ public class PropertyKeySet implements Set<PropertyKey> {
|
||||
@Override
|
||||
public boolean addAll(@Nonnull Collection<? extends PropertyKey> c) {
|
||||
int cardinality = this.bits.cardinality();
|
||||
if (c instanceof PropertyKeySet) {
|
||||
this.bits.or(((PropertyKeySet) c).bits);
|
||||
if (c instanceof PropertyKeySet pks) {
|
||||
this.bits.or(pks.bits);
|
||||
} else {
|
||||
for (PropertyKey key : c) {
|
||||
this.bits.set(key.getId());
|
||||
@ -135,8 +135,8 @@ public class PropertyKeySet implements Set<PropertyKey> {
|
||||
public boolean retainAll(@Nonnull Collection<?> c) {
|
||||
int cardinality = this.bits.cardinality();
|
||||
BitSet removal;
|
||||
if (c instanceof PropertyKeySet) {
|
||||
removal = ((PropertyKeySet) c).bits;
|
||||
if (c instanceof PropertyKeySet pks) {
|
||||
removal = pks.bits;
|
||||
} else {
|
||||
removal = new BitSet(this.bits.length());
|
||||
for (PropertyKey key : this) {
|
||||
@ -152,12 +152,12 @@ public class PropertyKeySet implements Set<PropertyKey> {
|
||||
@Override
|
||||
public boolean removeAll(@Nonnull Collection<?> c) {
|
||||
int cardinality = this.bits.cardinality();
|
||||
if (c instanceof PropertyKeySet) {
|
||||
this.bits.andNot(((PropertyKeySet) c).bits);
|
||||
if (c instanceof PropertyKeySet pks) {
|
||||
this.bits.andNot(pks.bits);
|
||||
} else {
|
||||
for (Object o : c) { // mh
|
||||
if (o instanceof PropertyKey) {
|
||||
this.bits.clear(((PropertyKey) o).getId());
|
||||
if (o instanceof PropertyKey pk) {
|
||||
this.bits.clear(pk.getId());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren