From c1e0fcb717ada52cfda5b4b7475b3225ee853e44 Mon Sep 17 00:00:00 2001 From: Tofaa <82680183+Tofaa2@users.noreply.github.com> Date: Mon, 22 Jan 2024 23:07:36 +0300 Subject: [PATCH] finish fix --- .idea/workspace.xml | 3 +-- .../src/main/java/me/tofaa/entitylib/TestCommand.java | 10 +++++++--- 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/.idea/workspace.xml b/.idea/workspace.xml index 99878b8..3f792c6 100644 --- a/.idea/workspace.xml +++ b/.idea/workspace.xml @@ -5,7 +5,6 @@ - diff --git a/test-plugin/src/main/java/me/tofaa/entitylib/TestCommand.java b/test-plugin/src/main/java/me/tofaa/entitylib/TestCommand.java index 9a1be15..d5e13f8 100644 --- a/test-plugin/src/main/java/me/tofaa/entitylib/TestCommand.java +++ b/test-plugin/src/main/java/me/tofaa/entitylib/TestCommand.java @@ -28,15 +28,19 @@ public class TestCommand implements CommandExecutor { return true; } } - - base = EntityLib.createEntity(UUID.randomUUID(), EntityTypes.SHEEP); - passenger = EntityLib.createEntity(UUID.randomUUID(), EntityTypes.SKELETON); + else { + base = EntityLib.createEntity(UUID.randomUUID(), EntityTypes.SHEEP); + passenger = EntityLib.createEntity(UUID.randomUUID(), EntityTypes.SKELETON); + } Location location = SpigotConversionUtil.fromBukkitLocation(player.getLocation()); Location pass = new Location(location.getX() + 1, location.getY(), location.getZ(), location.getYaw(), location.getPitch()); + base.addViewer(player.getUniqueId()); + passenger.addViewer(player.getUniqueId()); base.spawn(location); passenger.spawn(pass); + base.addPassenger(passenger); player.sendMessage("Spawned"); return true;