Jump to content

Recommended Posts

Posted

Hi,

 

Is it possible to get the modid of a command when a command is sent to the server?

 

I'm building a permission manager and I want users to be able to enter something like <modid>.<command>

 

so... "factionmod.create" where factionmod is the ID

 

I have an event handler that runs a method everytime a command is sent, I need it to get the modid to check groups for that modid

 

 

it needs to be the modid because you might have multiple mods that use the same commands (galacticraft.create and factionmod.create for example)

 

Anyone know how to do this?

 

Thanks

Posted
11 minutes ago, diesieben07 said:

Is the id part of the command itself? Otherwise you will have a hard time.

 

no, the ID is part of the permission in the config file, as a way to identify the different mods... so the system won't be confused if Thermal expansion and IC2 use the same command (for example)

 

 

surely there's a way to identify the mod that a command belongs to?

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Announcements



  • Recently Browsing

    • No registered users viewing this page.
  • Posts

    • Hello! I'm a beginner forge programmer, I want to make a mod that will use the botania mod, but when I just run my mod with botania (not import) it gives an error, here is the log: [main/FATAL] [mixin/]: Mixin apply failed botania_xplat.mixins.json:client.MinecraftAccessor -> net.minecraft.client.Minecraft: org.spongepowered.asm.mixin.gen.throwables.InvalidAccessorException No candidates were found matching f_91041_:Lnet/minecraft/client/color/item/ItemColors; in net/minecraft/client/Minecraft for botania_xplat.mixins.json:client.MinecraftAccessor->@Accessor[FIELD_GETTER]::getItemColors()Lnet/minecraft/client/color/item/ItemColors; [INJECT Applicator Phase -> botania_xplat.mixins.json:client.MinecraftAccessor -> Apply Accessors -> -> Locate -> botania_xplat.mixins.json:client.MinecraftAccessor->@Accessor[FIELD_GETTER]::getItemColors()Lnet/minecraft/client/color/item/ItemColors;]. I tried to install another version of mdk, it does not help
    • Hey! I experienced an issue yesterday that I have never encountered in my entire life after playing Minecraft on my PC for three years. I was playing on a tournament server on 1.21.8 for the first time and everything was running smooth but my game froze and I had to relog. When I relaunched my Minecraft I kept seeing failed to log in: the authentication servers are currently not reachable please try again. I was very confused and thought it might've just glitched so I relaunched again and even restarted pc many times and it said the same thing. I spend the rest of the day doing research about what could possibly be the issue but I found nothing. I saw some others had this issue and tried the methods they used to fix the issue but nothing has worked. I use curseforge as my main launcher. Below I have attached screenshots of my issues. Cursedforge shows me the logs and this is also some of the issues presented. It seems like it cannot verify my account of connect my account for some reason? [22:56:01] [Download-2/ERROR]:Failed to fetch user properties [22:56:01] [Yggdrasil Key Fetcher/ERROR]:Failed to request yggdrasil public key [22:56:06] [IO-Worker-1/ERROR]:Couldn't connect to realms [22:56:55] [Download-1/ERROR]:Failed to retrieve profile key pair   I have tried a bunch of possibly solutions like flushing dns, changing some wifi settings, and a lot of other things but nothing works. If someone knows more about connection protocols or anything that could possibly be the issue please help me. I've watched many YouTube videos and suggestions and nothings worked. thank you and I hope you all have a great day! Also if anyone needs more information I will gladly share
    • Post logs as described in the FAQ (https://forums.minecraftforge.net/topic/125488-rules-and-frequently-asked-questions-faq/)  
    • I did and it's still erratically crashing. EDIT: I decided to redo the entire pack and used the Patchouli version above as my starting point and it seems to have fixed the issue. Thanks so much for your attention!
    • It appears that the setNoRepair() method has been removed  in 1.21.x versions of the Item Class, along with canRepair or other support from the IForgeItem class extension. I searched these forums and and looked at many other repositories, but I don't see how to handle this anymore in Forge. There is no mention of it being deprecated or how to handle. Did I miss something somewhere? How do you prevent an item from being marked as repairable now in Anvil or Grindstone. It's no longer part of Item.Properties. Any advice appreciated. PC      
  • Topics

  • Who's Online (See full list)

    • There are no registered users currently online
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.