Class ShootLocationChooser
java.lang.Object
me.deecaad.weaponmechanics.weapon.shoot.ShootLocationChooser
- All Implemented Interfaces:
me.deecaad.core.file.Serializer<ShootLocationChooser>
public class ShootLocationChooser
extends Object
implements me.deecaad.core.file.Serializer<ShootLocationChooser>
People can choose where the bullet is offset from depending on VR/Scope.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classKeeps track of the left and right shoot locations, since the position should probably be different for each arm. -
Constructor Summary
ConstructorsConstructorDescriptionDefault constructor for serializerShootLocationChooser(ShootLocationChooser.ShootLocation def, ShootLocationChooser.ShootLocation vr, ShootLocationChooser.ShootLocation scope) -
Method Summary
Modifier and TypeMethodDescriptionstatic org.bukkit.LocationgetControllerPos(org.bukkit.entity.LivingEntity entity, boolean isMainHand) Gets the controller position of the given entity.getScope()getVR()org.bukkit.Locationoffset(EntityWrapper wrapper, boolean isMainHand) serialize(me.deecaad.core.file.SerializeData data) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface me.deecaad.core.file.Serializer
canUsePathTo, getName, getWikiLink, letPassThrough, shouldSerialize, tryPathTo, useLater
-
Constructor Details
-
ShootLocationChooser
public ShootLocationChooser()Default constructor for serializer -
ShootLocationChooser
public ShootLocationChooser(@NotNull ShootLocationChooser.ShootLocation def, @Nullable ShootLocationChooser.ShootLocation vr, @Nullable ShootLocationChooser.ShootLocation scope)
-
-
Method Details
-
getDefault
-
getVR
-
getScope
-
offset
-
getKeyword
- Specified by:
getKeywordin interfaceme.deecaad.core.file.Serializer<ShootLocationChooser>
-
getParentKeywords
- Specified by:
getParentKeywordsin interfaceme.deecaad.core.file.Serializer<ShootLocationChooser>
-
serialize
@NotNull public ShootLocationChooser serialize(@NotNull me.deecaad.core.file.SerializeData data) throws me.deecaad.core.file.SerializerException - Specified by:
serializein interfaceme.deecaad.core.file.Serializer<ShootLocationChooser>- Throws:
me.deecaad.core.file.SerializerException
-
getControllerPos
@Nullable public static org.bukkit.Location getControllerPos(@NotNull org.bukkit.entity.LivingEntity entity, boolean isMainHand) Gets the controller position of the given entity. If the entity is not a Vivecraft player, or the Vivecraft plugin is not installed, this will returnnull.- Parameters:
entity- The entity to get the controller position from.isMainHand-trueif the main hand is being used.- Returns:
- The controller position, or
null
-