Showing Dropping Anvil Something (Ignore)

This commit is contained in:
Driftay
2019-09-15 05:15:33 -04:00
parent e7db7170d1
commit 2feaed0aad
285 changed files with 28746 additions and 28746 deletions

View File

@@ -17,41 +17,41 @@ import java.math.BigDecimal;
public class Essentials {
private static IEssentials essentials;
private static IEssentials essentials;
public static void setup() {
Plugin ess = Bukkit.getPluginManager().getPlugin("Essentials");
if (ess != null) {
essentials = (IEssentials) ess;
}
}
public static void setup() {
Plugin ess = Bukkit.getPluginManager().getPlugin("Essentials");
if (ess != null) {
essentials = (IEssentials) ess;
}
}
public static boolean isOverBalCap(EconomyParticipator participator, double amount) {
if (essentials == null) {
return false;
}
return amount > essentials.getSettings().getMaxMoney().doubleValue();
}
public static boolean isOverBalCap(EconomyParticipator participator, double amount) {
if (essentials == null) {
return false;
}
return amount > essentials.getSettings().getMaxMoney().doubleValue();
}
// return false if feature is disabled or Essentials isn't available
public static boolean handleTeleport(Player player, Location loc) {
if (!Conf.homesTeleportCommandEssentialsIntegration || essentials == null) {
return false;
}
// return false if feature is disabled or Essentials isn't available
public static boolean handleTeleport(Player player, Location loc) {
if (!Conf.homesTeleportCommandEssentialsIntegration || essentials == null) {
return false;
}
Teleport teleport = essentials.getUser(player).getTeleport();
Trade trade = new Trade(new BigDecimal(Conf.econCostHome), essentials);
try {
teleport.teleport(loc, trade, TeleportCause.PLUGIN);
} catch (Exception e) {
player.sendMessage(ChatColor.RED.toString() + e.getMessage());
}
return true;
}
Teleport teleport = essentials.getUser(player).getTeleport();
Trade trade = new Trade(new BigDecimal(Conf.econCostHome), essentials);
try {
teleport.teleport(loc, trade, TeleportCause.PLUGIN);
} catch (Exception e) {
player.sendMessage(ChatColor.RED.toString() + e.getMessage());
}
return true;
}
public static boolean isVanished(Player player) {
if (essentials == null) return false;
User user = essentials.getUser(player);
return user != null && user.isVanished();
}
public static boolean isVanished(Player player) {
if (essentials == null) return false;
User user = essentials.getUser(player);
return user != null && user.isVanished();
}
}