Kick/Ban when being hit by a stick?
I would like a way to hit a player and when they are hit it reads as /kick [Username] or /ban [Username].
12 Replies
Thanks for asking your question!
Make sure to provide as much helpful information as possible such as logs/what you tried and what your exact issue is
Make sure to mark solved when issue is solved!!!
/close
!close
!solved
!answered
Requested by yoiloki#0
Solutions, explain to me like I'm a child or simpler terms.
Idk understand the terms when devopling plugins, I just repeat code or attemp to learn it.
Is this an announcement to the whole server? Who can see the message?
Do you want it to run multiple commands or just one (Aka announce the message AND ban or just either one)
Are you trying to develop the plugin yourself or looking for existing solutions? If existing, are you fine with paid plugins?
Probably achievable with Skript. There is surely a damage event that you can listen to, check the item the attacker is holding and kick the victim if its a stick.
https://skripthub.net/docs/?id=1004 maybe something like
Skript Hub - Documentation
On Damage (Event) - Skript
Called when an entity receives damage, e.g. by an attack from another entity, lava, fire, drowning, fall, suffocation, etc.
See the example code on the linked page. You can add conditions like the stick has to have a specific name etc.
You can use conditional events plugin for this. It is less resource intensive than script and is like easier to understand
Perhaps require the stick to have some specific name or lore, and restrict to players which a specific permission?
so essentials' powertool?
To sum it up yes.
I mean, youβd want to check if they have permissions (because creative mode lets people spawn items with custom nbt/lore) and if youβre writing a custom plugin, then these days you should use a PersistantDataContainer
This saves me time for creating a plugin, thxs
!solved
Closed post!
Your post has been marked as solved!
Requested by yoiloki#0