~ Updated Bukkit version to 1.6.4.
This commit is contained in:
parent
6e9177fdff
commit
9c74e658ba
@ -126,8 +126,8 @@ public class ArenaHandler {
|
|||||||
player.getName()
|
player.getName()
|
||||||
+ ".blockchooser") != null) {
|
+ ".blockchooser") != null) {
|
||||||
ItemStack shopBlockChooser = new ItemStack(
|
ItemStack shopBlockChooser = new ItemStack(
|
||||||
Material.getMaterial((Integer) W.config
|
Material.getMaterial((String) W.config
|
||||||
.get(ConfigC.shop_blockChooserID)),
|
.get(ConfigC.shop_blockChooserIDname)),
|
||||||
1);
|
1);
|
||||||
ItemMeta shopBlockChooser_IM = shopBlockChooser
|
ItemMeta shopBlockChooser_IM = shopBlockChooser
|
||||||
.getItemMeta();
|
.getItemMeta();
|
||||||
|
@ -21,7 +21,8 @@ public class CMDwand extends DefaultCMD {
|
|||||||
String[] args) {
|
String[] args) {
|
||||||
if (player != null) {
|
if (player != null) {
|
||||||
ItemStack wand = new ItemStack(
|
ItemStack wand = new ItemStack(
|
||||||
Material.getMaterial((Integer) W.config.get(ConfigC.wandID)));
|
Material.getMaterial((String) W.config
|
||||||
|
.get(ConfigC.wandIDname)));
|
||||||
ItemMeta im = wand.getItemMeta();
|
ItemMeta im = wand.getItemMeta();
|
||||||
im.setDisplayName(MessageM.replaceAll((String) W.config
|
im.setDisplayName(MessageM.replaceAll((String) W.config
|
||||||
.get(ConfigC.wandName)));
|
.get(ConfigC.wandName)));
|
||||||
|
@ -41,7 +41,7 @@ public enum ConfigC {
|
|||||||
autoUpdateCheck (true, W.config),
|
autoUpdateCheck (true, W.config),
|
||||||
autoDownloadUpdate (false, W.config),
|
autoDownloadUpdate (false, W.config),
|
||||||
|
|
||||||
wandID (280, W.config),
|
wandIDname ("STICK", W.config),
|
||||||
wandName ("%A&l" + BlockHunt.pdfFile.getName() + "%N's selection wand",
|
wandName ("%A&l" + BlockHunt.pdfFile.getName() + "%N's selection wand",
|
||||||
W.config),
|
W.config),
|
||||||
wandDescription (new String[] {
|
wandDescription (new String[] {
|
||||||
@ -54,7 +54,7 @@ public enum ConfigC {
|
|||||||
shop_title ("%H&lBlockHunt %NShop", W.config),
|
shop_title ("%H&lBlockHunt %NShop", W.config),
|
||||||
shop_price ("%NPrice: %A%amount% %Ntokens.", W.config),
|
shop_price ("%NPrice: %A%amount% %Ntokens.", W.config),
|
||||||
shop_blockChooserEnabled (true, W.config),
|
shop_blockChooserEnabled (true, W.config),
|
||||||
shop_blockChooserID (340, W.config),
|
shop_blockChooserIDname ("BOOK", W.config),
|
||||||
shop_blockChooserPrice (3000, W.config),
|
shop_blockChooserPrice (3000, W.config),
|
||||||
shop_blockChooserName ("%H&lBlock Chooser", W.config),
|
shop_blockChooserName ("%H&lBlock Chooser", W.config),
|
||||||
shop_blockChooserDescription (new String[] {
|
shop_blockChooserDescription (new String[] {
|
||||||
@ -62,7 +62,7 @@ public enum ConfigC {
|
|||||||
"%ARight-Click%N in the lobby and choose",
|
"%ARight-Click%N in the lobby and choose",
|
||||||
"%Nthe block you want to be!", "&6Unlimited uses." }, W.config),
|
"%Nthe block you want to be!", "&6Unlimited uses." }, W.config),
|
||||||
shop_BlockHuntPassEnabled (true, W.config),
|
shop_BlockHuntPassEnabled (true, W.config),
|
||||||
shop_BlockHuntPassID (421, W.config),
|
shop_BlockHuntPassIDname ("NAME_TAG", W.config),
|
||||||
shop_BlockHuntPassPrice (150, W.config),
|
shop_BlockHuntPassPrice (150, W.config),
|
||||||
shop_BlockHuntPassName ("%H&lBlockHunt Pass", W.config),
|
shop_BlockHuntPassName ("%H&lBlockHunt Pass", W.config),
|
||||||
shop_BlockHuntPassDescription (new String[] {
|
shop_BlockHuntPassDescription (new String[] {
|
||||||
|
@ -267,8 +267,8 @@ public class InventoryHandler {
|
|||||||
shopTokens.setItemMeta(shopTokens_IM);
|
shopTokens.setItemMeta(shopTokens_IM);
|
||||||
|
|
||||||
ItemStack shopBlockChooser = new ItemStack(
|
ItemStack shopBlockChooser = new ItemStack(
|
||||||
Material.getMaterial((Integer) W.config
|
Material.getMaterial((String) W.config
|
||||||
.get(ConfigC.shop_blockChooserID)), 1);
|
.get(ConfigC.shop_blockChooserIDname)), 1);
|
||||||
ItemMeta shopBlockChooser_IM = shopBlockChooser.getItemMeta();
|
ItemMeta shopBlockChooser_IM = shopBlockChooser.getItemMeta();
|
||||||
shopBlockChooser_IM.setDisplayName(MessageM
|
shopBlockChooser_IM.setDisplayName(MessageM
|
||||||
.replaceAll((String) W.config
|
.replaceAll((String) W.config
|
||||||
@ -288,8 +288,8 @@ public class InventoryHandler {
|
|||||||
shopBlockChooser.setItemMeta(shopBlockChooser_IM);
|
shopBlockChooser.setItemMeta(shopBlockChooser_IM);
|
||||||
|
|
||||||
ItemStack shopBlockHuntPass = new ItemStack(
|
ItemStack shopBlockHuntPass = new ItemStack(
|
||||||
Material.getMaterial((Integer) W.config
|
Material.getMaterial((String) W.config
|
||||||
.get(ConfigC.shop_BlockHuntPassID)), 1);
|
.get(ConfigC.shop_BlockHuntPassIDname)), 1);
|
||||||
ItemMeta shopBlockHuntPass_IM = shopBlockHuntPass.getItemMeta();
|
ItemMeta shopBlockHuntPass_IM = shopBlockHuntPass.getItemMeta();
|
||||||
shopBlockHuntPass_IM.setDisplayName(MessageM
|
shopBlockHuntPass_IM.setDisplayName(MessageM
|
||||||
.replaceAll((String) W.config
|
.replaceAll((String) W.config
|
||||||
|
@ -39,32 +39,32 @@ public class OnPlayerMoveEvent implements Listener {
|
|||||||
Location loc = player.getLocation();
|
Location loc = player.getLocation();
|
||||||
if (loc.getBlockX() > maxX) {
|
if (loc.getBlockX() > maxX) {
|
||||||
event.setCancelled(true);
|
event.setCancelled(true);
|
||||||
player.playEffect(loc, Effect.ENDER_SIGNAL, 0);
|
player.playEffect(loc, Effect.ENDER_SIGNAL, null);
|
||||||
player.playSound(loc, Sound.GHAST_FIREBALL, 1, 1);
|
player.playSound(loc, Sound.GHAST_FIREBALL, 1, 1);
|
||||||
player.teleport(arena.hidersWarp);
|
player.teleport(arena.hidersWarp);
|
||||||
} else if (loc.getBlockX() < minX) {
|
} else if (loc.getBlockX() < minX) {
|
||||||
event.setCancelled(true);
|
event.setCancelled(true);
|
||||||
player.playEffect(loc, Effect.ENDER_SIGNAL, 0);
|
player.playEffect(loc, Effect.ENDER_SIGNAL, null);
|
||||||
player.playSound(loc, Sound.GHAST_FIREBALL, 1, 1);
|
player.playSound(loc, Sound.GHAST_FIREBALL, 1, 1);
|
||||||
player.teleport(arena.hidersWarp);
|
player.teleport(arena.hidersWarp);
|
||||||
} else if (loc.getBlockZ() > maxZ) {
|
} else if (loc.getBlockZ() > maxZ) {
|
||||||
event.setCancelled(true);
|
event.setCancelled(true);
|
||||||
player.playEffect(loc, Effect.ENDER_SIGNAL, 0);
|
player.playEffect(loc, Effect.ENDER_SIGNAL, null);
|
||||||
player.playSound(loc, Sound.GHAST_FIREBALL, 1, 1);
|
player.playSound(loc, Sound.GHAST_FIREBALL, 1, 1);
|
||||||
player.teleport(arena.hidersWarp);
|
player.teleport(arena.hidersWarp);
|
||||||
} else if (loc.getBlockZ() < minZ) {
|
} else if (loc.getBlockZ() < minZ) {
|
||||||
event.setCancelled(true);
|
event.setCancelled(true);
|
||||||
player.playEffect(loc, Effect.ENDER_SIGNAL, 0);
|
player.playEffect(loc, Effect.ENDER_SIGNAL, null);
|
||||||
player.playSound(loc, Sound.GHAST_FIREBALL, 1, 1);
|
player.playSound(loc, Sound.GHAST_FIREBALL, 1, 1);
|
||||||
player.teleport(arena.hidersWarp);
|
player.teleport(arena.hidersWarp);
|
||||||
} else if (loc.getBlockY() > maxY) {
|
} else if (loc.getBlockY() > maxY) {
|
||||||
event.setCancelled(true);
|
event.setCancelled(true);
|
||||||
player.playEffect(loc, Effect.ENDER_SIGNAL, 0);
|
player.playEffect(loc, Effect.ENDER_SIGNAL, null);
|
||||||
player.playSound(loc, Sound.GHAST_FIREBALL, 1, 1);
|
player.playSound(loc, Sound.GHAST_FIREBALL, 1, 1);
|
||||||
player.teleport(arena.hidersWarp);
|
player.teleport(arena.hidersWarp);
|
||||||
} else if (loc.getBlockY() < minY) {
|
} else if (loc.getBlockY() < minY) {
|
||||||
event.setCancelled(true);
|
event.setCancelled(true);
|
||||||
player.playEffect(loc, Effect.ENDER_SIGNAL, 0);
|
player.playEffect(loc, Effect.ENDER_SIGNAL, null);
|
||||||
player.playSound(loc, Sound.GHAST_FIREBALL, 1, 1);
|
player.playSound(loc, Sound.GHAST_FIREBALL, 1, 1);
|
||||||
player.teleport(arena.hidersWarp);
|
player.teleport(arena.hidersWarp);
|
||||||
}
|
}
|
||||||
|
@ -14,6 +14,7 @@ import org.bukkit.entity.Player;
|
|||||||
import org.bukkit.inventory.ItemStack;
|
import org.bukkit.inventory.ItemStack;
|
||||||
|
|
||||||
public class SolidBlockHandler {
|
public class SolidBlockHandler {
|
||||||
|
@SuppressWarnings("deprecation")
|
||||||
public static void makePlayerUnsolid(Player player) {
|
public static void makePlayerUnsolid(Player player) {
|
||||||
ItemStack block = player.getInventory().getItem(8);
|
ItemStack block = player.getInventory().getItem(8);
|
||||||
Block pBlock = player.getLocation().getBlock();
|
Block pBlock = player.getLocation().getBlock();
|
||||||
@ -48,6 +49,7 @@ public class SolidBlockHandler {
|
|||||||
for (Player playerShow : Bukkit.getOnlinePlayers()) {
|
for (Player playerShow : Bukkit.getOnlinePlayers()) {
|
||||||
playerShow.showPlayer(player);
|
playerShow.showPlayer(player);
|
||||||
}
|
}
|
||||||
|
|
||||||
MiscDisguise disguise = new MiscDisguise(DisguiseType.FALLING_BLOCK,
|
MiscDisguise disguise = new MiscDisguise(DisguiseType.FALLING_BLOCK,
|
||||||
block.getTypeId(), block.getDurability());
|
block.getTypeId(), block.getDurability());
|
||||||
DisguiseAPI.disguiseToAll(player, disguise);
|
DisguiseAPI.disguiseToAll(player, disguise);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user