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 org.bukkit.event.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 TypeMethodDescriptionFetches the new restriction center.int
Fetches the new radius.Fetches the old restriction center.int
Fetches the old radius.void
Sets the new Location center.void
setNewRadius
(int radius) Sets the new radius.Methods inherited from class me.gamercoder215.mobchip.bukkit.events.BrainEvent
getBrain, getHandlerList, getHandlers
Methods inherited from class org.bukkit.event.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
-