@@ -232,7 +232,7 @@ public class CraftBlock implements Block {
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "CraftBlock{pos=" + position + ",type=" + getType() + ",data=" + getNMS() + '}';
|
||||
return "CraftBlock{pos=" + position + ",type=" + getType() + ",data=" + getNMS() + ",fluid=" + world.getFluid(position) + '}';
|
||||
}
|
||||
|
||||
public static BlockFace notchToBlockFace(EnumDirection notch) {
|
||||
|
||||
@@ -835,6 +835,12 @@ public class CraftEventFactory {
|
||||
return !event.isCancelled();
|
||||
}
|
||||
|
||||
public static FluidLevelChangeEvent callFluidLevelChangeEvent(World world, BlockPosition block, IBlockData newData) {
|
||||
FluidLevelChangeEvent event = new FluidLevelChangeEvent(CraftBlock.at(world, block), CraftBlockData.fromData(newData));
|
||||
world.getServer().getPluginManager().callEvent(event);
|
||||
return event;
|
||||
}
|
||||
|
||||
public static FoodLevelChangeEvent callFoodLevelChangeEvent(EntityHuman entity, int level) {
|
||||
FoodLevelChangeEvent event = new FoodLevelChangeEvent(entity.getBukkitEntity(), level);
|
||||
entity.getBukkitEntity().getServer().getPluginManager().callEvent(event);
|
||||
|
||||
Reference in New Issue
Block a user