1
0
mirror of https://github.com/essentials/Essentials.git synced 2025-08-27 00:15:23 +02:00

add option to clear a players powertools on disconnect. test #1369

This commit is contained in:
Iaccidentally
2012-11-12 14:57:14 -05:00
parent 0ca7537440
commit cd23fc957a
3 changed files with 10 additions and 1 deletions

View File

@@ -149,6 +149,12 @@ public class EssentialsPlayerListener implements Listener
}
user.updateActivity(false);
//user.getPlayer().dispose();
boolean ptclear = ess.getSettings().getData().getGeneral().getPtClearOnQuit();
if (ptclear = true)
{
user.getData().clearAllPowertools();
user.queueSave();
}
}
@EventHandler(priority = EventPriority.MONITOR)

View File

@@ -74,4 +74,7 @@ public class General implements StorageObject
@Comment("The quit message when players leave the server")
private String leaveMessage ="&e{PLAYER} has left the game";
@Comment("Enable this to clear powertools when a player disconnects")
private Boolean ptClearOnQuit = false;
}

View File

@@ -76,7 +76,7 @@
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<bukkit.version>1.4.2-R0.1-SNAPSHOT</bukkit.version>
<bukkit.version>1.4.2-R0.3-SNAPSHOT</bukkit.version>
<build.number>Unknown</build.number>
<org-netbeans-modules-editor-indent.CodeStyle.project.expand-tabs>true</org-netbeans-modules-editor-indent.CodeStyle.project.expand-tabs>
<org-netbeans-modules-editor-indent.CodeStyle.project.indent-shift-width>2</org-netbeans-modules-editor-indent.CodeStyle.project.indent-shift-width>