Update dependencies to 1.17

This commit is contained in:
JOO200 2021-06-11 16:51:35 +02:00 committed by wizjany
parent 32d16a7eaa
commit 3cb83465d1
6 changed files with 21 additions and 14 deletions

View File

@ -23,6 +23,10 @@ repositories {
name = "aikar-timings"
url = uri("http://repo.aikar.co/nexus/content/groups/aikar/")
}
maven {
name = "spigot"
url = uri("https://hub.spigotmc.org/nexus/content/repositories/snapshots/")
}
}
configurations {
@ -32,7 +36,8 @@ configurations {
dependencies {
"compile"(project(":worldguard-core"))
//"compile"(project(":worldguard-libs:bukkit"))
"api"("com.destroystokyo.paper:paper-api:1.16.2-R0.1-SNAPSHOT")
// "api"("com.destroystokyo.paper:paper-api:1.16.2-R0.1-SNAPSHOT")
"api"("org.spigotmc:spigot-api:1.17-R0.1-SNAPSHOT")
"shade"("io.papermc:paperlib:1.0.4")
"api"("com.sk89q.worldedit:worldedit-bukkit:${Versions.WORLDEDIT}") { isTransitive = false }
"implementation"("com.google.guava:guava:${Versions.GUAVA}")

View File

@ -263,13 +263,13 @@ public final class Cause {
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,10 +131,12 @@ class AbstractListener implements Listener {
(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 class EventAbstractionListener extends AbstractListener {
@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
@ -962,13 +962,13 @@ public class EventAbstractionListener extends AbstractListener {
if ((entry = moveItemDebounce.tryDebounce(event)) != null) {
InventoryHolder sourceHolder;
InventoryHolder targetHolder;
if (HAS_SNAPSHOT_INVHOLDER) {
/*if (HAS_SNAPSHOT_INVHOLDER) {
sourceHolder = event.getSource().getHolder(false);
targetHolder = event.getDestination().getHolder(false);
} else {
} else {*/
sourceHolder = event.getSource().getHolder();
targetHolder = event.getDestination().getHolder();
}
//}
Cause cause;

View File

@ -235,7 +235,7 @@ public final class Materials {
MATERIAL_FLAGS.put(Material.ACACIA_DOOR, MODIFIED_ON_RIGHT);
MATERIAL_FLAGS.put(Material.DARK_OAK_DOOR, MODIFIED_ON_RIGHT);
MATERIAL_FLAGS.put(Material.GRASS_PATH, 0);
MATERIAL_FLAGS.put(Material.DIRT_PATH, 0);
MATERIAL_FLAGS.put(Material.CHORUS_PLANT, 0);
MATERIAL_FLAGS.put(Material.CHORUS_FLOWER, 0);
MATERIAL_FLAGS.put(Material.BEETROOTS, 0);

View File

@ -19,7 +19,7 @@
package com.sk89q.worldguard.util.profile.resolver;
import com.destroystokyo.paper.profile.PlayerProfile;
//import com.destroystokyo.paper.profile.PlayerProfile;
import com.sk89q.worldguard.util.profile.Profile;
import io.papermc.lib.PaperLib;
import org.bukkit.Bukkit;
@ -43,11 +43,11 @@ public final class PaperProfileService extends SingleRequestService {
@Override
@Nullable
public Profile findByName(String name) {
PlayerProfile profile = Bukkit.createProfile(name);
/* PlayerProfile profile = Bukkit.createProfile(name);
if (profile.completeFromCache()) {
//noinspection ConstantConditions - completeFromCache guarantees non-null on success
return new Profile(profile.getId(), profile.getName());
}
}*/
return null;
}