-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(unfinished): support syncing entities between sections without p…
…layers
- Loading branch information
Showing
9 changed files
with
80 additions
and
72 deletions.
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
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
3 changes: 3 additions & 0 deletions
3
src/main/kotlin/com/mineinabyss/deeperworld/movement/TeleportHandler.kt
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 |
---|---|---|
@@ -1,6 +1,9 @@ | ||
package com.mineinabyss.deeperworld.movement | ||
|
||
import org.bukkit.entity.Entity | ||
|
||
interface TeleportHandler { | ||
val entity: Entity | ||
fun handleTeleport() | ||
fun isValidTeleport() : Boolean | ||
} |
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
7 changes: 4 additions & 3 deletions
7
src/main/kotlin/com/mineinabyss/deeperworld/movement/UndoMovementInvalidTeleportHandler.kt
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 |
---|---|---|
@@ -1,11 +1,12 @@ | ||
package com.mineinabyss.deeperworld.movement | ||
|
||
import org.bukkit.Location | ||
import org.bukkit.entity.Entity | ||
import org.bukkit.entity.Player | ||
|
||
class UndoMovementInvalidTeleportHandler(player: Player, from: Location, to: Location) : | ||
InvalidTeleportHandler(player, from, to) { | ||
class UndoMovementInvalidTeleportHandler(override val entity: Entity, from: Location, to: Location) : | ||
InvalidTeleportHandler(from, to) { | ||
override fun handleInvalidTeleport() { | ||
player.teleport(from) | ||
entity.teleport(from) | ||
} | ||
} |
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
5 changes: 3 additions & 2 deletions
5
src/main/kotlin/com/mineinabyss/deeperworld/movement/transition/SectionChecker.kt
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