Bring Enchanting Table UI with a command?
Hey guys! Had a quick question. How could I go about giving certain players access to a command that would allow them to bring up the enchanting table UI? I am trying to get rid of the enchanting table block (for RP reasons) and I cannot for the life of me figure out how to make that happen. I know how to give only certain people the permission to do that, since I run with LuckPerms, but don't know how to actually get a command that can do that. Any help would be greatly appreciated!
93 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 divinusdx#0
@Divinus I can make a custom plugin that does that for free
However you'll have to wait for me to be available
You can use Skript and do it yourself though if you want
I must admit I tried to use skript, and while I do have experience in coding python, I don't have that much experience, especially when it comes to integrating it with the minecraft environment. So I felt quite a bit over my head on that.
Uhm, Skript is not Python lol
I moreso meant I have some coding experience. While it may not be python, the concept of it is relatively the same. My apologies for that.
Hey, do you still need this?
I'm free today
Learn java
I have experience in python and js
Even though java is a lot different its doable
Yes absolutely! Sorry, it's 6am here now. I was asleep!
I am still looking on how to do this!
Someone said they would do it for free?
Never heard back from them! They probably got busy
@Divinus Does the enchantment table need to be functional? Should it return certain enchantments? What level should it act like?
Yes it would need to be functional! I would want it to act pretty much exactly as if you interacted with an actual enchanting table, gui and all. It would act as a max level (No bookcases needed) but still have the random change functionality of an enchanting table does.
My goal for this is to lock the permission of this enchanting table command behind a permissions group that would be unlocked through doing a quest.
so the issue is, minecraft is hardcoded to always check the blocks around the "enchantment table" to get the bookshelf levels and paper doesn't allow you to override it
you can override the enchantments minecraft came up with and use your own number of bookshelfs, but it would require using nms
Sorry I was busy lol
I was installing Linux
I just got everything I need ready
Let me configure my stuff
so you are completely right lmao
i'd need to use nms
yeah, I had the paper code pulled up for how it's actually implemented
VSC???
horror...
fucking horror.
too lazy to open paper in idea
mind you, you'd only need nms for
EnchantmentHelper
and maybe EnchantmentMenu#getEnchantmentList
paper does have plugin dev tools for working with nms without obfuscation now at least
but it would just need to be manually updated for different versions of the gameI'm glad you guys know what you're referring to.
xD
If they need to be around bookcases I'm completely fine with that if it makes it easier to do!
I have no problem with making it easier
If they need to be near bookshelves, it should be like 10 lines at most
I'm definitely down for that.
@Snow Kit u dont need any nms
Not all enchantments are given at a bookshelf level of 0
To generate a random enchantment, you’d need to use nms
you can set the levels of hte butons
so u can make the bottom button lvl 30
Yes, but you can’t generate new enchantments that would be actually given at that bookshelf level
For example, you’d never get silk touch without bookshelves afaik
you could just create a lvl 30 enchant at spawn, and then have it use that as the enchantment block location when opening the enchantment view
If the game lets that work, could’ve sworn there is a range limit tho
just tested it, it works fine
yeah so, u'd just want an admin command where u set the master enchantment table location
then whenever someone uses the /openenchant command it'll use that location as the location
also, surprisingly if the block of the enchantment table is unloaded, it'll still work, (im guessing it loads the chunks into memory to then grab the enchantmenttable + bookshelves)
tbh, u could even have the player set their own enchantment tables location, so the player gets to control the levels
would also require the player to have a lvl 30 enchantment table setup in order to get the lvl 30 enchants
So basically it would just be referencing the location of the block location when using the command?
Only the first time. Ya
Okay! Awesome
Hey guys! I think I misunderstood this, were you guys making this? If so, could i snag it?
I didn't write anything, unsure about @Jenkins or @QarthO
Darn. Thought that was what was happening.
I can write you one
will be able to do it tomorrow since i got no plans this weekend
I would love you forever. ❤️
Hey! Was just curious if there was an update on this? Thank you! ❤️
Hey, I'm sorry I just keep about forgetting about this lol
I'll try to do it but it seems tricky to do because of how Minecraft handles enchanting tables
ty for pinging me, completely forgot about it.
I threw something ugly together but it is working. I plan on adding a lot more features and polishing it
Currently a player can do "/enchant" and it will open up an enchantment table UI
However that enchant table ui is only as if the enchanting table had no bookshelfs
Although, I made it so an admin can create an enchantment table, and then set that as the enchantment table the command uses. Basically you'll be able to create a lvl 30 enchanting table at spawn. then do
"/enchanter set" (while looking at it) and it will set the enchanting table.
Now whenever anyone does the command it'll be a lvl 30 enchanting table (or whatever lvl that enchanting u set is)
Oh that is perfect!
https://github.com/QarthO/qRemoteEnchanting/actions/runs/9365718725
if you have a github account you can login, then you should be able to download the dev build that was made
GitHub
fix ci · QarthO/qRemoteEnchanting@223e4dd
Use your enchanter wirelessly via a command or item! - fix ci · QarthO/qRemoteEnchanting@223e4dd
I'd recommend testing it first to make sure it works. I'll keep working on it today and tomorrow. Theres still some missing messages, and config stuff. but the core functionality should work
i also want to make it so that players can link their own enchanting table (if a server doesnt want to give a default of 30)
make sure u give
permission if u want players to be able to do
/enchant
Also in the config there is a "aliases" section you can use to do whatever aliases u wantThis is awesome! Thank you so much!
its very ugly... but just wanted to get something out real quick since i completely forgot
Haha listen there is no worries from me. We're still in beta so this is the perfect time to test it out
👍
expect a much more polished version out tomorrow
You got it boss!
Hey! Just checking in! There is no rush to this at all, just inquiring! 😄
no worries! havent gotten much time to work on it, but still planning on doing more work with it tonite
were you able to play around with the dev build at all?
I have not, I was planning on doing so this weekend!
well lucky for u, im travelling tomorrow and i'll haveseveral hours with just my laptop and nothing to do so there will def be a much better build out tomorrow
Ohhhh those weekends are the worst though I'm so sorry😭Hopefully you get to at least have some time to relax.
I actually don’t mind it, nice to do nothing
So, I have gone to tinker with the build atm, and it's currently not functional at all. Using /enchanter set pulls up unknown command, and the plugin does not populate in the /plugins command. We are running 1.20.4, if that is relevant to the situation! 😄
what paper build are you using?
if i had to blindly guess its because its setup for java 21 on for paper 1.20.6
any reason ur using 1.20.4 still?
Mostly because 1.20.4 was the most recent stable build when we started the process and a lot of our plugins fit better with 1.20.4 at the moment.
let me know wat paper build (or purpur or pufferfish or whatever ur using) and ill make sure it'll work with that version
also i'd recommend updating to 1.20.6 when u can, pretty much all the standard plugins have supported 1.20.6 now since its been out for a month now
We are currently on pufferfish 1.20.4!
But we do plan on going to 1.20.6 in the future
I apologize for that
no worries
@Divinus https://github.com/QarthO/qRemoteEnchanting/actions/runs/9431832414
new build can download here.
I also changed the permissions needed to use it
to directly use the
/enchanter
: "q.enchanter.use
"GitHub
updated messages · QarthO/qRemoteEnchanting@d0eea62
Use your enchanter wirelessly via a command or item! - updated messages · QarthO/qRemoteEnchanting@d0eea62
@Divinus ok actually just pushed out another build, you now should be able modify the messages in the messages.yml now, and u can change the chat prefix if u want, then u can just do
/enchanter reload messages
to reload it (or u can just do /enchanter reload
and it'll reload the config and messages... haven't implemented reloading the enchanters.yml file yet)You are the best ❤️
Hmm... Put in the new build and running into the same issue.
Can you share your logs?
Maybe it’s spitting out some errors on startup
And share your pufferfish build number. I tried on puffefish 1.20.4 build #51 and working perfectly.
Logs will help out a lot
Just upload your latest.log to mclogs
im dumb, i figured out the issue, i was testing on pufferfish 1.20.4, but was still testing with java 21. since i compiled the jar with java 21 it was working for me, i compiled it with java 17 now, it should work this time i promise
@Divinus
Bahah, love it! I'll check once I'm off work 🙂
I apologize, I forgot my dev made it back to paper
thats a java version error yeah
the plugin is still compiled for java 21
try now, also headsup i redid the set command, just follow the tab complete, however didnt fully setup the player/personal ones. So you’ll get a no worky message
If the default is broken, just go back to the actions run before i the commit where i redid it
@Divinus
I apologize for the late response. It's been a super busy week.
But I am here now. xD
ur good, im out of traveling, so only have free time for like 20min here and there, so not been doing much work on it.
lmk if its working for ya
Alright going to go ahead and download this and give it a shot!
Unfortunately it still didn't work. Not sure why honestly. I apologize for the delay we're releasing tomorrow and it's been very hectic
How about you share your logs lmao
can’t help at all if u don’t share any info
I apologize. How can I go about sharing my logs! 😄
And should this log be when the server has or does not have the plugin installed
Stop the server
put the plugin in the server
Start the server
Run the command
Share the latest.log file by uploading it to mclogs and sharing the link
And tell me what isn’t “working”
mclo.gs - Paste, share & analyse your Minecraft logs
Easily paste your Minecraft logs to share and analyse them.
https://github.com/QarthO/qRemoteEnchanting/actions/runs/9480589278#artifacts
And make sure using the jar from the most recent actions, not an old one
GitHub
ci fix · QarthO/qRemoteEnchanting@87bb670
Use your enchanter wirelessly via a command or item! - ci fix · QarthO/qRemoteEnchanting@87bb670
Also I haven’t tested it in 1.21, so I have no clue if it still works there
Yeah we're not 1.21, and won't be for a while. We're running 1.20.4 rn probably will til we can get to 1.21 with all our plugins.
Also, realized I was using the old .jar.
Restarted with new. Will update you as soon as it runs
Why are u atleast not on 1.20.6?
Makes no sense to launch a server on 1.20.4 when 1.21 just released
Honestly that's a great question. Our dev suggested we go to 1.20.4 since we were on 1.20.2 when we first started our beta a month ago. I'm not sure why we didn't go to 1.20.6.
Also, it appears to be working! Got the /enchanter set and did /ench and it brought up the GUI. testing with some more things
You will need to make sure u give ur players a permission in order to use it
I can’t remember
I’m on my phone
Absolutely, I got the permission you sent earlier and will begin to implement it!
But yeah, it just seems really not smart to release a server on 1.20.4
Well I think I changed the permission
^
This was it
Awesome. Thank you so much for this btw. You are a lifesaver. Sorry I was so difficult to work with, I'm new to the server industry and still learning things
You should really speak with your dev tho. Saving an extra hour of dev work by choosing to not update the plugins just so ur players can’t play on new stuff is a really good way to make sure ur players aren’t interested
1.21 added a lot of fun stuff like crafter and trials chamber.
people will be upset if they can’t play with them
1.21 has been out long enough all the big plugins have already update and support it
I will speak with them!
Okay so, spoke with them.
Was also wondering. Is there any way I can edit the amount of times someone can enchant in a IRL day?
Or is that something I can add through permissions?
1.20.4 - 1.21 has massive differences. It’s not minimal
I could set this up for you
I'd love that! Would i need to tell you how many times I'd want it or would it be customizable?
I’ll customize it
Well to 1.21 yeah I definitely agree. Idk about 20.4 to 20.6 though. I am not a master at that
Yeah, well every player in a survival server will be asking about the 1.21 changes so that’s the only relevant thing here. Pointless to compare 2 older versions
Well we're doing an RP server, so nobody's asked about 1.21 yet for us. So at least that's good!
Was also gonna follow up with this! 😄 We were wanting 20 times a day to be max per person.