1
0
Fork 0

style: add sbcs

This commit is contained in:
ineanto 2025-09-06 13:21:34 +02:00
parent b660654c63
commit 3f49698c4c
Signed by: ineanto
GPG key ID: E511F9CAA2F9CE84
4 changed files with 24 additions and 18 deletions

View file

@ -1,6 +1,8 @@
- [ ] Démarrage en forme de Title
- [ ] Système de bounties pour les nazes (objectifs à complèter)
- [ ] Système de palier par équipe (qui en est où par rapport au dragon)
- [ ] Classer les équipes qui ont le plus tapé le dragon
- [ ] Calculer le deuxième groupe le plus proche de l'Enderdragon
```kotlin

View file

@ -50,6 +50,10 @@ class RunnerDragon : JavaPlugin() {
.expireAfterWrite(Duration.ofSeconds(10))
.build()
//.............
// DATA
//.............
var STATE = GameState.GAME
var DEAD_COWS = 0
var ELAPSED_TIME = 0
@ -58,8 +62,12 @@ class RunnerDragon : JavaPlugin() {
var TEAM_LOCK = false
var NETHER_PORTAL_ENTERED = false
var END_PORTAL_ENTERED = false
var TIMER_TASK: BukkitTask? = null
//.............
// TASKS
//.............
var TIMER_TASK: BukkitTask? = null
var GRACE_PERIOD_TASK: BukkitTask? = null
}

View file

@ -10,7 +10,6 @@ import org.bukkit.event.player.PlayerPortalEvent
import org.bukkit.event.player.PlayerTeleportEvent
import xyz.ineanto.dragon.GameState
import xyz.ineanto.dragon.RunnerDragon
import xyz.ineanto.dragon.world.WorldManager
class DimensionEntranceListener : Listener {
@EventHandler
@ -35,24 +34,21 @@ class DimensionEntranceListener : Listener {
}
}
PlayerTeleportEvent.TeleportCause.END_PORTAL -> {
event.player.teleport(WorldManager.GAME_WORLD_THE_END.spawnLocation)
if (RunnerDragon.END_PORTAL_ENTERED.not()) {
RunnerDragon.END_PORTAL_ENTERED = true
PlayerTeleportEvent.TeleportCause.END_PORTAL -> if (RunnerDragon.END_PORTAL_ENTERED.not()) {
RunnerDragon.END_PORTAL_ENTERED = true
val dimensionComponent = Component.text()
.append(RunnerDragon.PREFIX)
.appendSpace()
.append(
MiniMessage.miniMessage()
.deserialize("<gradient:#ffea4d:#ffa46b>Le portail de l'End a été franchi pour la première fois !</gradient>")
)
.build()
val dimensionComponent = Component.text()
.append(RunnerDragon.PREFIX)
.appendSpace()
.append(
MiniMessage.miniMessage()
.deserialize("<gradient:#ffea4d:#ffa46b>Le portail de l'End a été franchi pour la première fois !</gradient>")
)
.build()
Bukkit.broadcast(dimensionComponent)
Bukkit.getOnlinePlayers().forEach {
it.playSound(it.location, Sound.ENTITY_VILLAGER_CELEBRATE, 1f, 0.3f)
}
Bukkit.broadcast(dimensionComponent)
Bukkit.getOnlinePlayers().forEach {
it.playSound(it.location, Sound.ENTITY_VILLAGER_CELEBRATE, 1f, 0.3f)
}
}