summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Essentials/src/com/earth2me/essentials/commands/Commandspawner.java3
1 files changed, 2 insertions, 1 deletions
diff --git a/Essentials/src/com/earth2me/essentials/commands/Commandspawner.java b/Essentials/src/com/earth2me/essentials/commands/Commandspawner.java
index f351019bc..da0c0e274 100644
--- a/Essentials/src/com/earth2me/essentials/commands/Commandspawner.java
+++ b/Essentials/src/com/earth2me/essentials/commands/Commandspawner.java
@@ -6,6 +6,7 @@ import org.bukkit.Material;
import org.bukkit.Server;
import org.bukkit.block.Block;
import org.bukkit.block.CreatureSpawner;
+import org.bukkit.craftbukkit.block.CraftCreatureSpawner;
import org.bukkit.entity.CreatureType;
@@ -33,7 +34,7 @@ public class Commandspawner extends EssentialsCommand
charge(user);
try
{
- ((CreatureSpawner)target).setCreatureType(CreatureType.fromName(args[0]));
+ new CraftCreatureSpawner(target).setCreatureType(CreatureType.fromName(args[0]));
}
catch (Throwable ex)
{