We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 77d66d9 commit e9142e5Copy full SHA for e9142e5
src/main/kotlin/com/lambda/client/manager/managers/WaypointManager.kt
@@ -97,10 +97,10 @@ object WaypointManager : Manager {
97
}
98
99
fun remove(pos: BlockPos, currentDimension: Boolean = false): Boolean {
100
- val waypoint = get(pos, currentDimension)
101
- val removed = waypoints.remove(waypoint)
102
- LambdaEventBus.post(WaypointUpdateEvent(WaypointUpdateEvent.Type.REMOVE, waypoint))
103
- return removed
+ return get(pos, currentDimension)?.let { waypoint ->
+ LambdaEventBus.post(WaypointUpdateEvent(WaypointUpdateEvent.Type.REMOVE, waypoint))
+ waypoints.remove(waypoint)
+ } ?: false
104
105
106
fun remove(id: Int): Boolean {
0 commit comments