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 4172c563d0
commit f415924811
1 changed files with 2 additions and 1 deletions

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