mirror of
https://github.com/mcMMO-Dev/mcMMO.git
synced 2024-11-22 21:26:46 +01:00
Added new methods to replace deprecation in latest Bukkit. Commented out
until RB.
This commit is contained in:
parent
6b84d39dda
commit
c4cd677021
@ -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));
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user