-
Notifications
You must be signed in to change notification settings - Fork 941
Add ChatCommands & New ConsoleCommands #939
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
Closed
Closed
Changes from all commits
Commits
Show all changes
23 commits
Select commit
Hold shift + click to select a range
a3b9f0f
Fix mouse getting grabbed outside window of the game
KKNecmi b5873a3
Merge branch 'smartcmd:main' into main
KKNecmi 06b774e
Merge branch 'smartcmd:main' into main
KKNecmi cb6106b
Merge branch 'main' of https://github.com/smartcmd/MinecraftConsoles
KKNecmi 0436a6e
Merge branch 'main' of https://github.com/KKNecmi/MinecraftConsoles
KKNecmi c7e8db1
Merge branch 'smartcmd:main' into main
KKNecmi 79dbd39
Merge branch 'main' of https://github.com/KKNecmi/MinecraftConsoles
KKNecmi 76b501a
revert sln
KKNecmi 86102e7
merge
KKNecmi 0b76293
Merge branch 'main' of https://github.com/smartcmd/MinecraftConsoles
KKNecmi 1884085
Merge branch 'smartcmd:main' into main
KKNecmi 860876c
Merge branch 'smartcmd:main' into main
KKNecmi 0cfe187
Merge branch 'smartcmd:main' into main
KKNecmi 7d891f1
Merge branch 'main' of https://github.com/KKNecmi/MinecraftConsoles
KKNecmi 19db7e7
Merge branch 'main' of https://github.com/smartcmd/MinecraftConsoles
KKNecmi 5e3f188
Merge branch 'main' of https://github.com/smartcmd/MinecraftConsoles
KKNecmi 23bf01f
ChatCommands Testing
KKNecmi 38edfa8
Added Chat Listening For Chat Commands, Added /kill,gamemode,teleport…
KKNecmi 5755be1
Merge branch 'smartcmd:main' into chatcommands
KKNecmi 44f17c7
trying to resolve conflict
KKNecmi 1a0953e
Merge branch 'main' into chatcommands
KKNecmi 441e5f0
start adding /effect
KKNecmi 6d458d7
Merge branch 'chatcommands' of https://github.com/KKNecmi/MinecraftCo…
KKNecmi File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In general, this particular non-modular implementation of commands in addition to the various independent command .cpp/.h files is confusing and not very good architecturally. Ideally these should be unified and all of our commands should be implemented in their own files. Having this duplicate implementation is messy and just not good for maintainability long term.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Im not sure if you made a error in "should be implemented in their own files." because thats like that right now , because 4J had "independent command .cpp/.h files" i taken from there if i dont get you wrong you saying its better if gamemodecommand.cpp,teleportcommand.cpp etc comes in to single file just could be in playerconnection.cpp while checking logadminaction everything inside playerconnection or merging everycommand.cpp with already used commandispatcher.cpp
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I’m not sure what you mean
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"What is your opinion on how to fix the issue of 'various independent command .cpp/.h files is confusing' in this case?
or
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No, just define all commands in their own separate .cpp files. Again, there is no reason to have hard coded commands in any particular irrelevant file, the commands should be defined in their own files, registered somewhere centrally so they work in singleplayer and dedicated servers, and then all the weird hardcoded ones should be removed. That’s a far more maintainable pattern than what you’re proposing.
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
did you read the code? by this answer i dont think you did it the commands are in the their own command files and with servercommandispatcher they get registered can you show me which hardcoded ones you talking about
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
https://github.com/smartcmd/MinecraftConsoles/pull/939/files/6d458d7ef8205d6173bb967df0d25e29b09adf6c#diff-6c71d6fb6dc90b8265c816b3bdc2c79bbeb3676c23ce0874871b1148c350b2b3
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
oh you mean the console commands i continued adding them same as direct usage i guess i could rewrite to use xxxcommand.cpp and bytearrayoutputstream same as playerconnection thanks for pointing this i will make it so use same methods as playerconnection also add some more needed commands and one day maybe open a pr again