Skip to content

Conversation

@choke-dev
Copy link

@choke-dev choke-dev commented Nov 27, 2025

Resolves #147

feature in action:

reencoded.mp4

@choke-dev choke-dev changed the title feat: per-team togglable friendlyfire Per-team togglable friendlyfire Nov 27, 2025
Copy link
Collaborator

@BlueZeeKing BlueZeeKing left a 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;
Copy link
Collaborator

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.

Copy link
Collaborator

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);
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

?

Copy link
Author

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)

Copy link
Author

@choke-dev choke-dev Dec 9, 2025

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

Copy link
Collaborator

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) {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why was this changed?

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.

Per-Team Togglable Friendly Fire

2 participants