Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

minor command fixes (/name, /uuid, /node and /dfgive) #14

Merged
merged 5 commits into from Oct 27, 2022

Conversation

TRMMax
Copy link
Contributor

@TRMMax TRMMax commented Oct 26, 2022

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.

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.
@homchom
Copy link
Owner

homchom commented Oct 26, 2022

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?

@TRMMax TRMMax marked this pull request as draft October 26, 2022 18:55
@TRMMax
Copy link
Contributor Author

TRMMax commented Oct 26, 2022

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

@homchom
Copy link
Owner

homchom commented Oct 26, 2022

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?

@TRMMax
Copy link
Contributor Author

TRMMax commented Oct 26, 2022

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.

@TRMMax TRMMax changed the title fixed uuid command minor command fixes (/name, /uuid, /node and /dfgive) Oct 26, 2022
@TRMMax TRMMax marked this pull request as ready for review October 26, 2022 19:11
@TRMMax
Copy link
Contributor Author

TRMMax commented Oct 26, 2022

Hmm, on a side note, /name seems to not work altogether anyway

@TRMMax
Copy link
Contributor Author

TRMMax commented Oct 26, 2022

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

@TRMMax
Copy link
Contributor Author

TRMMax commented Oct 26, 2022

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

@homchom
Copy link
Owner

homchom commented Oct 26, 2022

Can you remove it? I have to go to class.

used removed Mojang API
@homchom
Copy link
Owner

homchom commented Oct 26, 2022

Actually, sorry, you should be able to revert that and fix it. Use https://wiki.vg/Mojang_API#UUID_to_Profile_and_Skin.2FCape

@homchom homchom merged commit 0d85e9c into homchom:main Oct 27, 2022
@TRMMax TRMMax deleted the uuid-command-fix branch October 27, 2022 23:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants