mirror of
https://github.com/songoda/SongodaCore.git
synced 2025-02-25 07:51:20 +01:00
Holoshammms
This commit is contained in:
parent
d4aa45e70b
commit
4cb84b7f58
@ -152,7 +152,7 @@ public class EconomyManager {
|
||||
* @return true if this player can have this amount withdrawn
|
||||
*/
|
||||
public static boolean hasBalance(OfflinePlayer player, double cost) {
|
||||
return defaultEcon != null ? defaultEcon.hasBalance(player, cost) : false;
|
||||
return defaultEcon != null && defaultEcon.hasBalance(player, cost);
|
||||
}
|
||||
|
||||
/**
|
||||
@ -164,7 +164,7 @@ public class EconomyManager {
|
||||
* @return true if the total amount was withdrawn successfully
|
||||
*/
|
||||
public static boolean withdrawBalance(OfflinePlayer player, double cost) {
|
||||
return defaultEcon != null ? defaultEcon.withdrawBalance(player, cost) : false;
|
||||
return defaultEcon != null && defaultEcon.withdrawBalance(player, cost);
|
||||
}
|
||||
|
||||
/**
|
||||
@ -176,6 +176,6 @@ public class EconomyManager {
|
||||
* @return true if the total amount was added successfully
|
||||
*/
|
||||
public static boolean deposit(OfflinePlayer player, double amount) {
|
||||
return defaultEcon != null ? defaultEcon.deposit(player, amount) : false;
|
||||
return defaultEcon != null && defaultEcon.deposit(player, amount);
|
||||
}
|
||||
}
|
||||
|
@ -1,15 +1,11 @@
|
||||
package com.songoda.core.library.hologram;
|
||||
|
||||
import com.songoda.core.library.economy.EconomyType;
|
||||
import com.songoda.core.library.economy.economies.Economy;
|
||||
import com.songoda.core.library.hologram.holograms.Hologram;
|
||||
import org.bukkit.Bukkit;
|
||||
import org.bukkit.Location;
|
||||
import org.bukkit.plugin.PluginManager;
|
||||
|
||||
import java.util.Collection;
|
||||
import java.util.Collections;
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
import java.util.*;
|
||||
|
||||
public class HologramManager {
|
||||
|
||||
@ -51,7 +47,7 @@ public class HologramManager {
|
||||
/**
|
||||
* Try to grab the handler for this specific hologram plugin.
|
||||
*
|
||||
* @param name plugin to use
|
||||
* @param name plugin to useH
|
||||
* @return returns null if plugin is not enabled
|
||||
*/
|
||||
public static Hologram getHologram(String name) {
|
||||
@ -91,5 +87,19 @@ public class HologramManager {
|
||||
return Collections.unmodifiableCollection(registeredHolograms.values());
|
||||
}
|
||||
|
||||
public void add(Location location, ArrayList<String> lines) {
|
||||
if (defaultHolo != null)
|
||||
defaultHolo.add(location, lines);
|
||||
}
|
||||
|
||||
public void remove(Location location) {
|
||||
if (defaultHolo != null)
|
||||
defaultHolo.remove(location);
|
||||
}
|
||||
|
||||
public void update(Location location, ArrayList<String> lines) {
|
||||
if (defaultHolo != null)
|
||||
defaultHolo.update(location, lines);
|
||||
}
|
||||
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user