Added new methods to replace deprecation in latest Bukkit. Commented out

until RB.
This commit is contained in:
GJ 2012-06-23 12:13:30 -04:00
parent 6b84d39dda
commit c4cd677021
2 changed files with 3 additions and 0 deletions

View File

@ -9,6 +9,7 @@ import java.util.Random;
import org.bukkit.ChatColor;
import org.bukkit.Material;
import org.bukkit.block.Block;
import org.bukkit.entity.EntityType;
import org.bukkit.entity.Player;
import org.bukkit.entity.TNTPrimed;
import org.bukkit.event.entity.EntityDamageEvent;
@ -295,6 +296,7 @@ public class BlastMining {
player.sendMessage(LocaleLoader.getString("Mining.Blast.Boom"));
/* Create the TNT entity */
// TNTPrimed tnt = (TNTPrimed) player.getWorld().spawnEntity(block.getLocation(), EntityType.PRIMED_TNT);
TNTPrimed tnt = player.getWorld().spawn(block.getLocation(), TNTPrimed.class);
plugin.addToTNTTracker(tnt.getEntityId(), player.getName());
tnt.setFuseTicks(0);

View File

@ -55,6 +55,7 @@ public class CallOfTheWildEventHandler {
}
protected void spawnCreature() {
// LivingEntity entity = (LivingEntity) player.getWorld().spawnEntity(player.getLocation(), type);
LivingEntity entity = player.getWorld().spawnCreature(player.getLocation(), type);
entity.setMetadata("mcmmoSummoned", new FixedMetadataValue(mcMMO.p, true));