Citizens2/main/src/main/java/net/citizensnpcs/util/NMSBridge.java

210 lines
6.6 KiB
Java
Raw Normal View History

package net.citizensnpcs.util;
import java.util.Collection;
import java.util.List;
import org.bukkit.Location;
import org.bukkit.World;
2016-11-17 10:00:16 +01:00
import org.bukkit.block.Block;
2020-06-27 09:41:47 +02:00
import org.bukkit.entity.Enderman;
import org.bukkit.entity.Entity;
import org.bukkit.entity.FishHook;
import org.bukkit.entity.LivingEntity;
2019-04-24 15:01:22 +02:00
import org.bukkit.entity.Ocelot;
import org.bukkit.entity.Player;
import org.bukkit.entity.Tameable;
import org.bukkit.entity.Wither;
import org.bukkit.event.entity.CreatureSpawnEvent.SpawnReason;
2022-06-12 13:49:21 +02:00
import org.bukkit.inventory.Inventory;
2022-06-11 19:37:38 +02:00
import org.bukkit.inventory.InventoryView;
import org.bukkit.inventory.meta.SkullMeta;
2020-03-03 16:31:04 +01:00
import org.bukkit.scoreboard.Team;
2016-08-02 18:13:21 +02:00
import org.bukkit.util.Vector;
import com.mojang.authlib.GameProfile;
import com.mojang.authlib.GameProfileRepository;
import net.citizensnpcs.api.ai.NavigatorParameters;
2016-12-26 17:38:59 +01:00
import net.citizensnpcs.api.command.CommandManager;
import net.citizensnpcs.api.command.exception.CommandException;
2016-11-17 10:00:16 +01:00
import net.citizensnpcs.api.npc.BlockBreaker;
import net.citizensnpcs.api.npc.BlockBreaker.BlockBreakerConfiguration;
import net.citizensnpcs.api.npc.NPC;
import net.citizensnpcs.api.npc.NPCRegistry;
import net.citizensnpcs.api.util.BoundingBox;
import net.citizensnpcs.npc.ai.MCNavigationStrategy.MCNavigator;
import net.citizensnpcs.npc.ai.MCTargetStrategy.TargetNavigator;
import net.citizensnpcs.npc.skin.SkinnableEntity;
public interface NMSBridge {
public boolean addEntityToWorld(Entity entity, SpawnReason custom);
public void addOrRemoveFromPlayerList(Entity entity, boolean remove);
public void attack(LivingEntity attacker, LivingEntity target);
public void cancelMoveDestination(Entity entity);
2019-04-25 09:43:44 +02:00
public GameProfile fillProfileProperties(GameProfile profile, boolean requireSecure) throws Throwable;
2016-11-17 10:00:16 +01:00
public BlockBreaker getBlockBreaker(Entity entity, Block targetBlock, BlockBreakerConfiguration config);
public Object getBossBar(Entity entity);
public BoundingBox getBoundingBox(Entity handle);
public BoundingBox getCollisionBox(Block block);
public Location getDestination(Entity entity);
public GameProfileRepository getGameProfileRepository();
2016-12-11 10:12:29 +01:00
public float getHeadYaw(Entity entity);
2020-07-06 02:42:46 +02:00
public double getHeight(Entity entity);
public float getHorizontalMovement(Entity entity);
public NPC getNPC(Entity entity);
public List<Entity> getPassengers(Entity entity);
public GameProfile getProfile(SkullMeta meta);
public String getSound(String flag) throws CommandException;
public float getSpeedFor(NPC npc);
public float getStepHeight(Entity entity);
public TargetNavigator getTargetNavigator(Entity handle, Entity target, NavigatorParameters parameters);
2016-08-02 18:13:21 +02:00
public MCNavigator getTargetNavigator(Entity entity, Iterable<Vector> dest, NavigatorParameters params);
public MCNavigator getTargetNavigator(Entity entity, Location dest, NavigatorParameters params);
public Entity getVehicle(Entity entity);
public float getVerticalMovement(Entity entity);
2020-07-06 02:42:46 +02:00
public double getWidth(Entity entity);
2020-04-30 13:11:56 +02:00
public float getYaw(Entity entity);
public boolean isOnGround(Entity entity);
2021-04-30 04:31:25 +02:00
public boolean isSolid(Block in);
public boolean isValid(Entity entity);
2016-12-26 17:38:59 +01:00
public void load(CommandManager commands);
public void loadPlugins();
public void look(Entity from, Entity to);
public void look(Entity entity, float yaw, float pitch);
public void look(Entity entity, Location to, boolean headOnly, boolean immediate);
2016-11-22 09:04:48 +01:00
public void mount(Entity entity, Entity passenger);
2022-07-29 03:15:15 +02:00
public InventoryView openAnvilInventory(Player player, Inventory anvil, String title);
2022-06-12 13:49:21 +02:00
2018-02-03 01:56:09 +01:00
public void openHorseScreen(Tameable horse, Player equipper);
public void playAnimation(PlayerAnimation animation, Player player, int radius);
public void playerTick(Player entity);
public void registerEntityClass(Class<?> clazz);
public void remove(Entity entity);
public void removeFromServerPlayerList(Player player);
public void removeFromWorld(org.bukkit.entity.Entity entity);
public void removeHookIfNecessary(NPCRegistry npcRegistry, FishHook entity);
public void replaceTrackerEntry(Player player);
2022-11-28 16:10:50 +01:00
public void sendPositionUpdate(Player excluding, Entity from, Location location);
public void sendRotationNearby(Entity from, float bodyYaw, float headYaw, float pitch);
public void sendTabListAdd(Player recipient, Player listPlayer);
public void sendTabListRemove(Player recipient, Collection<? extends SkinnableEntity> skinnableNPCs);
public void sendTabListRemove(Player recipient, Player listPlayer);
public void sendTeamPacket(Player recipient, Team team, int mode);
2022-07-28 00:36:51 +02:00
public void setAllayDancing(Entity entity, boolean dancing);
2020-03-21 11:30:52 +01:00
public void setBodyYaw(Entity entity, float yaw);
2022-11-29 23:13:55 +01:00
public void setCustomName(Entity entity, Object component);
public void setDestination(Entity entity, double x, double y, double z, float speed);
2020-06-27 09:41:47 +02:00
public void setEndermanAngry(Enderman enderman, boolean angry);
public void setHeadYaw(Entity entity, float yaw);
public void setKnockbackResistance(LivingEntity entity, double d);
public void setLyingDown(Entity cat, boolean lying);
public void setNavigationTarget(Entity handle, Entity target, float speed);
public void setNoGravity(Entity entity, boolean nogravity);
2020-02-21 13:28:57 +01:00
public void setPandaSitting(Entity entity, boolean sitting);
public void setPeekShulker(Entity entity, int peek);
2022-07-07 17:34:15 +02:00
public void setPiglinDancing(Entity entity, boolean dancing);
public void setPitch(Entity entity, float pitch);
public void setPolarBearRearing(Entity entity, boolean rearing);
public void setProfile(SkullMeta meta, GameProfile profile);
public void setShouldJump(Entity entity);
2019-04-24 15:01:22 +02:00
public void setSitting(Ocelot ocelot, boolean sitting);
public void setSitting(Tameable tameable, boolean sitting);
2021-09-20 14:59:54 +02:00
public void setSneaking(Entity entity, boolean sneaking);
public void setStepHeight(Entity entity, float height);
2020-03-03 16:31:04 +01:00
public void setTeamNameTagVisible(Team team, boolean visible);
public void setVerticalMovement(Entity bukkitEntity, double d);
public void setWitherCharged(Wither wither, boolean charged);
public boolean shouldJump(Entity entity);
public void shutdown();
2022-10-25 11:07:11 +02:00
public void sleep(Player entity, boolean sleep);
public boolean tick(Entity next);
public void trySwim(Entity entity);
public void trySwim(Entity entity, float power);
2022-06-11 19:37:38 +02:00
public void updateInventoryTitle(Player player, InventoryView view, String newTitle);
public void updateNavigationWorld(Entity entity, World world);
public void updatePathfindingRange(NPC npc, float pathfindingRange);
}