#Disable the Equiping or Flight of Elytra (fabric)

82 messages · Page 1 of 1 (latest)

keen moss
#

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. 🤔

strange dustBOT
#

Once your question has been answered, please close this post with </resolve:1050379261372006400> command!

keen moss
#

or is it possible to always set elytra durability to 1 or 0 so that its always in the broken state

robust shaleBOT
#

[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

lofty stratus
keen moss
#

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

lofty stratus
#

sure, i can see

#

maxDamage is what you're looking for

keen moss
#

would i set max damage to a low number?

lofty stratus
#

1

#

and just remember, 1.19 kubejs is a bit different

keen moss
#

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

lofty stratus
#

ItemEvents.modification

keen moss
#

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

lofty stratus
#

/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

inland sun
#

^^^

keen moss
#

okay thanks. you've been wonderful help. im getting visual studio code rn

inland sun
keen moss
#

ooh i might do this instead, i dont know if this is something i'll use much

lofty stratus
#

that works too but you can't access your own files

inland sun
#

you can

lofty stratus
#

huh

inland sun
#
ItemEvents.modification(event => {
    event.modify('minecraft:elytra', item => {
        item.maxDamage = 1
    })
})
keen moss
#

oh okay cool thank you so much.

inland sun
#

that should work, havent tried it myself though

keen moss
#

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

inland sun
#

it goes in <instancefolder>/kubejs/startup_scripts

lofty stratus
#

no

#

startup

inland sun
#

the file name doesnt matter, it just needs to end with .js

#

oh yes startup my bad

keen moss
#

yall are the best

keen moss
#

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

inland sun
#

huh...

#

are they all on the most recent version?

keen moss
#

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

inland sun
#

oh!

#

you might need to turn on server only mode in the config if the players dont have it

keen moss
#

: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

inland sun
#

thats... weird

#

can you send your log

keen moss
#

it was not rhino

#

yea 1 sec

inland sun
#

ive never heard of that other dependency

keen moss
#

it says on the wiki its required for fabric

inland sun
#

ah, that might be why ive never heard of it

keen moss
#

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

silver musk
#
  1. Item modification is not server side only (so would not work for what you want to do)
  2. 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

keen moss
#

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.

silver musk
#

chatgpt sucks at mc modding

#

it usually makes code that looks coherent, but is pulled from five different versions and two modloaders

neon forge
#

In case somebody discovers this question for 1.18, it is entirely possible to disable the elytra using Fabric events related to the Lytra

keen moss
#

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.

neon forge
#

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

keen moss
#

lmao. an actual option but that sounds horrid lmao i love it