Skip to content

Commit 6a68140

Browse files
committed
Documentation added for HomeModel.kt.
Signed-off-by: Pavel Erokhin (MairwunNx) <MairwunNx@gmail.com>
1 parent 2fddae8 commit 6a68140

File tree

1 file changed

+40
-0
lines changed
  • src/main/kotlin/com/mairwunnx/projectessentials/home/models

1 file changed

+40
-0
lines changed

src/main/kotlin/com/mairwunnx/projectessentials/home/models/HomeModel.kt

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,19 +3,59 @@ package com.mairwunnx.projectessentials.home.models
33
import com.mairwunnx.projectessentials.core.extensions.empty
44
import kotlinx.serialization.Serializable
55

6+
/**
7+
* Home model, contains all player homes.
8+
*/
69
@Serializable
710
data class HomeModel(
11+
/**
12+
* Player homes collection, represent as
13+
* mutable list with type `Home` class.
14+
*/
815
var homes: MutableList<Home> = mutableListOf()
916
) {
17+
/**
18+
* Home class, contains needed properties
19+
* for indexing home and teleporting to home.
20+
*/
1021
@Serializable
1122
data class Home(
23+
/**
24+
* Home name, default value is empty string.
25+
*/
1226
var home: String = String.empty,
27+
/**
28+
* Client world represent as string. Default
29+
* value is empty string.
30+
*
31+
* In this world contains this home.
32+
*/
1333
var clientWorld: String = String.empty,
34+
/**
35+
* Server world id. Default value is `-1`.
36+
*
37+
* In this world (dimension) contains this home.
38+
*/
1439
var worldId: Int = -1,
40+
/**
41+
* Home position by `x` axis. Default value is `-1`.
42+
*/
1543
var xPos: Int = -1,
44+
/**
45+
* Home position by `y` axis. Default value is `-1`.
46+
*/
1647
var yPos: Int = -1,
48+
/**
49+
* Home position by `z` axis. Default value is `-1`.
50+
*/
1751
var zPos: Int = -1,
52+
/**
53+
* Player camera rotation yaw. Default value is `-1`.
54+
*/
1855
var yaw: Float = -1F,
56+
/**
57+
* Player camera rotation pitch. Default value is `-1`.
58+
*/
1959
var pitch: Float = -1F
2060
)
2161
}

0 commit comments

Comments
 (0)