mirror of
https://github.com/2006-Scape/apollo.git
synced 2026-07-05 00:38:14 +00:00
Fix kotlin code style issues
This commit is contained in:
@@ -0,0 +1,6 @@
|
||||
package org.apollo.game.plugin.entity.actions
|
||||
|
||||
import org.apollo.game.model.entity.Player
|
||||
import org.apollo.game.model.event.PlayerEvent
|
||||
|
||||
class PlayerActionEvent(player: Player, val target: Player, val action: PlayerActionType) : PlayerEvent(player)
|
||||
+1
-4
@@ -1,11 +1,8 @@
|
||||
package org.apollo.game.plugin.entity.actions
|
||||
|
||||
import java.util.*
|
||||
import org.apollo.game.message.impl.SetPlayerActionMessage
|
||||
import org.apollo.game.model.entity.Player
|
||||
import org.apollo.game.model.event.PlayerEvent
|
||||
import java.util.*
|
||||
|
||||
class PlayerActionEvent(player: Player, val target: Player, val action: PlayerActionType) : PlayerEvent(player)
|
||||
|
||||
fun Player.enableAction(action: PlayerActionType) {
|
||||
send(SetPlayerActionMessage(action.displayName, action.slot, action.primary))
|
||||
@@ -30,5 +30,4 @@ class PlayerActionTests {
|
||||
verify { player.send(eq(SetPlayerActionMessage("null", type.slot, type.primary))) }
|
||||
assertFalse(player.actionEnabled(type)) { "Action $type should not have been enabled, but was." }
|
||||
}
|
||||
|
||||
}
|
||||
-1
@@ -46,5 +46,4 @@ class FollowAction(player: Player, private val target: Player) : Action<Player>(
|
||||
lastPosition = target.position
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
-1
@@ -2,7 +2,6 @@ package org.apollo.plugin.entity.following
|
||||
|
||||
import org.apollo.game.plugin.entity.actions.PlayerActionEvent
|
||||
import org.apollo.game.plugin.entity.actions.PlayerActionType
|
||||
import org.apollo.plugin.entity.following.FollowAction
|
||||
|
||||
on_player_event { PlayerActionEvent::class }
|
||||
.where { action == PlayerActionType.FOLLOW }
|
||||
|
||||
@@ -139,5 +139,4 @@ class SpawnTests {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user