Disabled bending in spectator mode.

This commit is contained in:
jedk1 2015-08-21 15:18:04 +01:00
parent eeae6d217b
commit 5b7edaeb00

View file

@ -32,6 +32,7 @@ import java.util.concurrent.ConcurrentHashMap;
import org.bukkit.Bukkit;
import org.bukkit.ChatColor;
import org.bukkit.GameMode;
import org.bukkit.Location;
import org.bukkit.Material;
import org.bukkit.OfflinePlayer;
@ -285,6 +286,8 @@ public class GeneralMethods {
return false;
if (p == null)
return false;
if (p.getGameMode() == GameMode.SPECTATOR)
return false;
if (cooldowns.containsKey(p.getName())) {
if (cooldowns.get(p.getName()) + ProjectKorra.plugin.getConfig().getLong("Properties.GlobalCooldown") >= System.currentTimeMillis()) {
return false;