mirror of
https://github.com/EngineHub/WorldGuard.git
synced 2025-01-23 16:41:20 +01:00
Initial 1.15 stuff.
Materials is not really cross-version compatible. Really could do with some rewriting at some point.
This commit is contained in:
parent
c5355adb4b
commit
9adac4f239
@ -24,7 +24,8 @@
|
||||
dependencies {
|
||||
"compile"(project(":worldguard-core"))
|
||||
//"compile"(project(":worldguard-libs:bukkit"))
|
||||
"api"("com.destroystokyo.paper:paper-api:1.14.4-R0.1-SNAPSHOT")
|
||||
//"api"("com.destroystokyo.paper:paper-api:1.14.4-R0.1-SNAPSHOT")
|
||||
"api"("org.spigotmc:spigot-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 = ((Firework) o).getSpawningEntity();
|
||||
UUID spawningUUID = null;//((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 = entity.getOrigin();
|
||||
loc = null;//entity.getOrigin();
|
||||
if (loc == null) {
|
||||
loc = entity.getLocation();
|
||||
}
|
||||
|
@ -692,6 +692,16 @@ public final class Materials {
|
||||
MATERIAL_FLAGS.put(Material.SUSPICIOUS_STEW, 0);
|
||||
MATERIAL_FLAGS.put(Material.SWEET_BERRIES, 0);
|
||||
|
||||
// 1.15
|
||||
try {
|
||||
MATERIAL_FLAGS.put(Material.BEEHIVE, MODIFIED_ON_RIGHT);
|
||||
MATERIAL_FLAGS.put(Material.BEE_NEST, 0);
|
||||
MATERIAL_FLAGS.put(Material.HONEY_BLOCK, 0);
|
||||
MATERIAL_FLAGS.put(Material.HONEYCOMB_BLOCK, 0);
|
||||
MATERIAL_FLAGS.put(Material.HONEY_BOTTLE, 0);
|
||||
MATERIAL_FLAGS.put(Material.HONEYCOMB, 0);
|
||||
} catch (NoSuchFieldError ignored) {
|
||||
}
|
||||
|
||||
// Fake tags
|
||||
for (Material m : shulkerBoxes) {
|
||||
@ -998,6 +1008,7 @@ public static boolean isSpawnEgg(Material material) {
|
||||
switch (material) {
|
||||
case SPIDER_SPAWN_EGG:
|
||||
case BAT_SPAWN_EGG:
|
||||
case BEE_SPAWN_EGG:
|
||||
case BLAZE_SPAWN_EGG:
|
||||
case CAT_SPAWN_EGG:
|
||||
case CAVE_SPIDER_SPAWN_EGG:
|
||||
@ -1066,6 +1077,8 @@ public static EntityType getEntitySpawnEgg(Material material) {
|
||||
return EntityType.SPIDER;
|
||||
case BAT_SPAWN_EGG:
|
||||
return EntityType.BAT;
|
||||
case BEE_SPAWN_EGG:
|
||||
return EntityType.BEE;
|
||||
case BLAZE_SPAWN_EGG:
|
||||
return EntityType.BLAZE;
|
||||
case CAT_SPAWN_EGG:
|
||||
|
@ -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;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user