Im using 1.19.2 on my Fabric server and we'd like to disable elytras without deleting them. So players could still find them and hold onto them until we later remove the script and allow elytras to be turned on. I don't know how this could be done or if it's already been done but i did take some time to look already and i couldnt find anything or even similar like disable armor pieces. Thanks for taking the time to help. 🤔
#Disable the Equiping or Flight of Elytra (fabric)
82 messages · Page 1 of 1 (latest)
Once your question has been answered, please close this post with </resolve:1050379261372006400> command!
or is it possible to always set elytra durability to 1 or 0 so that its always in the broken state
[Quote ➤](#996416064424517716 message) Yes, although you cant just straight up say 'no elytra' (disable it activating), you would have to disable it slightly differently, like damaging the player or making them have a lot of gravity when they try fly with it
item modification event can do so
I dont mind figuring it out myself but would yall kow any example scripts i could work off of? I dont know how to do the coding in kubejs
sure, i can see
item.modification event is a startup script event that allows you to change properties of existing i...
maxDamage is what you're looking for
would i set max damage to a low number?
thank you i'll work on this and see if i can get it working and then share it too so other people looking for this have the option
okay i am listening
instead of using onEvent, you'd use one of these
https://mods.latvian.dev/books/kubejs-6-1192/page/list-of-events
This is a list of all events. It's possible that not all events are listed here, but this list will...
ItemEvents.modification
and im sorry if it seems stupid of q, this is all something i have to do in notepad to write then reload the script in game right? There arent like in game commands, right?
i used kubejs to disable some recipes once a long time ago, but thats all i've ever done with kubejs
/reload
/kubejs hand
/kubejs errors
and please use an IDE, preferably visual studio code
startup events cannot be reloaded
you have to restart the game for that
^^^
okay thanks. you've been wonderful help. im getting visual studio code rn
oh btw, you can try it here: https://vscode.dev
ooh i might do this instead, i dont know if this is something i'll use much
that works too but you can't access your own files
you can
huh
ItemEvents.modification(event => {
event.modify('minecraft:elytra', item => {
item.maxDamage = 1
})
})
oh okay cool thank you so much.
that should work, havent tried it myself though
i will try it but i am max ignorant with kubejs, where does the file go and what format is it? .js?
does it need a specific name
it goes in <instancefolder>/kubejs/startup_scripts
yall are the best
so this is a bit off topic for my thread, but i havent been able to test this script out yet because when i add kubejs, architectuarly, rhino and the ingredient extension api it messes up and players cant join anymore
so without them players can join and play fine, but with the mods players are getting disconnected when they join
just instantly
yea they all uses the most updated 1.19.2
this is just in my downloads folder, i am putting the script in the right place, but even without the script there players still get kicked on join
are there any known mod conflicts that kubejs or anything doesnt work with
these are my installed mods
oh!
you might need to turn on server only mode in the config if the players dont have it
:O
Kubejs is by default required on clients, i didnt know that
what a dood
lets give this a shot
Disable the Equiping or Flight of Elytra (fabric)
did not fix the issue
when joining players are kicked for
i removed kubejs and left in the api's and the same kick is still happening
i will remove rhino then arc then ingredient until it goes away
ive never heard of that other dependency
it says on the wiki its required for fabric
ah, that might be why ive never heard of it
the kick still happened even with ingredient extension api alone, maybe it needs the others im not sure, but with only ingredient extension api the server had an issue stopping and crashed when i tried
i removed all of them for now
- Item modification is not server side only (so would not work for what you want to do)
- server only is broken in general in 1.19 due to custom ingredients
it may not end up being fixed because its a big pain
Thank you Chief. I guess i'll do my best to look for an alternative solution. Maybe chatgpt can write me a java mod that will do what i want since i cant do it.
chatgpt sucks at mc modding
it usually makes code that looks coherent, but is pulled from five different versions and two modloaders
In case somebody discovers this question for 1.18, it is entirely possible to disable the elytra using Fabric events related to the Lytra
thats awful and makes sense. I hope it evolves to take over the world one day. Would be amazing to have cheaper commission where someone using chatgpt could code something fast and easy with improvising.
I was really hoping this was something that could be done in 1.19, too bad its all not working rn and requires client side stuff too. If anyone thinks of a way to do this throw it in here for me please. Server-side only fabric mods dont come as thick as the plugin world does.
You could just periodically check if a player is using the elytra and then stop them from doing so from the server
Probably will cause some deaths but could still work
lmao. an actual option but that sounds horrid lmao i love it