mirror of
https://github.com/plexusorg/Plex-FAWE.git
synced 2025-07-10 06:58:34 +00:00
Copy paste/merge FAWE classes to this WorldEdit fork
- so certain people can look at the diff and complain about my sloppy code :( Signed-off-by: Jesse Boyd <jessepaleg@gmail.com>
This commit is contained in:
@ -19,11 +19,15 @@
|
||||
|
||||
package com.sk89q.worldedit.bukkit.adapter;
|
||||
|
||||
import com.sk89q.worldedit.world.block.BaseBlock;
|
||||
import com.sk89q.worldedit.entity.BaseEntity;
|
||||
import com.sk89q.jnbt.Tag;
|
||||
import com.sk89q.worldedit.blocks.BaseBlock;
|
||||
import com.sk89q.worldedit.world.block.BlockState;
|
||||
import com.sk89q.worldedit.registry.state.Property;
|
||||
import com.sk89q.worldedit.world.block.BlockStateHolder;
|
||||
import com.sk89q.worldedit.world.block.BlockState;
|
||||
import com.sk89q.worldedit.entity.BaseEntity;
|
||||
import com.sk89q.worldedit.world.block.BlockType;
|
||||
import net.minecraft.server.v1_13_R1.NBTBase;
|
||||
import org.bukkit.Location;
|
||||
import org.bukkit.block.Biome;
|
||||
import org.bukkit.entity.Entity;
|
||||
@ -35,7 +39,7 @@ import javax.annotation.Nullable;
|
||||
/**
|
||||
* An interface for adapters of various Bukkit implementations.
|
||||
*/
|
||||
public interface BukkitImplAdapter {
|
||||
public interface BukkitImplAdapter<T> {
|
||||
|
||||
/**
|
||||
* Get the biome ID for the given biome.
|
||||
@ -63,7 +67,7 @@ public interface BukkitImplAdapter {
|
||||
* @param location the location
|
||||
* @return the block
|
||||
*/
|
||||
BaseBlock getBlock(Location location);
|
||||
BlockState getBlock(Location location);
|
||||
|
||||
/**
|
||||
* Set the block at the given location.
|
||||
@ -101,4 +105,12 @@ public interface BukkitImplAdapter {
|
||||
* @return The properties map
|
||||
*/
|
||||
Map<String, ? extends Property> getProperties(BlockType blockType);
|
||||
|
||||
default Tag toNative(T foreign) {
|
||||
return null;
|
||||
}
|
||||
|
||||
default T fromNative(Tag foreign) {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
@ -77,6 +77,10 @@ public class BukkitImplLoader {
|
||||
}
|
||||
}
|
||||
|
||||
public void addClass(Class cls) {
|
||||
adapterCandidates.add(0, cls.getName());
|
||||
}
|
||||
|
||||
/**
|
||||
* Search the given JAR for candidate implementations.
|
||||
*
|
||||
|
Reference in New Issue
Block a user