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