blob: 799bbffa82a36655953f792ab8efbf52071db17b (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
|
package cat.freya.khs.player
import cat.freya.khs.world.Effect
import cat.freya.khs.world.Location
import cat.freya.khs.world.Position
import cat.freya.khs.world.World
import java.util.UUID
// Player wrapper
interface Player {
// Metadata
val uuid: UUID
val name: String
// Position
val location: Location
val world: World?
// Stats
var health: Double
var hunger: UInt
fun heal()
// Flight
var allowFlight: Boolean
var flying: Boolean
// Movement
fun teleport(position: Position)
fun teleport(location: Location)
fun sendToServer(server: String)
// Inventory
val inventory: PlayerInventory
fun showInventory(inv: Inventory)
fun closeInventory()
// Potions
fun clearEffects()
fun giveEffect(effect: Effect)
fun setSpeed(amplifier: UInt)
fun setGlow(target: Player, glow: Boolean)
fun setHidden(target: Player, hidden: Boolean)
// Messaging
fun message(message: String)
fun actionBar(message: String)
fun title(title: String, subTitle: String)
fun playSound(sound: String, volume: Double, pitch: Double)
// Block Hunt
fun isDisguised(): Boolean
fun disguise(material: String)
fun revealDisguise()
enum class GameMode {
CREATIVE,
SURVIVAL,
ADVENTURE,
SPECTATOR,
}
// Other
fun hasPermission(permission: String): Boolean
fun setGameMode(gameMode: GameMode)
fun hideBoards()
fun taunt()
}
|