summaryrefslogtreecommitdiffstats
path: root/EssentialsAntiBuild
diff options
context:
space:
mode:
authorKHobbits <rob@khobbits.co.uk>2013-10-16 20:59:39 +0100
committerKHobbits <rob@khobbits.co.uk>2013-10-16 21:05:33 +0100
commitff46b39f2b42abbe4ce8dc39e564f3dc71a2a104 (patch)
treed4438b241ea1b251105a2622aada79542c2f41ce /EssentialsAntiBuild
parentd6dfe5da65fdc9bda682615488f5dc9917c394b5 (diff)
downloadEssentials-ff46b39f2b42abbe4ce8dc39e564f3dc71a2a104.tar
Essentials-ff46b39f2b42abbe4ce8dc39e564f3dc71a2a104.tar.gz
Essentials-ff46b39f2b42abbe4ce8dc39e564f3dc71a2a104.tar.lz
Essentials-ff46b39f2b42abbe4ce8dc39e564f3dc71a2a104.tar.xz
Essentials-ff46b39f2b42abbe4ce8dc39e564f3dc71a2a104.zip
Extract CommandSender to CommandSource, this should prevent Ess user object leaks.
Diffstat (limited to 'EssentialsAntiBuild')
-rw-r--r--EssentialsAntiBuild/EssentialsAntiBuild.iml27
-rw-r--r--EssentialsAntiBuild/src/com/earth2me/essentials/antibuild/EssentialsAntiBuildListener.java4
2 files changed, 29 insertions, 2 deletions
diff --git a/EssentialsAntiBuild/EssentialsAntiBuild.iml b/EssentialsAntiBuild/EssentialsAntiBuild.iml
new file mode 100644
index 000000000..df12eff90
--- /dev/null
+++ b/EssentialsAntiBuild/EssentialsAntiBuild.iml
@@ -0,0 +1,27 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<module type="JAVA_MODULE" version="4">
+ <component name="NewModuleRootManager" LANGUAGE_LEVEL="JDK_1_6" inherit-compiler-output="false">
+ <output url="file://$MODULE_DIR$/target/classes" />
+ <output-test url="file://$MODULE_DIR$/target/test-classes" />
+ <exclude-output />
+ <content url="file://$MODULE_DIR$">
+ <sourceFolder url="file://$MODULE_DIR$/src" isTestSource="false" />
+ <excludeFolder url="file://$MODULE_DIR$/target" />
+ </content>
+ <orderEntry type="inheritedJdk" />
+ <orderEntry type="sourceFolder" forTests="false" />
+ <orderEntry type="module" module-name="Essentials" />
+ <orderEntry type="module" module-name="EssentialsGroupManager" />
+ <orderEntry type="library" name="Maven: org.bukkit:bukkit:1.4.2-R0.3-SNAPSHOT" level="project" />
+ <orderEntry type="library" name="Maven: org.projectlombok:lombok:0.11.6" level="project" />
+ <orderEntry type="library" name="Maven: commons-io:commons-io:2.4" level="project" />
+ <orderEntry type="library" name="Maven: org.apache.commons:commons-compress:1.4.1" level="project" />
+ <orderEntry type="library" name="Maven: org.tukaani:xz:1.0" level="project" />
+ <orderEntry type="library" name="Maven: cosine:BOSEconomy:0.7" level="project" />
+ <orderEntry type="library" name="Maven: com.iConomy:iConomy:5.0" level="project" />
+ <orderEntry type="library" name="Maven: com.iCo6:iConomy:6.0" level="project" />
+ <orderEntry type="library" name="Maven: me.ashtheking:MultiCurrency:0.05" level="project" />
+ <orderEntry type="library" name="Maven: net.milkbowl:Vault:1.2" level="project" />
+ </component>
+</module>
+
diff --git a/EssentialsAntiBuild/src/com/earth2me/essentials/antibuild/EssentialsAntiBuildListener.java b/EssentialsAntiBuild/src/com/earth2me/essentials/antibuild/EssentialsAntiBuildListener.java
index 7f5acd56f..c81a38ab2 100644
--- a/EssentialsAntiBuild/src/com/earth2me/essentials/antibuild/EssentialsAntiBuildListener.java
+++ b/EssentialsAntiBuild/src/com/earth2me/essentials/antibuild/EssentialsAntiBuildListener.java
@@ -151,7 +151,7 @@ public class EssentialsAntiBuildListener implements Listener
final Entity entity = event.getRemover();
if (entity instanceof Player)
{
- final User user = ess.getUser(entity);
+ final User user = ess.getUser((Player)entity);
final EntityType type = event.getEntity().getType();
final boolean warn = ess.getSettings().warnOnBuildDisallow();
if (prot.getSettingBool(AntiBuildConfig.disable_build) && !user.canBuild() && !user.isAuthorized("essentials.build"))
@@ -259,7 +259,7 @@ public class EssentialsAntiBuildListener implements Listener
if (entity instanceof Player)
{
- final User user = ess.getUser(entity);
+ final User user = ess.getUser((Player)entity);
final ItemStack item = event.getRecipe().getResult();
if (prot.getSettingBool(AntiBuildConfig.disable_use) && !user.canBuild() && !user.isAuthorized("essentials.build"))