Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(fake-armorstand): finish the work on fake armorstands #121

Closed
wants to merge 15 commits into from
Closed

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,11 +1,9 @@
package minevalley.core.api.utils.armorstand;

import org.bukkit.Location;
import org.bukkit.entity.Entity;
import minevalley.core.api.utils.armorstand.modifiers.*;

import java.util.List;

public interface FakeArmorStand extends VisibilityModifier, PoseModifier, EquipmentModifier {
public interface FakeArmorStand extends EquipmentModifier, LocationModifier, MetadataModifier, PassengerModifier,
PoseModifier, VisibilityModifier {

/**
* get the custom id from the armorstand
Expand All @@ -14,92 +12,28 @@ public interface FakeArmorStand extends VisibilityModifier, PoseModifier, Equipm
*/
int getId();

/**
* Refreshed the Armorstand with its configuration
*/
void update();

/**
* Spawns the armorstand
*/
void spawn();

/**
* Destroys/de-spawn the armor-stand
* Destroys/de-spawn the armorstand
*/
void destroy();

int getVisibilityRange();

void setVisibilityRange(int visibilityRange);

/**
* Get the location of the armorstand
*
* @return location
*/
Location getLocation();

/**
* Sets the armorstand's location.
* <b>Note:</b> This ignores the yaw and pitch values.
*
* @param location new location of the armorstand.
*/
void setLocation(Location location);

/**
* Get the pitch from the armorstand facing
*
* @return float
*/
float getPitch();

void setPitch(float pitch);

/**
* Get the yaw from the armorstand facing
* Gets the visibility range of the armorstand
*
* @return float
* @return range in blocks
*/
float getYaw();

void setYaw(float yaw);

boolean hasBasePlate();

void setBasePlate(boolean basePlate);

boolean isSmall();

void setSmall(boolean small);

boolean hasArms();

void setArms(boolean arms);

boolean isMarker();

void setMarker(boolean marker);

/**
* get the current passenger list
*
* @return a list with the passengers as entities
*/
List<Entity> getPassengers();

/**
* Add a passenger to the object
*
* @param entity the entity to be added
*/
void addPassenger(Entity entity);
int getVisibilityRange();

/**
* Remove a passenger
*
* @param entity the entity to be removed
* Sets the visibility range of the armorstand
* <br>
* <b>Default:</b> 50
* @param visibilityRange range in blocks
*/
void removePassenger(Entity entity);
void setVisibilityRange(int visibilityRange);
}

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1,89 @@
package minevalley.core.api.utils.armorstand.modifiers;

import org.bukkit.inventory.ItemStack;

public interface EquipmentModifier {

/**
* Get the item in the armorstand's left hand
* @return item in left hand
*/
ItemStack getLeftHand();

/**
* Set the item in the armorstand's left hand
* @param itemStack item to set
* @return this
*/
EquipmentModifier setLeftHand(ItemStack itemStack);

/**
* Get the item in the armorstand's right hand
* @return item in right hand
*/
ItemStack getRightHand();

/**
* Set the item in the armorstand's right hand
* @param itemStack item to set
* @return this
*/
EquipmentModifier setRightHand(ItemStack itemStack);

/**
* Get the item in the armorstand's helmet slot
* @return item in helmet slot
*/
ItemStack getHelmet();

/**
* Set the item in the armorstand's helmet slot
* @param helmet item to set
* @return this
*/
EquipmentModifier setHelmet(ItemStack helmet);

/**
* Get the item in the armorstand's chestplate slot
* @return item in chestplate slot
*/
ItemStack getChestplate();

/**
* Set the item in the armorstand's chestplate slot
* @param chestplate item to set
* @return this
*/
EquipmentModifier setChestplate(ItemStack chestplate);

/**
* Get the item in the armorstand's leggings slot
* @return item in leggings slot
*/
ItemStack getLeggings();

/**
* Set the item in the armorstand's leggings slot
* @param leggings item to set
* @return this
*/
EquipmentModifier setLeggings(ItemStack leggings);

/**
* Get the item in the armorstand's boots slot
* @return item in boots slot
*/
ItemStack getBoots();

/**
* Set the item in the armorstand's boots slot
* @param boots item to set
* @return this
*/
EquipmentModifier setBoots(ItemStack boots);

/**
* Update the armorstand's equipment
*/
void updateEquipment();
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
package minevalley.core.api.utils.armorstand.modifiers;

import org.bukkit.Location;

public interface LocationModifier {

/**
* Get the location of the armorstand
*
* @return location
*/
Location getLocation();

/**
* Sets the armorstand's location.
* <br>
* <b>Note:</b> This ignores the yaw and pitch values.
*
* @param location new location of the armorstand.
*/
void setLocation(Location location);

/**
* Update the location of the armorstand
*/
void updateLocation();
}
Loading