Bonjours,
J'ai quelques soucis avec mon serveur car beaucoup de personnes déconnecte combat, j'ai déjà testé 3/4 plugins genre CombatTag, CombatLag, etc.. Aucune est compatible avec ma version paper spigot 1.7.10 (1.7/1.8).
Donc j'ai cherché et testé plein de chose pour les anti déco combat et j'en suis arrivé a cela :
options:
Prefix: &4[&cCombat&4]
Color: &c
Highlight: &4
# Timer is in seconds #
Timer: 30
Villager Name Color: &c
Broadcast Combat Log: true
CombatLog Activated Message: &4[&cCombat&4] &cVous êtes en combat déconnecté pas !.
CombatLog Deactived Message: &4[&cCombat&4] &cVous n'êtes plus en combat !.
CombatLog Broadcast Message: &4[&cCombat&4] &4%player% &ccombat logged.
# Do not edit if you don't know what you're doing. #
on damage of player:
attacker is a player
victim does not have permission "combatlog.bypass"
if {CombatLog::%victim%} is not set:
message "{@CombatLog Activated Message}" to victim
set {CombatLog::%victim%} to {@Timer}
while {CombatLog::%victim%} is higher than or equal to 0:
wait 1 second
remove 1 from {CombatLog::%victim%}
delete {CombatLog::%victim%}
message "{@CombatLog Deactived Message}" to victim
else:
set {CombatLog::%victim%} to {@Timer}
on quit:
{CombatLog::%player%} is set
if {@Broadcast Combat Log} is true:
broadcast "{@Prefix} {@Highlight}%player% {@Color}combat logged."
spawn 1 villager at location of player
set name of spawned entity to "{@Villager Name Color}%player's display name%"
set {CombatLog::%player%::Villager} to spawned entity
loop items of player:
add loop-item to {CombatLog::%player%::Inventory::*}
on death of villager:
attacker is set
if "%victim's name%" contains "{@Villager Name Color}":
loop {CombatLog::%uncolored victim's name%::Inventory::*}:
drop loop-value at victim
delete {CombatLog::%uncolored victim's name%::Inventory::*}
set {CombatLog::%uncolored victim's name%::Villager} to "Dead"
on login:
if {CombatLog::%player%::Villager} is not "Dead":
teleport player to location of {CombatLog::%player%::Villager}
kill {CombatLog::%player%::Villager}
else if {CombatLog::%player%::Villager} is "Dead":
clear player's inventory
set {CombatLog::%player%::HideDeathMessage} to true
set health of player to 0
delete {CombatLog::%player%::Villager}
on death of player:
{CombatLog::%player%::HideDeathMessage} is true
set death message to ""
delete {CombatLog::%player%::HideDeathMessage}
on rightclick on villager:
if "%clicked entity's name%" contains "{@Villager Name Color}":
cancel the event
Le soucis c'est que quand il se reconnecte sa ne l'ai /kill pas ... ( peut etre que c'est car sa les re tp au lobby quand il se reco ? chez pas.)
Et l'autre soucis c'est que quand les gens tue le pnj il gagne pas les items du joueurs et si il le tue pas et que le gars se reco le pnj reste la + le gars.
Après si y a pas moyen de le reconfig ou que j'arrive pas si vous avez des idées se comment je pourrais faire pour juste le /kill quand il déco.