Use Paper-API 1.15 as Dependency

This commit is contained in:
JOO200 2019-12-16 20:04:44 +01:00 committed by wizjany
parent 9adac4f239
commit 05f7d68705
4 changed files with 9 additions and 10 deletions

View File

@ -24,8 +24,7 @@
dependencies {
"compile"(project(":worldguard-core"))
//"compile"(project(":worldguard-libs:bukkit"))
//"api"("com.destroystokyo.paper:paper-api:1.14.4-R0.1-SNAPSHOT")
"api"("org.spigotmc:spigot-api:1.15-R0.1-SNAPSHOT")
"api"("com.destroystokyo.paper:paper-api:1.15-R0.1-SNAPSHOT")
"implementation"("io.papermc:paperlib:1.0.2")
"api"("com.sk89q.worldedit:worldedit-bukkit:7.0.1-SNAPSHOT") { isTransitive = false }
"implementation"("com.sk89q:commandbook:2.3") { isTransitive = false }

View File

@ -262,7 +262,7 @@ private void addAll(@Nullable Object... element) {
} else if (o instanceof Projectile) {
addAll(((Projectile) o).getShooter());
} else if (o instanceof Firework && PaperLib.isPaper()) {
UUID spawningUUID = null;//((Firework) o).getSpawningEntity();
UUID spawningUUID = ((Firework) o).getSpawningEntity();
if (spawningUUID != null) {
Entity spawningEntity = Bukkit.getEntity(spawningUUID);
if (spawningEntity != null) {

View File

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

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 int getIdealRequestLimit() {
@Override
@Nullable
public Profile findByName(String name) {
// PlayerProfile profile = Bukkit.createProfile(name);
// if (profile.completeFromCache()) {
// //noinspection ConstantConditions - completeFromCache guarantees non-null on success
// return new Profile(profile.getId(), profile.getName());
// }
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;
}