Fix death messages not being able to be disabled

This commit is contained in:
Zontreck 2024-02-17 15:38:31 -07:00
parent 219c83434b
commit e9115fba74
2 changed files with 13 additions and 6 deletions

View file

@ -48,7 +48,7 @@ mod_name=Thresholds
# The license of the mod. Review your options at https://choosealicense.com/. All Rights Reserved is the default. # The license of the mod. Review your options at https://choosealicense.com/. All Rights Reserved is the default.
mod_license=GPLv3 mod_license=GPLv3
# The mod version. See https://semver.org/ # The mod version. See https://semver.org/
mod_version=1201.4.021624.1543 mod_version=1201.4.021724.1536
# The group ID for the mod. It is only important when publishing as an artifact to a Maven repository. # The group ID for the mod. It is only important when publishing as an artifact to a Maven repository.
# This should match the base package used for the mod sources. # This should match the base package used for the mod sources.
# See https://maven.apache.org/guides/mini/guide-naming-conventions.html # See https://maven.apache.org/guides/mini/guide-naming-conventions.html

View file

@ -92,11 +92,18 @@ public class EventHandler {
event.getEntity().spawnAtLocation(head); event.getEntity().spawnAtLocation(head);
} }
try { if(OTEServerConfig.ENABLE_DEATH_MESSAGES.get())
ChatHelpers.broadcast(Component.literal(DeathMessages.getRandomDeathMessage(Profile.get_profile_of(event.getEntity().getStringUUID()), event.getSource())), event.getEntity().level().getServer()); {
} catch (UserProfileNotYetExistsException e) {
// TODO Auto-generated catch block try {
e.printStackTrace(); ChatHelpers.broadcast(Component.literal(DeathMessages.getRandomDeathMessage(Profile.get_profile_of(event.getEntity().getStringUUID()), event.getSource())), event.getEntity().level().getServer());
} catch (UserProfileNotYetExistsException e) {
// TODO Auto-generated catch block
e.printStackTrace();
} catch(Exception e)
{
e.printStackTrace();
}
} }
} }