Permalink
Browse files

Updated for Bukkit changes in the last year

  • Loading branch information...
DarkArc committed May 29, 2016
1 parent eb34539 commit f3c2636b358be29a1f408bf254432f4f2a53fe4f
View
13 pom.xml
@@ -28,8 +28,8 @@
<url>http://maven.sk89q.com/repo</url>
</repository>
<repository>
<id>bukkit-repo</id>
<url>http://repo.bukkit.org/content/groups/public/</url>
<id>spigot-repo</id>
<url>https://hub.spigotmc.org/nexus/content/repositories/snapshots/</url>
</repository>
</repositories>
<dependencies>
@@ -38,6 +38,7 @@
<artifactId>worldedit</artifactId>
<version>5.5.9-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>com.zachsthings.libcomponents</groupId>
<artifactId>libcomponents-bukkit</artifactId>
@@ -49,20 +50,20 @@
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>org.bukkit</groupId>
<artifactId>bukkit</artifactId>
<version>1.7.10-R0.1-SNAPSHOT</version>
<scope>compile</scope>
<type>jar</type>
<version>1.9.4-R0.1-SNAPSHOT</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>net.sf.opencsv</groupId>
<artifactId>opencsv</artifactId>
<version>2.0</version>
</dependency>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
@@ -36,6 +36,7 @@
import com.zachsthings.libcomponents.config.Setting;
import org.bukkit.ChatColor;
import org.bukkit.Location;
import org.bukkit.Material;
import org.bukkit.block.Block;
import org.bukkit.command.CommandSender;
import org.bukkit.entity.Player;
@@ -86,7 +87,7 @@ public void onInteract(PlayerInteractEvent event) {
}
if (event.getAction() == Action.LEFT_CLICK_AIR) {
Block block = player.getTargetBlock(null, 300);
Block block = player.getTargetBlock((Set<Material>) null, 300);
if (block != null) {
player.getWorld().strikeLightning(block.getLocation());
}
@@ -1,6 +1,7 @@
package com.sk89q.commandbook.util;
import com.google.common.collect.Lists;
import com.google.common.collect.Sets;
import com.sk89q.commandbook.CommandBook;
import com.sk89q.commandbook.locations.*;
import com.sk89q.commandbook.util.entity.player.PlayerUtil;
@@ -9,6 +10,7 @@
import com.sk89q.minecraft.util.commands.CommandException;
import org.bukkit.ChatColor;
import org.bukkit.Location;
import org.bukkit.Material;
import org.bukkit.World;
import org.bukkit.block.Block;
import org.bukkit.command.CommandSender;
@@ -569,7 +571,7 @@ public static Location matchLocation(CommandSender source, String filter)
CommandBook.inst().checkPermission(source, "commandbook.locations.target");
Player player = checkPlayer(source);
Location playerLoc = player.getLocation();
Block targetBlock = player.getTargetBlock(null, 100);
Block targetBlock = player.getTargetBlock((Set<Material>) null, 100);
if (targetBlock == null) {
throw new CommandException("Failed to find a block in your target!");
@@ -30,24 +30,23 @@ public void play (Note note) {
}
public Sound toSound(Instrument instrument) {
switch(instrument) {
case PIANO:
return Sound.NOTE_PIANO;
return Sound.BLOCK_NOTE_HARP;
case GUITAR:
return Sound.NOTE_PLING;
return Sound.BLOCK_NOTE_PLING;
case BASS:
return Sound.NOTE_BASS;
return Sound.BLOCK_NOTE_BASS;
case BASS_GUITAR:
return Sound.NOTE_BASS_GUITAR;
return Sound.BLOCK_NOTE_BASS;
case STICKS:
return Sound.NOTE_STICKS;
return Sound.BLOCK_NOTE_HAT;
case BASS_DRUM:
return Sound.NOTE_BASS_DRUM;
return Sound.BLOCK_NOTE_BASEDRUM;
case SNARE_DRUM:
return Sound.NOTE_SNARE_DRUM;
return Sound.BLOCK_NOTE_SNARE;
default:
return Sound.NOTE_PIANO;
return Sound.BLOCK_NOTE_HARP;
}
}
}

0 comments on commit f3c2636

Please sign in to comment.