mirror of
https://github.com/plexusorg/Plex-FAWE.git
synced 2025-06-12 04:23:54 +00:00
Fix some api compatibility issues
This commit is contained in:
@ -10,7 +10,7 @@ dependencies {
|
||||
compile project(':worldedit-core')
|
||||
compile 'com.sk89q:dummypermscompat:1.8'
|
||||
compile 'com.destroystokyo.paper:paper-api:1.13-R0.1-SNAPSHOT'
|
||||
compile "org.bukkit:craftbukkit:1.13-R0.1-SNAPSHOT"
|
||||
compile "org.spigotmc:spigot:1.13-R0.1-SNAPSHOT"
|
||||
testCompile 'org.mockito:mockito-core:1.9.0-rc1'
|
||||
compile 'net.milkbowl.vault:VaultAPI:1.5.6'
|
||||
compile 'com.massivecraft:factions:2.8.0'
|
||||
|
@ -1,5 +1,6 @@
|
||||
package com.sk89q.worldedit.bukkit;
|
||||
|
||||
import com.bekvon.bukkit.residence.commands.material;
|
||||
import com.sk89q.worldedit.registry.state.Property;
|
||||
import com.sk89q.worldedit.world.block.BlockState;
|
||||
import com.sk89q.worldedit.world.block.BlockStateHolder;
|
||||
@ -25,11 +26,14 @@ public class CachedBukkitAdapter {
|
||||
blockTypes = new BlockTypes[materials.length];
|
||||
for (int i = 0; i < materials.length; i++) {
|
||||
Material material = materials[i];
|
||||
if (material.isBlock() && !material.isLegacy()) {
|
||||
NamespacedKey key = material.getKey();
|
||||
blockTypes[i] = BlockTypes.get(key.getNamespace() + ":" + key.getKey());
|
||||
} else if (material.isItem() && !material.isLegacy()) {
|
||||
itemTypes[i] = ItemTypes.get(material.getKey().toString());
|
||||
if (material.isLegacy()) continue;
|
||||
NamespacedKey key = material.getKey();
|
||||
String id = key.getNamespace() + ":" + key.getKey();
|
||||
if (material.isBlock()) {
|
||||
blockTypes[i] = BlockTypes.get(id);
|
||||
}
|
||||
if (material.isItem()) {
|
||||
itemTypes[i] = ItemTypes.get(id);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user