HumanZombie Posted November 5, 2023 Share Posted November 5, 2023 I was looking through forums and found a skript for anti naked killing: on damage of player: if attacker is a player: if victim isn't wearing armor: cancel event send "&c&lHey!&7 You can't kill unarmored players." to attacker if attacker isn't wearing armor: if victim is wearing armor: cancel event send "&c&lHey!&7 You can't kill players while not wearing armor." to attacker Creds: 8pixel I dont know how to skript myself so I thought I would ask here. How would I make it so they still cant be attacked if they have armour in their inventory, enderchest and pvault. I am using these plugins: https://www.spigotmc.org/resources/personal-vaults.75159/ https://www.spigotmc.org/resources/custom-enderchest.8868/ Link to comment Share on other sites More sharing options...
LunarBurn1 Posted November 6, 2023 Share Posted November 6, 2023 That should already be a thing. In this case, the skript only allows pvp if both players are wearing armor. Having armor in a PV, Enderchest, or simply in their inventory does not count as wearing it, so they should be protected regardless. If I got your post request wrong, let me know lol 1 Link to comment Share on other sites More sharing options...
HumanZombie Posted November 6, 2023 Author Share Posted November 6, 2023 @LunarBurn1Ye, I am trying to do the opposite where they CAN'T be attacked if they have armour in their inventory/enderchest/pvault. Link to comment Share on other sites More sharing options...
LunarBurn1 Posted November 6, 2023 Share Posted November 6, 2023 (edited) For the inventory, you could do something like this (untested, but should work in theory) if victim's inventory contains armor: As for the Enderchest/PVs, I'm not quite sure, since Skript does not have integration into the plugin Personal Vaults (as far as I'm aware). For Enderchest, you are using a Custom Enderchest plugin, which likely creates a Custom GUI and completely replaces the default Enderchest, so Skript's Enderchest support would not function for it. I do not know quite what to do for the PVs and EnderChests, but hopefully the inventory bit helps! Edited November 6, 2023 by LunarBurn1 1 Link to comment Share on other sites More sharing options...
DuckyProgrammer Posted November 9, 2023 Share Posted November 9, 2023 Moved to Minehut -> Skript -> Discussion. Please use the right forum when making a thread. Thanks! No rank - 2017-2021 Minehut Tester - 2021-2023 Minehut Volunteer Moderator - 2023-Current Report a player/server: Report Player / Server Create a support ticket: Submit a request Did I help you? If so, feel free to give me a like! Link to comment Share on other sites More sharing options...
sharpintel Posted April 4 Share Posted April 4 XD Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now