Skip to content

Commit

Permalink
💄 text & color updates
Browse files Browse the repository at this point in the history
  • Loading branch information
b8daniel committed Jul 13, 2022
1 parent 202e00c commit 5b98b09
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -304,6 +304,7 @@ object Game {

Paintball.gameConfig.teams.forEach{ team ->
team.players.forEach { player ->
player.inventory.clear()
if (player.gameMode == GameMode.SPECTATOR) respawnPlayer(player, team)
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ class PlayerHitHandler(val hitPlayer: Player, val team: ConfigTeam, val enemy: P
private fun wasKilled() {
Bukkit.broadcastMessage(
ThemeBuilder.themed( // hit handler
"*${hitPlayer.name}* wurde von *${enemy.name}* abgeschossen!"
":DARK_RED:☠:: *${hitPlayer.name}* wurde von *${enemy.name}* abgeschossen!"
))

Scores.killsObj?.getScore(enemy.name)?.plusAssign(1)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,11 +32,11 @@ data class Gun(
}

fun getInfoText(p: Player): String {
if (ReloadGun.currentlyReloading.containsKey(p.uniqueId)) return ThemeBuilder.themed("reloading...")
if (ReloadGun.currentlyReloading.containsKey(p.uniqueId)) return ThemeBuilder.themed("Ammo: :GOLD:⌛/${magazine.size}::")
return if (magazine.content > 0) ThemeBuilder.themed(
"Ammo: *${magazine.content}/${magazine.size}*"
) else ThemeBuilder.themed(
"Ammo: :RED:0::*/${magazine.size}*"
"Ammo: :RED:0/${magazine.size}::"
)
}

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
package de.crightgames.blxckoxymoron.paintball.gun

import de.crightgames.blxckoxymoron.paintball.game.Scores
import de.crightgames.blxckoxymoron.paintball.game.Scores.plusAssign
import de.crightgames.blxckoxymoron.paintball.projectile.GameProjectile
import de.crightgames.blxckoxymoron.paintball.util.ThemeBuilder.sendThemedMessage
import de.crightgames.blxckoxymoron.paintball.util.VectorUtils.vectorWithSpray
Expand All @@ -21,11 +23,13 @@ class ShootGun : Listener {

@EventHandler
fun shoot(e: PlayerInteractEvent) {

if (
e.hand != EquipmentSlot.HAND ||
e.action == Action.PHYSICAL ||
!(e.player.inventory.type == InventoryType.CRAFTING ||
e.player.inventory.type == InventoryType.CREATIVE) ||
e.player.inventory.type == InventoryType.CREATIVE ||
e.player.inventory.type == InventoryType.PLAYER) ||
ReloadGun.currentlyReloading.containsKey(e.player.uniqueId)
) return

Expand Down Expand Up @@ -58,6 +62,8 @@ class ShootGun : Listener {
mainHandMeta.persistentDataContainer.set(GunDataContainer.KEY, GunDataContainer, gun)
e.player.inventory.itemInMainHand.itemMeta = mainHandMeta

Scores.shotsObj?.getScore(e.player.name)?.plusAssign(1)

val spawnLocation = e.player.eyeLocation.clone()
spawnLocation.world?.playSound(spawnLocation, gun.sound, 100F, gun.pitch) // TODO revise Sound category

Expand Down

0 comments on commit 5b98b09

Please sign in to comment.