Skip to content
Permalink
Browse files

Use Paper-API 1.15 as Dependency

  • Loading branch information
JOO200 authored and wizjany committed Dec 16, 2019
1 parent 9adac4f commit 05f7d68705429d76d6e16396dcac45b63aee570f
@@ -24,8 +24,7 @@ repositories {
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 }
@@ -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) {
@@ -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();
}
@@ -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;
}

0 comments on commit 05f7d68

Please sign in to comment.
You can’t perform that action at this time.