mirror of
https://github.com/plexusorg/Plex-FAWE.git
synced 2025-07-10 07:08:35 +00:00
Remove all raw usages of BSH, improve API generics
This commit is contained in:
committed by
IronApollo
parent
1d87642b52
commit
590b7e23a9
@ -22,15 +22,10 @@ package com.sk89q.worldedit.bukkit.adapter;
|
||||
import com.sk89q.jnbt.Tag;
|
||||
import com.sk89q.worldedit.world.block.BlockState;
|
||||
import com.sk89q.jnbt.CompoundTag;
|
||||
import com.sk89q.worldedit.world.block.BaseBlock;
|
||||
import com.sk89q.worldedit.entity.BaseEntity;
|
||||
import com.sk89q.worldedit.entity.Player;
|
||||
import com.sk89q.worldedit.math.BlockVector3;
|
||||
import com.sk89q.worldedit.registry.state.Property;
|
||||
import com.sk89q.worldedit.world.block.BlockState;
|
||||
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 com.sk89q.worldedit.world.registry.BlockMaterial;
|
||||
|
||||
@ -38,6 +33,7 @@ import org.bukkit.Chunk;
|
||||
import org.bukkit.Location;
|
||||
import org.bukkit.block.Biome;
|
||||
import org.bukkit.entity.Entity;
|
||||
import org.bukkit.entity.Player;
|
||||
|
||||
import java.util.Map;
|
||||
|
||||
@ -76,9 +72,18 @@ public interface BukkitImplAdapter<T> extends IBukkitAdapter {
|
||||
*/
|
||||
BlockState getBlock(Location location);
|
||||
|
||||
boolean setBlock(Chunk chunk, int x, int y, int z, BlockStateHolder state, boolean update);
|
||||
boolean setBlock(Chunk chunk, int x, int y, int z, BlockStateHolder<?> state, boolean update);
|
||||
|
||||
boolean isChunkInUse(Chunk chunk);
|
||||
/**
|
||||
* Set the block at the given location.
|
||||
*
|
||||
* @param location the location
|
||||
* @param state the block
|
||||
* @param notifyAndLight notify and light if set
|
||||
* @return true if a block was likely changed
|
||||
*/
|
||||
boolean setBlock(Location location, BlockStateHolder<?> state, boolean notifyAndLight);
|
||||
|
||||
/**
|
||||
* Notifies the simulation that the block at the given location has
|
||||
@ -114,20 +119,12 @@ public interface BukkitImplAdapter<T> extends IBukkitAdapter {
|
||||
* @param blockType The block type
|
||||
* @return The properties map
|
||||
*/
|
||||
Map<String, ? extends Property> getProperties(BlockType blockType);
|
||||
Map<String, ? extends Property<?>> getProperties(BlockType blockType);
|
||||
|
||||
default BlockMaterial getMaterial(BlockType blockType) {
|
||||
return null;
|
||||
}
|
||||
/**
|
||||
* Send the given NBT data to the player.
|
||||
*
|
||||
* @param player The player
|
||||
* @param pos The position
|
||||
* @param nbtData The NBT Data
|
||||
*/
|
||||
void sendFakeNBT(Player player, BlockVector3 pos, CompoundTag nbtData);
|
||||
|
||||
|
||||
default BlockMaterial getMaterial(BlockState blockState) {
|
||||
return null;
|
||||
}
|
||||
@ -139,4 +136,21 @@ public interface BukkitImplAdapter<T> extends IBukkitAdapter {
|
||||
default T fromNative(Tag foreign) {
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
* Send the given NBT data to the player.
|
||||
*
|
||||
* @param player The player
|
||||
* @param pos The position
|
||||
* @param nbtData The NBT Data
|
||||
*/
|
||||
void sendFakeNBT(Player player, BlockVector3 pos, CompoundTag nbtData);
|
||||
|
||||
/**
|
||||
* Make the client think it has operator status.
|
||||
* This does not give them any operator capabilities.
|
||||
*
|
||||
* @param player The player
|
||||
*/
|
||||
void sendFakeOP(Player player);
|
||||
}
|
||||
|
Reference in New Issue
Block a user