# === Ayarlar ===
options:
version: 2.6.3
# === Sunucu yüklendiğinde önceki kayıtları temizleme (opsiyonel) ===
on load:
delete {death::*}
delete {deathcount::*}
delete {lastdeath::*}
# === Oyuncu öldüğünde bilgileri kaydet ===
on death of player:
set {_uuid} to victim's uuid
set {_name} to victim's name
set {_killer} to "Doğal Sebepler"
if attacker is a player:
set {_killer} to attacker's name
# Ölüm sayısını güncelle ve yeni kayıt oluştur
add 1 to {deathcount::%{_uuid}%}
set {_deathnum} to {deathcount::%{_uuid}%}
set {lastdeath::%{_uuid}%} to {_deathnum}
# Envanteri kaydet (zırh, offhand dahil)
set {death::%{_uuid}%::%{_deathnum}%::inventory} to victim's inventory contents
set {death::%{_uuid}%::%{_deathnum}%::armor} to victim's armor
set {death::%{_uuid}%::%{_deathnum}%::offhand} to victim's offhand
set {death::%{_uuid}%::%{_deathnum}%::location} to victim's location
set {death::%{_uuid}%::%{_deathnum}%::time} to now formatted as "dd/MM/yyyy HH:mm:ss"
set {death::%{_uuid}%::%{_deathnum}%::killer} to {_killer}
set {death::%{_uuid}%::name} to {_name}
# Pusula ver (tıklandığında ışınlayacak)
set {_compass} to compass named "&4Ölüm #%{_deathnum}%"
set lore of {_compass} to "&7Tarih: %{death::%{_uuid}%::%{_deathnum}%::time}%", "&7Katil: %{_killer}%", "&7Konum: %{death::%{_uuid}%::%{_deathnum}%::location}%", "", "&eTıkla: Işınlan"
set metadata "deathuuid" of {_compass} to {_uuid}
set metadata "deathnum" of {_compass} to {_deathnum}
give {_compass} to victim
send action bar "&cÖlüm kaydedildi! (#%{_deathnum}%)" to victim
# === Ölüm geçmişini görüntüleme komutu ===
command /ölümlog <player> <integer>:
permission: op
trigger:
set {_target} to arg-1
set {_uuid} to uuid of {_target}
set {_num} to arg-2
if {_uuid} is not set:
send "&cBu oyuncu mevcut değil!" to player
stop
if {deathcount::%{_uuid}%} is not set:
send "&cBu oyuncunun hiç ölüm kaydı yok!" to player
stop
if {_num} < 1 or {_num} > {deathcount::%{_uuid}%}:
send "&cGeçersiz ölüm numarası!" to player
stop
# Menü aç
open chest with 6 rows named "&6%{_target}% - Ölüm #%{_num}%" to player
# Envanter yerleştir (ilk 36 slot)
set {_index} to 0
loop {death::%{_uuid}%::%{_num}%::inventory}:
if {_index} < 36:
set slot {_index} of player's current inventory to loop-value
add 1 to {_index}
# Zırh ve offhand slotları
set slot 45 of player's current inventory to {death::%{_uuid}%::%{_num}%::armor}::0
set slot 46 of player's current inventory to {death::%{_uuid}%::%{_num}%::armor}::1
set slot 47 of player's current inventory to {death::%{_uuid}%::%{_num}%::armor}::2
set slot 48 of player's current inventory to {death::%{_uuid}%::%{_num}%::armor}::3
set slot 49 of player's current inventory to {death::%{_uuid}%::%{_num}%::offhand}
# Bilgi ve ışınlanma butonları
set {_info} to paper named "&6Ölüm Bilgileri" with lore "&7Tarih: &f%{death::%{_uuid}%::%{_num}%::time}%", "&7Katil: &f%{death::%{_uuid}%::%{_num}%::killer}%", "&7Konum: &f%{death::%{_uuid}%::%{_num}%::location}%"
set slot 52 of player's current inventory to {_info}
set {_tp} to ender pearl named "&aIşınlan" with lore "&7Tıkla: Ölüm noktasına git"
set slot 53 of player's current inventory to {_tp}
# === Menüde ışınlanma butonuna tıklanırsa ===
on inventory click:
if name of player's current inventory contains " - Ölüm #":
cancel event
if clicked slot is 53:
set {_name} to substring between "&6" and " - Ölüm #" in name of player's current inventory
set {_num} to substring after "Ölüm #" in name of player's current inventory parsed as integer
set {_targets::*} to all players where [input's name is "%{_name}%"]
if size of {_targets::*} > 0:
set {_uuid} to uuid of first element of {_targets::*}
teleport player to {death::%{_uuid}%::%{_num}%::location}
send "&aÖlüm noktasına ışınlandınız!" to player
close player's inventory
# === Ölüm geçmişi listesi komutu ===
command /ölümlogliste [<player>]:
permission: op
trigger:
set {_target} to arg-1 if arg-1 is set else player
set {_uuid} to uuid of {_target}
if {deathcount::%{_uuid}%} is not set:
send "&c%{_target}% adlı oyuncunun hiç ölüm kaydı yok!" to player
stop
send "&6=== %{_target}% Ölüm Listesi (%{deathcount::%{_uuid}%} kayıt) ===" to player
loop {deathcount::%{_uuid}%} times:
set {_i} to loop-index + 1
send "&7#%{_i}% &8| &7%{death::%{_uuid}%::%{_i}%::time}% &8| &cKatil: %{death::%{_uuid}%::%{_i}%::killer}%" to player
send "&6Detay için: &e/ölümlog %{_target}% <numara>" to player
# === Son ölüm kaydını direkt açma komutu ===
command /sonölüm [<player>]:
permission: op
trigger:
set {_target} to arg-1 if arg-1 is set else player
set {_uuid} to uuid of {_target}
if {lastdeath::%{_uuid}%} is not set:
send "&c%{_target}% adlı oyuncunun hiç ölüm kaydı yok!" to player
stop
execute player command "/ölümlog %{_target}% %{lastdeath::%{_uuid}%}%"