Class RestrictionSetEvent
java.lang.Object
org.bukkit.event.Event
me.gamercoder215.mobchip.bukkit.events.BrainEvent
me.gamercoder215.mobchip.bukkit.events.RestrictionSetEvent
Called before an Entity's Restriction Center Changes
-
Nested Class Summary
Nested classes/interfaces inherited from class Event
Event.Result -
Constructor Summary
ConstructorsConstructorDescriptionRestrictionSetEvent(@NotNull EntityBrain brain, @Nullable Location oldLoc, @Nullable Location newLoc, int oldRadius, int newRadius) Construct a RestrictionSetEvent. -
Method Summary
Modifier and TypeMethodDescription@Nullable LocationFetches the new restriction center.intFetches the new radius.@Nullable LocationFetches the old restriction center.intFetches the old radius.voidsetNewCenter(@Nullable Location loc) Sets the new Location center.voidsetNewRadius(int radius) Sets the new radius.Methods inherited from class BrainEvent
getBrain, getHandlerList, getHandlersMethods inherited from class Event
getEventName, isAsynchronous
-
Constructor Details
-
RestrictionSetEvent
public RestrictionSetEvent(@NotNull @NotNull EntityBrain brain, @Nullable @Nullable Location oldLoc, @Nullable @Nullable Location newLoc, int oldRadius, int newRadius) Construct a RestrictionSetEvent.- Parameters:
brain- EntityBrain involvedoldLoc- Old Location CenternewLoc- New Location CenteroldRadius- Old RadiusnewRadius- New Radius
-
-
Method Details
-
getOldCenter
Fetches the old restriction center.- Returns:
- Old Center, may be null
-
getOldRadius
public int getOldRadius()Fetches the old radius.- Returns:
- Old Restriction Radius
-
getNewRadius
public int getNewRadius()Fetches the new radius.- Returns:
- New Restriction Radius
-
setNewRadius
public void setNewRadius(int radius) Sets the new radius.- Parameters:
radius- New Restriction Radius
-
getNewCenter
Fetches the new restriction center.- Returns:
- New Center, may be null
-
setNewCenter
Sets the new Location center.- Parameters:
loc- Location to set
-