1
0
mirror of https://github.com/mcMMO-Dev/mcMMO.git synced 2025-06-19 15:31:25 +02:00

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
src/main/java/com/gmail/nossr50/skills

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

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