-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
0e9cfc6
commit 5a0f2a7
Showing
3 changed files
with
61 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
54 changes: 54 additions & 0 deletions
54
common/src/main/java/journeymap/api/v2/common/event/common/WaypointGroupTransferEvent.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
package journeymap.api.v2.common.event.common; | ||
|
||
import journeymap.api.v2.common.event.impl.JourneyMapEvent; | ||
import journeymap.api.v2.common.waypoint.Waypoint; | ||
import journeymap.api.v2.common.waypoint.WaypointGroup; | ||
import org.jetbrains.annotations.Nullable; | ||
|
||
public class WaypointGroupTransferEvent extends JourneyMapEvent | ||
{ | ||
private final WaypointGroup to; | ||
private final WaypointGroup from; | ||
private final Waypoint waypoint; | ||
|
||
protected WaypointGroupTransferEvent(@Nullable WaypointGroup from, WaypointGroup to, Waypoint waypoint) | ||
{ | ||
super(true); | ||
this.from = from; | ||
this.to = to; | ||
this.waypoint = waypoint; | ||
} | ||
|
||
/** | ||
* The group the waypoint is transferring to. | ||
* | ||
* @return - The waypoint group. | ||
*/ | ||
public WaypointGroup getGroupTo() | ||
{ | ||
return to; | ||
} | ||
|
||
/** | ||
* The group the waypoint is transferring from. | ||
* <p> | ||
* May be null. | ||
* | ||
* @return - The waypoint group. | ||
*/ | ||
@Nullable | ||
public WaypointGroup getGroupFrom() | ||
{ | ||
return from; | ||
} | ||
|
||
/** | ||
* Gets the waypoint that is transferring groups. | ||
* | ||
* @return - The waypoint group. | ||
*/ | ||
public Waypoint getWaypoint() | ||
{ | ||
return waypoint; | ||
} | ||
} |