Switch back dependency from Spigot to Paper

This commit is contained in:
JOO200 2021-06-19 20:50:25 +02:00 committed by wizjany
parent 7436d5064e
commit 4dfb9bea38
4 changed files with 7 additions and 10 deletions

View File

@ -32,8 +32,7 @@
dependencies {
"api"(project(":worldguard-core"))
// "compileOnly"("com.destroystokyo.paper:paper-api:1.16.2-R0.1-SNAPSHOT")
/*"runtimeOnly"*/"api"("org.spigotmc:spigot-api:1.17-R0.1-SNAPSHOT") {
"api"("io.papermc.paper:paper-aPI:1.17-R0.1-SNAPSHOT") {
exclude("junit", "junit")
}
"api"("com.sk89q.worldedit:worldedit-bukkit:${Versions.WORLDEDIT}") { isTransitive = false }

View File

@ -263,13 +263,13 @@ private void addAll(@Nullable Object... element) {
ProjectileSource shooter = ((Projectile) o).getShooter();
addAll(shooter);
if (shooter == null && o instanceof Firework && PaperLib.isPaper()) {
/* UUID spawningUUID = ((Firework) o).getSpawningEntity();
UUID spawningUUID = ((Firework) o).getSpawningEntity();
if (spawningUUID != null) {
Entity spawningEntity = Bukkit.getEntity(spawningUUID);
if (spawningEntity != null) {
addAll(spawningEntity);
}
}*/
}
}
} else if (o instanceof Vehicle) {
((Vehicle) o).getPassengers().forEach(this::addAll);

View File

@ -131,12 +131,10 @@ protected RegionAssociable createRegionAssociable(Cause cause) {
(BukkitWorldConfiguration) getWorldConfig(BukkitAdapter.adapt(entity.getWorld()));
Location loc;
if (PaperLib.isPaper() && config.usePaperEntityOrigin) {
/*
loc = entity.getOrigin();
if (loc == null) {
loc = entity.getLocation();
}*/
loc = entity.getLocation();
}
} else {
loc = entity.getLocation();
}

View File

@ -942,11 +942,11 @@ public void onInventoryOpen(InventoryOpenEvent event) {
@EventHandler(ignoreCancelled = true)
public void onInventoryMoveItem(InventoryMoveItemEvent event) {
InventoryHolder causeHolder;
/* if (HAS_SNAPSHOT_INVHOLDER) {
if (HAS_SNAPSHOT_INVHOLDER) {
causeHolder = event.getInitiator().getHolder(false);
} else {*/
} else {
causeHolder = event.getInitiator().getHolder();
//}
}
WorldConfiguration wcfg = null;
if (causeHolder instanceof Hopper