diff --git a/pom.xml b/pom.xml
index e361688..b195c45 100644
--- a/pom.xml
+++ b/pom.xml
@@ -9,7 +9,7 @@
UTF-8
1.4-SNAPSHOT
- 1.7.2-R0.1-SNAPSHOT
+ 1.8-R0.1-SNAPSHOT
@@ -84,7 +84,7 @@
com.sk89q
worldguard
- 5.8-SNAPSHOT
+ 6.0.0-SNAPSHOT
diff --git a/src/main/java/de/jaschastarke/minecraft/limitedcreative/blockstate/BlockStateCommand.java b/src/main/java/de/jaschastarke/minecraft/limitedcreative/blockstate/BlockStateCommand.java
index 6a28282..7d5bd9a 100644
--- a/src/main/java/de/jaschastarke/minecraft/limitedcreative/blockstate/BlockStateCommand.java
+++ b/src/main/java/de/jaschastarke/minecraft/limitedcreative/blockstate/BlockStateCommand.java
@@ -223,7 +223,7 @@ public class BlockStateCommand extends BukkitCommand implements IHelpDescribed {
return false;
}
- if (Bukkit.getServer().getOnlinePlayers().length > (context.isPlayer() ? 1 : 0)) {
+ if (Bukkit.getServer().getOnlinePlayers().size() > (context.isPlayer() ? 1 : 0)) {
context.responseFormatted(ChatFormattings.ERROR, L("command.blockstate.migrate_useronline_error"));
return true;
}
diff --git a/src/main/java/de/jaschastarke/minecraft/limitedcreative/limits/PlayerListener.java b/src/main/java/de/jaschastarke/minecraft/limitedcreative/limits/PlayerListener.java
index 5f4628f..7c17065 100644
--- a/src/main/java/de/jaschastarke/minecraft/limitedcreative/limits/PlayerListener.java
+++ b/src/main/java/de/jaschastarke/minecraft/limitedcreative/limits/PlayerListener.java
@@ -45,6 +45,7 @@ import org.bukkit.event.player.PlayerPickupItemEvent;
import org.bukkit.inventory.InventoryHolder;
import org.bukkit.material.DirectionalContainer;
import org.bukkit.potion.PotionEffect;
+import org.bukkit.projectiles.ProjectileSource;
import de.jaschastarke.minecraft.lib.permissions.IAbstractPermission;
import de.jaschastarke.minecraft.lib.permissions.IDynamicPermission;
@@ -224,8 +225,11 @@ public class PlayerListener implements Listener {
EntityDamageByEntityEvent event = (EntityDamageByEntityEvent) rawevent;
Entity source = event.getDamager();
- if (source instanceof Projectile)
- source = ((Projectile) source).getShooter();
+ if (source instanceof Projectile) {
+ ProjectileSource shooter = ((Projectile) source).getShooter();
+ if (shooter instanceof Entity)
+ source = (Entity) shooter;
+ }
if (source instanceof Player) {
Player player = (Player) source;
diff --git a/src/main/java/de/jaschastarke/minecraft/limitedcreative/regions/RegionsCommand.java b/src/main/java/de/jaschastarke/minecraft/limitedcreative/regions/RegionsCommand.java
index b4e517f..5c99f56 100644
--- a/src/main/java/de/jaschastarke/minecraft/limitedcreative/regions/RegionsCommand.java
+++ b/src/main/java/de/jaschastarke/minecraft/limitedcreative/regions/RegionsCommand.java
@@ -243,7 +243,7 @@ public class RegionsCommand extends BukkitCommand implements IHelpDescribed {
if (set.size() > 0) {
region = set.iterator().next();
} else {
- region = getWorldGuard().getGlobalRegionManager().get(w).getRegionExact(GLOBAL_REGION);
+ region = getWorldGuard().getGlobalRegionManager().get(w).getRegion(GLOBAL_REGION);
}
} else {
int rpc = params.getArgumentCount() > 1 ? 1 : 0;