File tree Expand file tree Collapse file tree 2 files changed +5
-3
lines changed
src/main/java/dev/pluginz/combatlogger Expand file tree Collapse file tree 2 files changed +5
-3
lines changed Original file line number Diff line number Diff line change @@ -36,9 +36,10 @@ public DeathListener(CombatLoggerPlugin plugin){
3636 this .plugin = plugin ;
3737 }
3838 @ EventHandler
39- public void onPlayerQuit (PlayerDeathEvent event ) {
39+ public void onPlayerDeath (PlayerDeathEvent event ) {
4040 if (Objects .equals (event .getDeathMessage (), event .getEntity ().getPlayer ().getName () + " died" )){
4141 event .setDeathMessage (event .getEntity ().getPlayer ().getName () + " died because he left during combat" );
4242 }
43+ plugin .getCombatManager ().removePlayerFromCombat (event .getEntity ().getPlayer ());
4344 }
4445}
Original file line number Diff line number Diff line change @@ -60,15 +60,16 @@ public void loadConfig() {
6060 combatTimeout = config .getInt ("combatTimeout" , 30 );
6161 checkVersion = config .getBoolean ("checkVersion" , true );
6262 } catch (IOException e ) {
63- plugin .getLogger ().severe ("Could not load configuration: " + e .getMessage ());
63+ //plugin.getLogger().severe("Could not load configuration: " + e.getMessage());
64+ plugin .getLogger ().severe ("Error while loading the configuration" );
6465 }
6566 }
6667
6768 public void saveConfig () {
6869 try {
6970 config .save ();
7071 } catch (IOException e ) {
71- plugin .getLogger ().severe ("Could not save configuration: " + e . getMessage () );
72+ plugin .getLogger ().severe ("Error while saving the configuration" );
7273 }
7374 }
7475 public void reloadConfig () {
You can’t perform that action at this time.
0 commit comments