mirror of
https://github.com/EngineHub/WorldGuard.git
synced 2024-09-27 22:27:27 +02:00
Update dependencies to 1.17
This commit is contained in:
parent
32d16a7eaa
commit
3cb83465d1
@ -23,6 +23,10 @@
|
|||||||
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 @@
|
|||||||
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}")
|
||||||
|
@ -263,13 +263,13 @@ private void addAll(@Nullable Object... element) {
|
|||||||
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);
|
||||||
|
@ -131,10 +131,12 @@ protected RegionAssociable createRegionAssociable(Cause cause) {
|
|||||||
(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();
|
||||||
}
|
}
|
||||||
|
@ -942,11 +942,11 @@ public void onInventoryOpen(InventoryOpenEvent event) {
|
|||||||
@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 void onInventoryMoveItem(InventoryMoveItemEvent event) {
|
|||||||
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;
|
||||||
|
|
||||||
|
@ -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);
|
||||||
|
@ -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 int getIdealRequestLimit() {
|
|||||||
@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;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user