-
Notifications
You must be signed in to change notification settings - Fork 37
Per-team togglable friendlyfire #148
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
base: master
Are you sure you want to change the base?
Conversation
BlueZeeKing
left a comment
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.
GUI stuff looks good
|
|
||
| /** Whether friendly fire is enabled for this faction (null = use global config) */ | ||
| @Field("FriendlyFire") | ||
| private Boolean friendlyFire; |
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.
Instead of using a boxed boolean type, this should use an enum with either true, false, or use config. I don't think our serialization system can handle this correctly as is and it would be more readable.
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.
Instead of having a new command for the friendly fire option, it should be added to the existing modify command
|
|
||
| public static void register() { | ||
| ServerLifecycleEvents.SERVER_STARTED.register(FactionsManager::serverStarted); | ||
| ServerLifecycleEvents.SERVER_STOPPING.register(FactionsManager::serverStopping); |
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.
?
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 sorry, this was supposed to be for another pr
also includes: #148 (comment)
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.
so basically, whenever the server shuts down before the save interval is triggered, all data stored in memory is just gone which gives me an "Invalid player data" error when attempting to join my dev server
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.
The server saves itself as it stops, I’m not sure why this is needed
| } | ||
|
|
||
| private static void save(MinecraftServer server) { | ||
| public static void save(MinecraftServer server) { |
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.
Why was this changed?
Resolves #147
feature in action:
reencoded.mp4