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:
@@ -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)
|
||||
|
@@ -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;
|
||||
}
|
||||
|
2
pom.xml
2
pom.xml
@@ -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>
|
||||
|
Reference in New Issue
Block a user