Replace some deprecated API calls with non-deprecated alternatives.
This commit does not fix all deprecated API problems, but deals with some of the most straightforward ones.
This commit is contained in:
@@ -1,5 +1,7 @@
|
|||||||
package com.garbagemule.MobArena;
|
package com.garbagemule.MobArena;
|
||||||
|
|
||||||
|
import static org.bukkit.Material.*;
|
||||||
|
|
||||||
import com.garbagemule.MobArena.framework.Arena;
|
import com.garbagemule.MobArena.framework.Arena;
|
||||||
import com.garbagemule.MobArena.framework.ArenaMaster;
|
import com.garbagemule.MobArena.framework.ArenaMaster;
|
||||||
import org.bukkit.Location;
|
import org.bukkit.Location;
|
||||||
@@ -12,6 +14,7 @@ import org.bukkit.permissions.PermissionAttachment;
|
|||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.Arrays;
|
import java.util.Arrays;
|
||||||
import java.util.Collections;
|
import java.util.Collections;
|
||||||
|
import java.util.EnumSet;
|
||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
@@ -287,7 +290,14 @@ public class ArenaClass
|
|||||||
/**
|
/**
|
||||||
* Used by isWeapon() to determine if an ItemStack is a weapon type.
|
* Used by isWeapon() to determine if an ItemStack is a weapon type.
|
||||||
*/
|
*/
|
||||||
private static int[] weaponTypes = {256,257,258,259,261,267,268,269,270,271,272,273,274,275,276,277,278,279,283,284,285,286,290,291,292,293,294,346,398};
|
private static EnumSet<Material> weaponTypes = EnumSet.of(
|
||||||
|
WOOD_SWORD, GOLD_SWORD, STONE_SWORD, IRON_SWORD, DIAMOND_SWORD,
|
||||||
|
WOOD_AXE, GOLD_AXE, STONE_AXE, IRON_AXE, DIAMOND_AXE,
|
||||||
|
WOOD_PICKAXE, GOLD_PICKAXE, STONE_PICKAXE, IRON_PICKAXE, DIAMOND_PICKAXE,
|
||||||
|
WOOD_SPADE, GOLD_SPADE, STONE_SPADE, IRON_SPADE, DIAMOND_SPADE,
|
||||||
|
WOOD_HOE, GOLD_HOE, STONE_HOE, IRON_HOE, DIAMOND_HOE,
|
||||||
|
BOW, FISHING_ROD, FLINT_AND_STEEL, SHEARS, CARROT_STICK, SHIELD
|
||||||
|
);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns true, if the ItemStack appears to be a weapon, in which case
|
* Returns true, if the ItemStack appears to be a weapon, in which case
|
||||||
@@ -298,7 +308,7 @@ public class ArenaClass
|
|||||||
*/
|
*/
|
||||||
public static boolean isWeapon(ItemStack stack) {
|
public static boolean isWeapon(ItemStack stack) {
|
||||||
if (stack == null) return false;
|
if (stack == null) return false;
|
||||||
return Arrays.binarySearch(weaponTypes, stack.getTypeId()) > -1;
|
return weaponTypes.contains(stack.getType());
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -308,30 +318,46 @@ public class ArenaClass
|
|||||||
* 'armor'-node.
|
* 'armor'-node.
|
||||||
*/
|
*/
|
||||||
public enum ArmorType {
|
public enum ArmorType {
|
||||||
HELMET (298,302,306,310,314),
|
HELMET,
|
||||||
CHESTPLATE (299,303,307,311,315),
|
CHESTPLATE,
|
||||||
LEGGINGS (300,304,308,312,316),
|
LEGGINGS,
|
||||||
BOOTS (301,305,309,313,317);
|
BOOTS;
|
||||||
|
|
||||||
private int[] types;
|
|
||||||
|
|
||||||
ArmorType(int... types) {
|
|
||||||
this.types = types;
|
|
||||||
}
|
|
||||||
|
|
||||||
public static ArmorType getType(ItemStack stack) {
|
public static ArmorType getType(ItemStack stack) {
|
||||||
int id = stack.getTypeId();
|
switch (stack.getType()) {
|
||||||
|
case LEATHER_HELMET:
|
||||||
|
case CHAINMAIL_HELMET:
|
||||||
|
case IRON_HELMET:
|
||||||
|
case DIAMOND_HELMET:
|
||||||
|
case GOLD_HELMET:
|
||||||
|
return HELMET;
|
||||||
|
|
||||||
for (ArmorType armorType : ArmorType.values()) {
|
case LEATHER_CHESTPLATE:
|
||||||
for (int type : armorType.types) {
|
case CHAINMAIL_CHESTPLATE:
|
||||||
if (id == type) {
|
case IRON_CHESTPLATE:
|
||||||
return armorType;
|
case DIAMOND_CHESTPLATE:
|
||||||
}
|
case GOLD_CHESTPLATE:
|
||||||
}
|
return CHESTPLATE;
|
||||||
}
|
|
||||||
|
case LEATHER_LEGGINGS:
|
||||||
|
case CHAINMAIL_LEGGINGS:
|
||||||
|
case IRON_LEGGINGS:
|
||||||
|
case DIAMOND_LEGGINGS:
|
||||||
|
case GOLD_LEGGINGS:
|
||||||
|
return LEGGINGS;
|
||||||
|
|
||||||
|
case LEATHER_BOOTS:
|
||||||
|
case CHAINMAIL_BOOTS:
|
||||||
|
case IRON_BOOTS:
|
||||||
|
case DIAMOND_BOOTS:
|
||||||
|
case GOLD_BOOTS:
|
||||||
|
return BOOTS;
|
||||||
|
|
||||||
|
default:
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean equals(Object o) {
|
public boolean equals(Object o) {
|
||||||
|
|||||||
@@ -1368,7 +1368,7 @@ public class ArenaImpl implements Arena
|
|||||||
|
|
||||||
private void removeBlocks() {
|
private void removeBlocks() {
|
||||||
for (Block b : blocks) {
|
for (Block b : blocks) {
|
||||||
b.setTypeId(0);
|
b.setType(Material.AIR);
|
||||||
}
|
}
|
||||||
blocks.clear();
|
blocks.clear();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -248,7 +248,7 @@ public class ArenaListener
|
|||||||
arena.addRepairable(r);
|
arena.addRepairable(r);
|
||||||
|
|
||||||
if (!softRestoreDrops)
|
if (!softRestoreDrops)
|
||||||
b.setTypeId(0);
|
b.setType(Material.AIR);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -398,7 +398,7 @@ public class ArenaListener
|
|||||||
if (b.getType() == Material.TNT) {
|
if (b.getType() == Material.TNT) {
|
||||||
Player planter = getPlanter(b);
|
Player planter = getPlanter(b);
|
||||||
if (planter != null) {
|
if (planter != null) {
|
||||||
b.setTypeId(0);
|
b.setType(Material.AIR);
|
||||||
TNTPrimed tnt = b.getWorld().spawn(b.getLocation(), TNTPrimed.class);
|
TNTPrimed tnt = b.getWorld().spawn(b.getLocation(), TNTPrimed.class);
|
||||||
setPlanter(tnt, planter);
|
setPlanter(tnt, planter);
|
||||||
}
|
}
|
||||||
@@ -504,7 +504,7 @@ public class ArenaListener
|
|||||||
if (mat == Material.CAKE_BLOCK || mat == Material.WATER || mat == Material.LAVA)
|
if (mat == Material.CAKE_BLOCK || mat == Material.WATER || mat == Material.LAVA)
|
||||||
arena.removeBlock(b);
|
arena.removeBlock(b);
|
||||||
else if (arena.removeBlock(b))
|
else if (arena.removeBlock(b))
|
||||||
arena.getWorld().dropItemNaturally(b.getLocation(), new ItemStack(state.getTypeId(), 1));
|
arena.getWorld().dropItemNaturally(b.getLocation(), new ItemStack(state.getType(), 1));
|
||||||
else if (softRestore)
|
else if (softRestore)
|
||||||
arena.addRepairable(r);
|
arena.addRepairable(r);
|
||||||
else
|
else
|
||||||
@@ -791,7 +791,7 @@ public class ArenaListener
|
|||||||
Material.IRON_HELMET, Material.IRON_CHESTPLATE, Material.IRON_LEGGINGS, Material.IRON_BOOTS,
|
Material.IRON_HELMET, Material.IRON_CHESTPLATE, Material.IRON_LEGGINGS, Material.IRON_BOOTS,
|
||||||
Material.DIAMOND_HELMET, Material.DIAMOND_CHESTPLATE, Material.DIAMOND_LEGGINGS, Material.DIAMOND_BOOTS,
|
Material.DIAMOND_HELMET, Material.DIAMOND_CHESTPLATE, Material.DIAMOND_LEGGINGS, Material.DIAMOND_BOOTS,
|
||||||
// Misc
|
// Misc
|
||||||
Material.BOW, Material.FLINT_AND_STEEL, Material.FISHING_ROD, Material.SHEARS, Material.CARROT_STICK
|
Material.BOW, Material.FLINT_AND_STEEL, Material.FISHING_ROD, Material.SHEARS, Material.CARROT_STICK, Material.SHIELD
|
||||||
);
|
);
|
||||||
|
|
||||||
private void repairWeapon(Player p) {
|
private void repairWeapon(Player p) {
|
||||||
@@ -799,7 +799,8 @@ public class ArenaListener
|
|||||||
if (ap != null) {
|
if (ap != null) {
|
||||||
ArenaClass ac = ap.getArenaClass();
|
ArenaClass ac = ap.getArenaClass();
|
||||||
if (ac != null && ac.hasUnbreakableWeapons()) {
|
if (ac != null && ac.hasUnbreakableWeapons()) {
|
||||||
repair(p.getItemInHand());
|
repair(p.getInventory().getItemInMainHand());
|
||||||
|
repair(p.getInventory().getItemInOffHand());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -999,7 +1000,7 @@ public class ArenaListener
|
|||||||
return;
|
return;
|
||||||
|
|
||||||
if (!arena.isRunning()) {
|
if (!arena.isRunning()) {
|
||||||
event.getBlockClicked().getRelative(event.getBlockFace()).setTypeId(0);
|
event.getBlockClicked().getRelative(event.getBlockFace()).setType(Material.AIR);
|
||||||
event.setCancelled(true);
|
event.setCancelled(true);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@@ -1024,7 +1025,7 @@ public class ArenaListener
|
|||||||
return;
|
return;
|
||||||
|
|
||||||
// Iron block
|
// Iron block
|
||||||
if (event.getClickedBlock().getTypeId() == 42) {
|
if (event.getClickedBlock().getType() == Material.IRON_BLOCK) {
|
||||||
handleReadyBlock(p);
|
handleReadyBlock(p);
|
||||||
}
|
}
|
||||||
// Sign
|
// Sign
|
||||||
|
|||||||
@@ -338,29 +338,29 @@ public class MAUtils
|
|||||||
{
|
{
|
||||||
for (int j = y1; j <= y2; j++)
|
for (int j = y1; j <= y2; j++)
|
||||||
{
|
{
|
||||||
world.getBlockAt(i,j,z1).setTypeId(24);
|
world.getBlockAt(i,j,z1).setType(Material.SANDSTONE);
|
||||||
world.getBlockAt(i,j,z2).setTypeId(24);
|
world.getBlockAt(i,j,z2).setType(Material.SANDSTONE);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
for (int k = z1; k <= z2; k++)
|
for (int k = z1; k <= z2; k++)
|
||||||
{
|
{
|
||||||
for (int j = y1; j <= y2; j++)
|
for (int j = y1; j <= y2; j++)
|
||||||
{
|
{
|
||||||
world.getBlockAt(x1,j,k).setTypeId(24);
|
world.getBlockAt(x1,j,k).setType(Material.SANDSTONE);
|
||||||
world.getBlockAt(x2,j,k).setTypeId(24);
|
world.getBlockAt(x2,j,k).setType(Material.SANDSTONE);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Add some hippie light.
|
// Add some hippie light.
|
||||||
for (int i = x1; i <= x2; i++)
|
for (int i = x1; i <= x2; i++)
|
||||||
{
|
{
|
||||||
world.getBlockAt(i,y1+2,z1).setTypeId(89);
|
world.getBlockAt(i,y1+2,z1).setType(Material.GLOWSTONE);
|
||||||
world.getBlockAt(i,y1+2,z2).setTypeId(89);
|
world.getBlockAt(i,y1+2,z2).setType(Material.GLOWSTONE);
|
||||||
}
|
}
|
||||||
for (int k = z1; k <= z2; k++)
|
for (int k = z1; k <= z2; k++)
|
||||||
{
|
{
|
||||||
world.getBlockAt(x1,y1+2,k).setTypeId(89);
|
world.getBlockAt(x1,y1+2,k).setType(Material.GLOWSTONE);
|
||||||
world.getBlockAt(x2,y1+2,k).setTypeId(89);
|
world.getBlockAt(x2,y1+2,k).setType(Material.GLOWSTONE);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Build a monster floor, and some Obsidian foundation.
|
// Build a monster floor, and some Obsidian foundation.
|
||||||
@@ -368,8 +368,8 @@ public class MAUtils
|
|||||||
{
|
{
|
||||||
for (int k = z1; k <= z2; k++)
|
for (int k = z1; k <= z2; k++)
|
||||||
{
|
{
|
||||||
world.getBlockAt(i,y1,k).setTypeId(24);
|
world.getBlockAt(i,y1,k).setType(Material.SANDSTONE);
|
||||||
world.getBlockAt(i,y1-1,k).setTypeId(49);
|
world.getBlockAt(i,y1-1,k).setType(Material.OBSIDIAN);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -377,48 +377,48 @@ public class MAUtils
|
|||||||
for (int i = x1; i <= x2; i++)
|
for (int i = x1; i <= x2; i++)
|
||||||
{
|
{
|
||||||
for (int k = z1; k <= z2; k++)
|
for (int k = z1; k <= z2; k++)
|
||||||
world.getBlockAt(i,y2,k).setTypeId(20);
|
world.getBlockAt(i,y2,k).setType(Material.GLASS);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Monster bulldoze
|
// Monster bulldoze
|
||||||
for (int i = x1+1; i < x2; i++)
|
for (int i = x1+1; i < x2; i++)
|
||||||
for (int j = y1+1; j < y2; j++)
|
for (int j = y1+1; j < y2; j++)
|
||||||
for (int k = z1+1; k < z2; k++)
|
for (int k = z1+1; k < z2; k++)
|
||||||
world.getBlockAt(i,j,k).setTypeId(0);
|
world.getBlockAt(i,j,k).setType(Material.AIR);
|
||||||
|
|
||||||
// Build a hippie lobby
|
// Build a hippie lobby
|
||||||
for (int i = lx1; i <= lx2; i++) // Walls
|
for (int i = lx1; i <= lx2; i++) // Walls
|
||||||
{
|
{
|
||||||
for (int j = ly1; j <= ly2; j++)
|
for (int j = ly1; j <= ly2; j++)
|
||||||
{
|
{
|
||||||
world.getBlockAt(i,j,lz1).setTypeId(24);
|
world.getBlockAt(i,j,lz1).setType(Material.SANDSTONE);
|
||||||
world.getBlockAt(i,j,lz2).setTypeId(24);
|
world.getBlockAt(i,j,lz2).setType(Material.SANDSTONE);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
for (int k = lz1; k <= lz2; k++) // Walls
|
for (int k = lz1; k <= lz2; k++) // Walls
|
||||||
{
|
{
|
||||||
for (int j = ly1; j <= ly2; j++)
|
for (int j = ly1; j <= ly2; j++)
|
||||||
{
|
{
|
||||||
world.getBlockAt(lx1,j,k).setTypeId(24);
|
world.getBlockAt(lx1,j,k).setType(Material.SANDSTONE);
|
||||||
world.getBlockAt(lx2,j,k).setTypeId(24);
|
world.getBlockAt(lx2,j,k).setType(Material.SANDSTONE);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
for (int k = lz1; k <= lz2; k++) // Lights
|
for (int k = lz1; k <= lz2; k++) // Lights
|
||||||
{
|
{
|
||||||
world.getBlockAt(lx1,ly1+2,k).setTypeId(89);
|
world.getBlockAt(lx1,ly1+2,k).setType(Material.GLOWSTONE);
|
||||||
world.getBlockAt(lx2,ly1+2,k).setTypeId(89);
|
world.getBlockAt(lx2,ly1+2,k).setType(Material.GLOWSTONE);
|
||||||
world.getBlockAt(lx1,ly1+3,k).setTypeId(89);
|
world.getBlockAt(lx1,ly1+3,k).setType(Material.GLOWSTONE);
|
||||||
world.getBlockAt(lx2,ly1+3,k).setTypeId(89);
|
world.getBlockAt(lx2,ly1+3,k).setType(Material.GLOWSTONE);
|
||||||
}
|
}
|
||||||
for (int i = lx1; i <= lx2; i++) // Floor
|
for (int i = lx1; i <= lx2; i++) // Floor
|
||||||
{
|
{
|
||||||
for (int k = lz1; k <= lz2; k++)
|
for (int k = lz1; k <= lz2; k++)
|
||||||
world.getBlockAt(i,ly1,k).setTypeId(24);
|
world.getBlockAt(i,ly1,k).setType(Material.SANDSTONE);
|
||||||
}
|
}
|
||||||
for (int i = x1+1; i < lx2; i++) // Bulldoze
|
for (int i = x1+1; i < lx2; i++) // Bulldoze
|
||||||
for (int j = ly1+1; j <= ly2; j++)
|
for (int j = ly1+1; j <= ly2; j++)
|
||||||
for (int k = lz1+1; k < lz2; k++)
|
for (int k = lz1+1; k < lz2; k++)
|
||||||
world.getBlockAt(i,j,k).setTypeId(0);
|
world.getBlockAt(i,j,k).setType(Material.AIR);
|
||||||
|
|
||||||
// Place the hippie signs
|
// Place the hippie signs
|
||||||
//Iterator<String> iterator = am.getClasses().iterator();
|
//Iterator<String> iterator = am.getClasses().iterator();
|
||||||
|
|||||||
@@ -310,7 +310,7 @@ public class MobArena extends JavaPlugin
|
|||||||
|
|
||||||
public boolean giveMoney(Player p, ItemStack item) {
|
public boolean giveMoney(Player p, ItemStack item) {
|
||||||
if (economy != null) {
|
if (economy != null) {
|
||||||
EconomyResponse result = economy.depositPlayer(p.getName(), getAmount(item));
|
EconomyResponse result = economy.depositPlayer(p, getAmount(item));
|
||||||
return (result.type == ResponseType.SUCCESS);
|
return (result.type == ResponseType.SUCCESS);
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
@@ -322,7 +322,7 @@ public class MobArena extends JavaPlugin
|
|||||||
|
|
||||||
public boolean takeMoney(Player p, double amount) {
|
public boolean takeMoney(Player p, double amount) {
|
||||||
if (economy != null) {
|
if (economy != null) {
|
||||||
EconomyResponse result = economy.withdrawPlayer(p.getName(), amount);
|
EconomyResponse result = economy.withdrawPlayer(p, amount);
|
||||||
return (result.type == ResponseType.SUCCESS);
|
return (result.type == ResponseType.SUCCESS);
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
@@ -333,7 +333,7 @@ public class MobArena extends JavaPlugin
|
|||||||
}
|
}
|
||||||
|
|
||||||
public boolean hasEnough(Player p, double amount) {
|
public boolean hasEnough(Player p, double amount) {
|
||||||
return economy == null || (economy.getBalance(p.getName()) >= amount);
|
return economy == null || (economy.getBalance(p) >= amount);
|
||||||
}
|
}
|
||||||
|
|
||||||
public String economyFormat(ItemStack item) {
|
public String economyFormat(ItemStack item) {
|
||||||
|
|||||||
@@ -208,7 +208,7 @@ public class SetupCommand implements Command, Listener {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private boolean isTool(ItemStack item) {
|
private boolean isTool(ItemStack item) {
|
||||||
if (item == null || item.getTypeId() == 0) return false;
|
if (item == null || item.getType() == Material.AIR) return false;
|
||||||
|
|
||||||
String name = item.getItemMeta().getDisplayName();
|
String name = item.getItemMeta().getDisplayName();
|
||||||
if (name == null) return false;
|
if (name == null) return false;
|
||||||
|
|||||||
@@ -2,6 +2,7 @@ package com.garbagemule.MobArena.util.inventory;
|
|||||||
|
|
||||||
import com.garbagemule.MobArena.MobArena;
|
import com.garbagemule.MobArena.MobArena;
|
||||||
import com.garbagemule.MobArena.framework.Arena;
|
import com.garbagemule.MobArena.framework.Arena;
|
||||||
|
import org.bukkit.Material;
|
||||||
import org.bukkit.configuration.InvalidConfigurationException;
|
import org.bukkit.configuration.InvalidConfigurationException;
|
||||||
import org.bukkit.configuration.file.YamlConfiguration;
|
import org.bukkit.configuration.file.YamlConfiguration;
|
||||||
import org.bukkit.entity.Player;
|
import org.bukkit.entity.Player;
|
||||||
@@ -116,12 +117,12 @@ public class InventoryManager
|
|||||||
|
|
||||||
// Check for null or id 0, or AIR
|
// Check for null or id 0, or AIR
|
||||||
for (ItemStack stack : inventory) {
|
for (ItemStack stack : inventory) {
|
||||||
if (stack != null && stack.getTypeId() != 0)
|
if (stack != null && stack.getType() != Material.AIR)
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
for (ItemStack stack : armor) {
|
for (ItemStack stack : armor) {
|
||||||
if (stack != null && stack.getTypeId() != 0)
|
if (stack != null && stack.getType() != Material.AIR)
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -5,6 +5,7 @@ import com.garbagemule.MobArena.waves.MABoss;
|
|||||||
import com.garbagemule.MobArena.waves.ability.Ability;
|
import com.garbagemule.MobArena.waves.ability.Ability;
|
||||||
import com.garbagemule.MobArena.waves.ability.AbilityInfo;
|
import com.garbagemule.MobArena.waves.ability.AbilityInfo;
|
||||||
import com.garbagemule.MobArena.waves.ability.AbilityUtils;
|
import com.garbagemule.MobArena.waves.ability.AbilityUtils;
|
||||||
|
import org.bukkit.Material;
|
||||||
import org.bukkit.block.Block;
|
import org.bukkit.block.Block;
|
||||||
import org.bukkit.entity.Player;
|
import org.bukkit.entity.Player;
|
||||||
|
|
||||||
@@ -19,8 +20,8 @@ public class Flood implements Ability
|
|||||||
Player p = AbilityUtils.getRandomPlayer(arena);
|
Player p = AbilityUtils.getRandomPlayer(arena);
|
||||||
Block block = p.getLocation().getBlock();
|
Block block = p.getLocation().getBlock();
|
||||||
|
|
||||||
if (block.getTypeId() == 0) {
|
if (block.getType() == Material.AIR) {
|
||||||
block.setTypeId(8);
|
block.setType(Material.WATER);
|
||||||
arena.addBlock(block);
|
arena.addBlock(block);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user