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" name = "aikar-timings"
url = uri("http://repo.aikar.co/nexus/content/groups/aikar/") url = uri("http://repo.aikar.co/nexus/content/groups/aikar/")
} }
maven {
name = "spigot"
url = uri("https://hub.spigotmc.org/nexus/content/repositories/snapshots/")
}
} }
configurations { configurations {
@ -32,7 +36,8 @@ configurations {
dependencies { dependencies {
"compile"(project(":worldguard-core")) "compile"(project(":worldguard-core"))
//"compile"(project(":worldguard-libs:bukkit")) //"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") "shade"("io.papermc:paperlib:1.0.4")
"api"("com.sk89q.worldedit:worldedit-bukkit:${Versions.WORLDEDIT}") { isTransitive = false } "api"("com.sk89q.worldedit:worldedit-bukkit:${Versions.WORLDEDIT}") { isTransitive = false }
"implementation"("com.google.guava:guava:${Versions.GUAVA}") "implementation"("com.google.guava:guava:${Versions.GUAVA}")

View File

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

View File

@ -131,10 +131,12 @@ class AbstractListener implements Listener {
(BukkitWorldConfiguration) getWorldConfig(BukkitAdapter.adapt(entity.getWorld())); (BukkitWorldConfiguration) getWorldConfig(BukkitAdapter.adapt(entity.getWorld()));
Location loc; Location loc;
if (PaperLib.isPaper() && config.usePaperEntityOrigin) { if (PaperLib.isPaper() && config.usePaperEntityOrigin) {
/*
loc = entity.getOrigin(); loc = entity.getOrigin();
if (loc == null) { if (loc == null) {
loc = entity.getLocation(); loc = entity.getLocation();
} }*/
loc = entity.getLocation();
} else { } else {
loc = entity.getLocation(); loc = entity.getLocation();
} }

View File

@ -942,11 +942,11 @@ public class EventAbstractionListener extends AbstractListener {
@EventHandler(ignoreCancelled = true) @EventHandler(ignoreCancelled = true)
public void onInventoryMoveItem(InventoryMoveItemEvent event) { public void onInventoryMoveItem(InventoryMoveItemEvent event) {
InventoryHolder causeHolder; InventoryHolder causeHolder;
if (HAS_SNAPSHOT_INVHOLDER) { /* if (HAS_SNAPSHOT_INVHOLDER) {
causeHolder = event.getInitiator().getHolder(false); causeHolder = event.getInitiator().getHolder(false);
} else { } else {*/
causeHolder = event.getInitiator().getHolder(); causeHolder = event.getInitiator().getHolder();
} //}
WorldConfiguration wcfg = null; WorldConfiguration wcfg = null;
if (causeHolder instanceof Hopper if (causeHolder instanceof Hopper
@ -962,13 +962,13 @@ public class EventAbstractionListener extends AbstractListener {
if ((entry = moveItemDebounce.tryDebounce(event)) != null) { if ((entry = moveItemDebounce.tryDebounce(event)) != null) {
InventoryHolder sourceHolder; InventoryHolder sourceHolder;
InventoryHolder targetHolder; InventoryHolder targetHolder;
if (HAS_SNAPSHOT_INVHOLDER) { /*if (HAS_SNAPSHOT_INVHOLDER) {
sourceHolder = event.getSource().getHolder(false); sourceHolder = event.getSource().getHolder(false);
targetHolder = event.getDestination().getHolder(false); targetHolder = event.getDestination().getHolder(false);
} else { } else {*/
sourceHolder = event.getSource().getHolder(); sourceHolder = event.getSource().getHolder();
targetHolder = event.getDestination().getHolder(); targetHolder = event.getDestination().getHolder();
} //}
Cause cause; 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.ACACIA_DOOR, MODIFIED_ON_RIGHT);
MATERIAL_FLAGS.put(Material.DARK_OAK_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_PLANT, 0);
MATERIAL_FLAGS.put(Material.CHORUS_FLOWER, 0); MATERIAL_FLAGS.put(Material.CHORUS_FLOWER, 0);
MATERIAL_FLAGS.put(Material.BEETROOTS, 0); MATERIAL_FLAGS.put(Material.BEETROOTS, 0);

View File

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