Skip to content

Commit 39278e2

Browse files
committed
Fix tpChunk others command
1 parent 5f25dcc commit 39278e2

File tree

1 file changed

+2
-2
lines changed
  • bukkit/src/main/kotlin/io/github/rothes/esu/bukkit/module/essencialcommands

1 file changed

+2
-2
lines changed

bukkit/src/main/kotlin/io/github/rothes/esu/bukkit/module/essencialcommands/TpChunk.kt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,9 +25,9 @@ object TpChunk : CommonFeature<FeatureToggle.DefaultTrue, TpChunk.Lang>() {
2525
suspend fun tpChunk(sender: User, chunk: ChunkLocation, world: World = (sender as PlayerUser).player.location.world) {
2626
tpChunk(sender, chunk, world, (sender as PlayerUser).player)
2727
}
28-
@Command("tpChunk <chunk> <world> <player>")
28+
@Command("tpChunk <chunk> [world] [player]")
2929
@ShortPerm("others")
30-
suspend fun tpChunk(sender: User, chunk: ChunkLocation, world: World, player: Player) {
30+
suspend fun tpChunk(sender: User, chunk: ChunkLocation, world: World = (sender as PlayerUser).player.location.world, player: Player = (sender as PlayerUser).player) {
3131
sender.message(lang, { teleporting }, player(player))
3232
val location = Location(world, (chunk.chunkX shl 4) + 8.0, 0.0, (chunk.chunkZ shl 4) + 8.0)
3333
val safeSpot = WorldUtils.findSafeSpot(location) ?: return sender.message(lang, { unsafeSpot })

0 commit comments

Comments
 (0)