mirror of
https://github.com/plexusorg/Plex-FAWE.git
synced 2025-06-12 04:23:54 +00:00
Basically finish the state system. Just 1 more bug that I'm encountering.
This commit is contained in:
@ -28,7 +28,6 @@ import com.sk89q.worldedit.world.registry.PassthroughBlockMaterial;
|
||||
import org.bukkit.Material;
|
||||
|
||||
import java.util.EnumMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
import javax.annotation.Nullable;
|
||||
@ -39,17 +38,9 @@ public class BukkitBlockRegistry extends BundledBlockRegistry {
|
||||
|
||||
@Nullable
|
||||
@Override
|
||||
public BlockMaterial getMaterial(String id) {
|
||||
return materialMap.computeIfAbsent(BukkitUtil.toMaterial(BlockTypes.get(id)),
|
||||
material -> new BukkitBlockMaterial(BukkitBlockRegistry.super.getMaterial(id), material));
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<Object> getPropertyValues(BlockType blockType, Property<?> property) {
|
||||
if (WorldEditPlugin.getInstance().getBukkitImplAdapter() != null) {
|
||||
return WorldEditPlugin.getInstance().getBukkitImplAdapter().getPropertyValues(blockType, property);
|
||||
}
|
||||
return super.getPropertyValues(blockType, property);
|
||||
public BlockMaterial getMaterial(BlockType blockType) {
|
||||
return materialMap.computeIfAbsent(BukkitUtil.toMaterial(blockType),
|
||||
material -> new BukkitBlockMaterial(BukkitBlockRegistry.super.getMaterial(blockType), material));
|
||||
}
|
||||
|
||||
@Nullable
|
||||
|
@ -82,12 +82,13 @@ public class WorldEditPlugin extends JavaPlugin implements TabCompleter {
|
||||
|
||||
WorldEdit worldEdit = WorldEdit.getInstance();
|
||||
|
||||
loadConfig(); // Load configuration
|
||||
PermissionsResolverManager.initialize(this); // Setup permission resolver
|
||||
|
||||
// Setup platform
|
||||
server = new BukkitServerInterface(this, getServer());
|
||||
worldEdit.getPlatformManager().register(server);
|
||||
worldEdit.loadMappings();
|
||||
|
||||
loadConfig(); // Load configuration
|
||||
PermissionsResolverManager.initialize(this); // Setup permission resolver
|
||||
|
||||
// Register CUI
|
||||
getServer().getMessenger().registerIncomingPluginChannel(this, CUI_PLUGIN_CHANNEL, new CUIChannelListener(this));
|
||||
|
@ -28,7 +28,6 @@ import org.bukkit.Location;
|
||||
import org.bukkit.block.Biome;
|
||||
import org.bukkit.entity.Entity;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
import javax.annotation.Nullable;
|
||||
@ -95,15 +94,6 @@ public interface BukkitImplAdapter {
|
||||
@Nullable
|
||||
Entity createEntity(Location location, BaseEntity state);
|
||||
|
||||
|
||||
/**
|
||||
* Get a list of values for a property.
|
||||
*
|
||||
* @param property The property
|
||||
* @return The list of values
|
||||
*/
|
||||
List<Object> getPropertyValues(BlockType blockType, Property<?> property);
|
||||
|
||||
/**
|
||||
* Get a map of string -> properties
|
||||
*
|
||||
|
Reference in New Issue
Block a user