forked from SuperRicky14/TpaPlusPlus
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: Add block check, toggle check, distance check
- Loading branch information
1 parent
d86991d
commit 279baf9
Showing
22 changed files
with
235 additions
and
56 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
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
17 changes: 0 additions & 17 deletions
17
src/main/kotlin/net/superricky/tpaplusplus/database/DataService.kt
This file was deleted.
Oops, something went wrong.
9 changes: 9 additions & 0 deletions
9
src/main/kotlin/net/superricky/tpaplusplus/database/service/BlockDataService.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 |
---|---|---|
@@ -0,0 +1,9 @@ | ||
package net.superricky.tpaplusplus.database.service | ||
|
||
import java.util.* | ||
|
||
interface BlockDataService { | ||
fun checkPlayerBlocked(srcUUID: UUID, destUuid: UUID): Boolean | ||
fun addBlockPlayer(uuid: UUID, blockPlayer: UUID): Boolean | ||
fun removeBlockPlayer(uuid: UUID, blockPlayer: UUID): Boolean | ||
} |
6 changes: 6 additions & 0 deletions
6
src/main/kotlin/net/superricky/tpaplusplus/database/service/DataService.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 |
---|---|---|
@@ -0,0 +1,6 @@ | ||
package net.superricky.tpaplusplus.database.service | ||
|
||
interface DataService : BlockDataService, ToggleDataService, PlayerDataService { | ||
fun initDataService() | ||
fun saveData() | ||
} |
12 changes: 12 additions & 0 deletions
12
src/main/kotlin/net/superricky/tpaplusplus/database/service/PlayerDataService.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 |
---|---|---|
@@ -0,0 +1,12 @@ | ||
package net.superricky.tpaplusplus.database.service | ||
|
||
import net.minecraft.server.network.ServerPlayerEntity | ||
import net.superricky.tpaplusplus.database.PlayerData | ||
import net.superricky.tpaplusplus.utility.LevelBoundVec3 | ||
import java.util.* | ||
|
||
interface PlayerDataService { | ||
fun getPlayerData(player: ServerPlayerEntity): PlayerData | ||
fun insertPlayer(uuid: UUID) | ||
fun insertDeath(uuid: UUID, pos: LevelBoundVec3) | ||
} |
9 changes: 9 additions & 0 deletions
9
src/main/kotlin/net/superricky/tpaplusplus/database/service/ToggleDataService.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 |
---|---|---|
@@ -0,0 +1,9 @@ | ||
package net.superricky.tpaplusplus.database.service | ||
|
||
import java.util.* | ||
|
||
interface ToggleDataService { | ||
fun checkPlayerToggle(uuid: UUID): Boolean | ||
fun playerSwitchToggle(uuid: UUID): Boolean | ||
fun playerSwitchToggle(uuid: UUID, toggle: Boolean): 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
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
Oops, something went wrong.