Fix death messages not being able to be disabled
This commit is contained in:
parent
219c83434b
commit
e9115fba74
2 changed files with 13 additions and 6 deletions
|
@ -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.
|
||||
mod_license=GPLv3
|
||||
# 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.
|
||||
# This should match the base package used for the mod sources.
|
||||
# See https://maven.apache.org/guides/mini/guide-naming-conventions.html
|
||||
|
|
|
@ -92,11 +92,18 @@ public class EventHandler {
|
|||
event.getEntity().spawnAtLocation(head);
|
||||
}
|
||||
|
||||
try {
|
||||
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();
|
||||
if(OTEServerConfig.ENABLE_DEATH_MESSAGES.get())
|
||||
{
|
||||
|
||||
try {
|
||||
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();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Reference in a new issue