Closed TRMMax closed 2 years ago
I'm looking at the Command.isCreative() code right now and I don't see why it would cause an error.
What error are you getting with this command?
"You must be in creative mode to use this command!" is sent to the players chat with this line of code inside the Command.isCreative() method ChatUtil.sendTranslateMessage("recode.command.require_creative_mode", ChatType.FAIL)
I also either made an oopsie or Command.sendCommand was already broken, because DF just tells me the command is invalid whenever I am in creative.
Oh, I see. You meant a chat error, not an exception.
I think the point of that method is to require creative mode, and print an error otherwise, but return a boolean so commands can use the result. I agree the name should be better; I can change that later.
The real question then, I think, is: why do /uuid and /name even send both a copyable text and a text item? That seems redundant. I will get around to changing this when I add recode macros. But in the meantime can you apply this fix to /name too?
Will do, I also found out Command.sendCommand is not supposed to take a "/" in front of the command to execute, so I will also fix that for all usages of it.
Hmm, on a side note, /name seems to not work altogether anyway
It seems to be an issue with the mojang API, when I go to it it gives this error {"error":"ResourceException","errorMessage":"Gone (410) - The requested resource is no longer available at the server and no forwarding address is known"} Unlike an unknown API request which just says it's not recognised
Ah, https://wiki.vg/Mojang_API#UUID_to_Name_History_.28Removed.29 explains it all. Guess the /name command can't function anymore via the mojang API
Can you remove it? I have to go to class.
Actually, sorry, you should be able to revert that and fix it. Use https://wiki.vg/Mojang_API#UUID_to_Profile_and_Skin.2FCape
fixed uuid command displaying an error message when the player isn't in creative.
Might want to consider not making the isCreative method send an error message when the player is not in creative.