1
0
mirror of https://github.com/essentials/Essentials.git synced 2025-08-10 08:34:17 +02:00

Patching /unlimited to not give items if player is in creative mode.

This commit is contained in:
KHobbits
2011-10-01 04:57:49 +01:00
parent d9c859ba1e
commit 27b0a1b651

View File

@@ -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()