File tree 2 files changed +5
-3
lines changed
src/main/java/dev/pluginz/combatlogger
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){
36
36
this .plugin = plugin ;
37
37
}
38
38
@ EventHandler
39
- public void onPlayerQuit (PlayerDeathEvent event ) {
39
+ public void onPlayerDeath (PlayerDeathEvent event ) {
40
40
if (Objects .equals (event .getDeathMessage (), event .getEntity ().getPlayer ().getName () + " died" )){
41
41
event .setDeathMessage (event .getEntity ().getPlayer ().getName () + " died because he left during combat" );
42
42
}
43
+ plugin .getCombatManager ().removePlayerFromCombat (event .getEntity ().getPlayer ());
43
44
}
44
45
}
Original file line number Diff line number Diff line change @@ -60,15 +60,16 @@ public void loadConfig() {
60
60
combatTimeout = config .getInt ("combatTimeout" , 30 );
61
61
checkVersion = config .getBoolean ("checkVersion" , true );
62
62
} 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" );
64
65
}
65
66
}
66
67
67
68
public void saveConfig () {
68
69
try {
69
70
config .save ();
70
71
} catch (IOException e ) {
71
- plugin .getLogger ().severe ("Could not save configuration: " + e . getMessage () );
72
+ plugin .getLogger ().severe ("Error while saving the configuration" );
72
73
}
73
74
}
74
75
public void reloadConfig () {
You can’t perform that action at this time.
0 commit comments