summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKHobbits <rob@khobbits.co.uk>2011-10-01 04:57:49 +0100
committerKHobbits <rob@khobbits.co.uk>2011-10-01 04:57:49 +0100
commitf415924811043efbc364c1c60adb6a4a96701882 (patch)
tree57372bf1aed59affb5d92f56840f88c9fe6cdc1d
parent4172c563d086252af0556a60188a8bca7b836a8d (diff)
downloadEssentials-f415924811043efbc364c1c60adb6a4a96701882.tar
Essentials-f415924811043efbc364c1c60adb6a4a96701882.tar.gz
Essentials-f415924811043efbc364c1c60adb6a4a96701882.tar.lz
Essentials-f415924811043efbc364c1c60adb6a4a96701882.tar.xz
Essentials-f415924811043efbc364c1c60adb6a4a96701882.zip
Patching /unlimited to not give items if player is in creative mode.
-rw-r--r--Essentials/src/com/earth2me/essentials/EssentialsBlockListener.java3
1 files changed, 2 insertions, 1 deletions
diff --git a/Essentials/src/com/earth2me/essentials/EssentialsBlockListener.java b/Essentials/src/com/earth2me/essentials/EssentialsBlockListener.java
index 7cd15180b..72c308655 100644
--- a/Essentials/src/com/earth2me/essentials/EssentialsBlockListener.java
+++ b/Essentials/src/com/earth2me/essentials/EssentialsBlockListener.java
@@ -1,6 +1,7 @@
package com.earth2me.essentials;
import java.util.logging.Logger;
+import org.bukkit.GameMode;
import org.bukkit.Material;
import org.bukkit.event.block.BlockListener;
import org.bukkit.event.block.BlockPlaceEvent;
@@ -93,7 +94,7 @@ public class EssentialsBlockListener extends BlockListener
return;
}
boolean unlimitedForUser = user.hasUnlimited(is);
- if (unlimitedForUser)
+ if (unlimitedForUser && user.getGameMode() == GameMode.SURVIVAL)
{
ess.scheduleSyncDelayedTask(
new Runnable()