diff --git a/.github/ISSUE_TEMPLATE/rapport-de-bug.md b/.github/ISSUE_TEMPLATE/rapport-de-bug.md index 6bb968d..469c2e6 100644 --- a/.github/ISSUE_TEMPLATE/rapport-de-bug.md +++ b/.github/ISSUE_TEMPLATE/rapport-de-bug.md @@ -7,7 +7,7 @@ assignees: Vianpyro, mathaym25 --- -**Decrivez le bug** +**Description du bug** Une description claire et concise de ce qu'est le bug. **Pour reproduire** @@ -26,7 +26,7 @@ Ajoutez des captures d'écran pour expliquer plus explicitement votre problème. **Matériel** - OS (ex : iOS/Windows/Linux...) - Version de Minecraft que vous utilisez. - - Version du serveur au moment du bug. + - Version du serveur au moment du bug (si introuvable, la date à laquelle à été trouvé le bug). **Contexte supplémentaire** Ajoutez ici tout autre information sur le problème. diff --git a/PULL_REQUEST_TEMPLATE.md b/PULL_REQUEST_TEMPLATE.md index d144f35..11e8a90 100644 --- a/PULL_REQUEST_TEMPLATE.md +++ b/PULL_REQUEST_TEMPLATE.md @@ -1,17 +1,3 @@ -# Pull request - -## Titre -Merci de nommer vos "pull requests" `Mise à jour` + `année`, `semaine`, `numero de la mise à jour de la semaine`. - -(ex : `Mise à jour` + `2019`, `semaine n°5`, `seconde mise à jour de la semaine` = **`Mise à jour 19w05b`**) - -## Informations -Précisez les ajouts (prefix : `+`) ainsi que les retrait (prefix `-`). +### Journal des modifications +Précisez les ajouts/modifications (prefix : `+`) ainsi que les suppressions (prefix `-`). Et voilà, c'est aussi simple que ça 😉😁 - -## Exemples de pull requests -- [Exemple n°1](https://github.com/Aycraft/Aycraft_1.14/pull/1) -- [Exemple n°2](https://github.com/Aycraft/Aycraft_1.14/pull/2) -- [Exemple n°3](https://github.com/Aycraft/Aycraft_1.14/pull/3) -- [Exemple n°4](https://github.com/Aycraft/Aycraft_1.14/pull/4) -- [Exemple n°5](https://github.com/Aycraft/Aycraft_1.14/pull/5) diff --git a/data/commandes/functions/cmd_effects.mcfunction b/data/commandes/functions/cmd_effects.mcfunction index cc00fe9..8b598ed 100644 --- a/data/commandes/functions/cmd_effects.mcfunction +++ b/data/commandes/functions/cmd_effects.mcfunction @@ -8,6 +8,17 @@ # # ================================================================================================== +# Freeze +gamemode adventure @a[tag=isFreezed] +effect give @a[tag=isFreezed] blindness 45 255 false +effect give @a[tag=isFreezed] hunger 2 255 false +effect give @a[tag=isFreezed] jump_boost 2 225 false +effect give @a[tag=isFreezed] resistance 2 255 false +effect give @a[tag=isFreezed] slowness 2 255 false +effect give @a[tag=isFreezed] slow_falling 2 255 false +clear @a[tag=isFreezed,nbt=!{Inventory:[{Slot:103b,id:"minecraft:light_gray_stained_glass_pane"}]}] light_gray_stained_glass_pane +replaceitem entity @a[tag=isFreezed,nbt=!{Inventory:[{Slot:103b,id:"minecraft:light_gray_stained_glass_pane"}]}] armor.head minecraft:light_gray_stained_glass_pane{AttributeModifiers:[{AttributeName:"generic.knockbackResistance",Name:"generic.knockbackResistance",Amount:9999999f,Operation:0,UUIDMost:92991,UUIDLeast:137954}],display:{Name:"{\"text\":\"§cVous avez été immobilisé(e)\"}"},HideFlags:63} + # God execute as @a[tag=isGod] run function commun:outils/protection diff --git a/data/commandes/functions/cmd_staff.mcfunction b/data/commandes/functions/cmd_staff.mcfunction index 25cbfc1..4ef203e 100644 --- a/data/commandes/functions/cmd_staff.mcfunction +++ b/data/commandes/functions/cmd_staff.mcfunction @@ -16,13 +16,14 @@ execute if score @s cmdRunStaffCmd matches 0 run scoreboard players reset @s cmd # 1 - Clearchat : Vide tout le chat pour tous les joueurs execute if score @s cmdRunStaffCmd matches 1 run function commandes:staff/clearchat -# 3 - Freeze (id) : Immobiliser un joueur -# 4 - God : Se rendre invincible -execute if score @s cmdRunStaffCmd matches 4 run function commandes:staff/god +# 2 - God : Se rendre invincible +execute if score @s cmdRunStaffCmd matches 2 run function commandes:staff/god -# 5 - Modotools : Obtenir les objets de modération -# 6 - Vanish : Disparaître -execute if score @s cmdRunStaffCmd matches 6 run function commandes:staff/vanish +# 3 - Modotools : Obtenir les objets de modération +execute if score @s cmdRunStaffCmd matches 3 run function commandes:staff/modotools + +# 4 - Vanish : Disparaître +execute if score @s cmdRunStaffCmd matches 4 run function commandes:staff/vanish # Réinitialisation du score de detection de l'execution d'une commande par un joueur execute if score @s cmdRunStaffCmd matches 1.. run tellraw @s ["",{"text":"§7§lServeur » §r"},{"text":"Cette commande n'existe pas","color":"red"}] diff --git a/data/commandes/functions/load/scores.mcfunction b/data/commandes/functions/load/scores.mcfunction index 914f5f7..2233625 100644 --- a/data/commandes/functions/load/scores.mcfunction +++ b/data/commandes/functions/load/scores.mcfunction @@ -15,4 +15,5 @@ tellraw @a ["",{"text":"§7§lServeur » §r"},{"text":"Initialisation des score # Scores scoreboard objectives add cmdRunCmd trigger scoreboard objectives add cmdRunStaffCmd trigger +scoreboard objectives add cmdRunFreeze trigger scoreboard objectives add cmdHelpopMessage dummy diff --git a/data/commandes/functions/staff/freeze.mcfunction b/data/commandes/functions/staff/freeze.mcfunction index 685a0df..086a99d 100644 --- a/data/commandes/functions/staff/freeze.mcfunction +++ b/data/commandes/functions/staff/freeze.mcfunction @@ -1,9 +1,39 @@ # ================================================================================================== -# Cette fonction sert à immobiliser un joueur. +# "/Freeze" (id) : Cette fonction sert à immobiliser un joueur. # # Mode de déclenchament : event # Déclencheur(s) : "commandes:cmd_staff" # # Tags utilisés : +# isFreezed +# unFreezed # # ================================================================================================== + +# Detection du joueur visé +scoreboard players operation freezePlayer cmdRunFreeze = @s cmdRunFreeze + +# Envoi du message au(à la) "freezé(e)" +execute as @a[tag=!isFreezed] if score @s UUID = freezePlayer cmdRunFreeze run tellraw @s ["",{"text":"§7§lServeur » §r"},{"text":"Vous êtes maintenant immobilisé(e)","color":"red"}] +execute as @a[tag=isFreezed] if score @s UUID = freezePlayer cmdRunFreeze run tellraw @s ["",{"text":"§7§lServeur » §r"},{"text":"Vous n'êtes maintenant plus immobilisé(e)","color":"green"}] + +# Envoi du message au "freezer" +execute as @a[tag=!isFreezed] if score @s UUID = freezePlayer cmdRunFreeze run tellraw @a[scores={cmdRunFreeze=1..}] ["",{"text":"§7§lServeur » §r"},{"selector":"@s"},{"text":" est maintenant immobilisé(e)","color":"green"}] +execute as @a[tag=isFreezed] if score @s UUID = freezePlayer cmdRunFreeze run tellraw @a[scores={cmdRunFreeze=1..}] ["",{"text":"§7§lServeur » §r"},{"selector":"@s"},{"text":" n'est maintenant plus immobilisé(e)","color":"red"}] + +# Modifications du tag +execute as @a if score @s UUID = freezePlayer cmdRunFreeze run tag @s[tag=isFreezed] add unFreezed +execute as @a if score @s UUID = freezePlayer cmdRunFreeze run tag @s[tag=!isFreezed] add isFreezed +execute as @a if score @s UUID = freezePlayer cmdRunFreeze run tag @s[tag=unFreezed] remove isFreezed +execute as @a if score @s UUID = freezePlayer cmdRunFreeze run tag @s[tag=unFreezed] remove unFreezed + +# Reinitialisation du score qui detecte la commande +scoreboard players reset cmdRunFreeze +scoreboard players set @s cmdRunFreeze 0 +effect clear @a[tag=!isFreezed] blindness +effect clear @a[tag=!isFreezed] hunger +effect clear @a[tag=!isFreezed] jump_boost +effect clear @a[tag=!isFreezed] resistance +effect clear @s[tag=!isFreezed] slowness +effect clear @a[tag=!isFreezed] slow_falling +clear @a[tag=!isFreezed] light_gray_stained_glass_pane diff --git a/data/commandes/functions/staff/modotools.mcfunction b/data/commandes/functions/staff/modotools.mcfunction index 8007b7d..749f88c 100644 --- a/data/commandes/functions/staff/modotools.mcfunction +++ b/data/commandes/functions/staff/modotools.mcfunction @@ -9,4 +9,10 @@ # ================================================================================================== # Bâton knockback 10 : pour tester l'antiKB +replaceitem entity @s hotbar.2 minecraft:stick{display:{Name:"\"§cBâton de test anti-knockback\"",Lore:["Verifiez que le joueur frappé n'a pas d'objet légitime qui lui permet de resister au knockback!"]},Enchantments:[{id:"minecraft:knockback",lvl:10}],HideFlags:63} + # Épée pour one-shot un joueur (pas certain) +replaceitem entity @s hotbar.6 minecraft:blaze_rod{display:{Name:"\"§cBâton « oups t'es mort »\""},AttributeModifiers:[{AttributeName:"generic.attackDamage",Name:"generic.attackDamage",Amount:99999999,Operation:0,UUIDMost:37893,UUIDLeast:148850}],HideFlags:63} + +# Réinitialisation du score qui detecte la commande +scoreboard players set @s cmdRunStaffCmd 0 diff --git a/data/commandes/functions/tags.md b/data/commandes/functions/tags.md new file mode 100644 index 0000000..4a37bf1 --- /dev/null +++ b/data/commandes/functions/tags.md @@ -0,0 +1,25 @@ +*Ici sont listés tous les tags, et les fonctions qui modifient leur état, du fichier "commandes"* + +**disGod** : Sert à enlever le tag **isGod** à ceux qui l'avaient déjà et qui veulent l'enlever +`commandes:staff/god` + +**disVanish** : Sert à enlever le tag **isVanish** à ceux qui l'avaient déjà et qui veulent l'enlever +`commandes:staff/vanish` + +**helpOped** : Les joueurs ayant ce tag feront envoyer un message automatique au staff pour demander de l'aide toutes les minutes +`commandes:joueurs/helpop` + +**isFreezed** : Les joueurs ayant ce tag seront immobilisés +`commandes:staff/freeze` + +**isGod** : Les joueurs ayant ce tag sont immortels +`commandes:staff/god` + +**isVanish** : Les joueurs ayant ce tag sont invisibles +`commandes:staff/vanish` + +**unFreezed** : Sert à enlever le tag **isFreezed** à ceux qui l'avaient déjà et à qui on veut l'enlever +`commandes:staff/freeze` + +**unHelpOped** : Sert à enlever le tag **helpOped** à ceux qui l'avaient déjà et qui veulent l'enlever (n'ont plus besoin d'aide) +`commandes:joueurs/helpop` diff --git a/data/commun/functions/outils/protection.mcfunction b/data/commun/functions/outils/protection.mcfunction index 1513a5d..c16bd8e 100644 --- a/data/commun/functions/outils/protection.mcfunction +++ b/data/commun/functions/outils/protection.mcfunction @@ -15,8 +15,8 @@ execute unless entity @s[nbt={foodLevel:20}] run effect give @s saturation 1 255 execute unless entity @s[nbt={Health:20.0f}] run effect give @s instant_health 1 225 true # Désactivation du pvp -execute at @s if entity @e[distance=0.001..10] run effect give @s weakness 1 255 true -execute at @s if entity @e[distance=0.001..10] run effect give @s resistance 1 255 true +execute at @s[gamemode=!creative] if entity @e[distance=0.001..10] run effect give @s weakness 1 255 true +execute at @s[gamemode=!creative] if entity @e[distance=0.001..10] run effect give @s resistance 1 255 true # Protection contre les dégats de chute function commun:outils/tags/motion diff --git a/data/commun/functions/outils/tags/motion.mcfunction b/data/commun/functions/outils/tags/motion.mcfunction index 7904b4a..9126128 100644 --- a/data/commun/functions/outils/tags/motion.mcfunction +++ b/data/commun/functions/outils/tags/motion.mcfunction @@ -2,7 +2,7 @@ # Cette fonction sert à detecter les mouvements basiques des joueurs. # # Type d'activation : events -# Activateur(s) : "move_detection", "protection" +# Activateur(s) : "commun:outils/protection", "commun:outils/detection/move_detection" # # Tag(s) utilisé(s) : # diff --git a/data/minecraft/functions/tick.mcfunction b/data/minecraft/functions/tick.mcfunction index f42fc9a..5f701e4 100644 --- a/data/minecraft/functions/tick.mcfunction +++ b/data/minecraft/functions/tick.mcfunction @@ -21,7 +21,9 @@ execute if entity @a run function spawn:bossbar # Execution des commandes personnalisées scoreboard players enable @a cmdRunCmd scoreboard players enable @a cmdRunStaffCmd +scoreboard players enable @a cmdRunFreeze execute as @a if score @s cmdRunCmd matches 1.. run function commandes:cmd_joueurs execute as @a if score @s cmdRunStaffCmd matches 1.. run function commandes:cmd_staff +execute as @a if score @s cmdRunFreeze matches 1.. run function commandes:staff/freeze execute if entity @a run function commandes:cmd_effects