Fix Spawner

git-svn-id: https://svn.java.net/svn/essentials~svn/trunk@1580 e251c2fe-e539-e718-e476-b85c1f46cddb
This commit is contained in:
snowleo 2011-06-03 20:11:20 +00:00
parent e94a01b149
commit aef2dd35d6

View File

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