mirror of
https://github.com/BentoBoxWorld/BentoBox.git
synced 2024-12-18 07:07:40 +01:00
Fixed Placeholders (forgot to add the replacer in Util#sendMessage() )
This commit is contained in:
parent
0980ab8358
commit
465d85f358
@ -1,11 +1,8 @@
|
||||
package us.tastybento.bskyblock;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.HashSet;
|
||||
import java.util.Set;
|
||||
import java.util.UUID;
|
||||
|
||||
import org.bukkit.Location;
|
||||
import org.bukkit.command.CommandSender;
|
||||
import org.bukkit.entity.Player;
|
||||
import org.bukkit.plugin.java.JavaPlugin;
|
||||
@ -18,8 +15,6 @@ import us.tastybento.bskyblock.database.BSBDatabase.DatabaseType;
|
||||
import us.tastybento.bskyblock.database.managers.IslandsManager;
|
||||
import us.tastybento.bskyblock.database.managers.OfflineHistoryMessages;
|
||||
import us.tastybento.bskyblock.database.managers.PlayersManager;
|
||||
import us.tastybento.bskyblock.database.objects.Island;
|
||||
import us.tastybento.bskyblock.database.objects.Island.SettingsFlag;
|
||||
import us.tastybento.bskyblock.util.VaultHelper;
|
||||
|
||||
/**
|
||||
|
@ -10,6 +10,7 @@ import org.bukkit.command.CommandSender;
|
||||
|
||||
import us.tastybento.bskyblock.BSkyBlock;
|
||||
import us.tastybento.bskyblock.util.nms.NMSAbstraction;
|
||||
import us.tastybento.bskyblock.util.placeholders.PlaceholderHandler;
|
||||
|
||||
/**
|
||||
* A set of utility methods
|
||||
@ -20,10 +21,12 @@ import us.tastybento.bskyblock.util.nms.NMSAbstraction;
|
||||
public class Util {
|
||||
private static BSkyBlock plugin = BSkyBlock.getInstance();
|
||||
|
||||
public static void sendMessage(CommandSender sender, String message){
|
||||
public static void sendMessage(CommandSender receiver, String message){
|
||||
message = PlaceholderHandler.replacePlaceholders(receiver, message);
|
||||
|
||||
if (!ChatColor.stripColor(message).trim().isEmpty()) {
|
||||
for(String part : message.split("\n")){
|
||||
sender.sendMessage(part);
|
||||
receiver.sendMessage(part);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -94,7 +94,7 @@ public class PlaceholderHandler {
|
||||
}
|
||||
|
||||
/**
|
||||
* @return tre if APIs are registered (including Internal), otherwise false
|
||||
* @return true if APIs are registered (including Internal), otherwise false
|
||||
*/
|
||||
public static boolean hasHooks(){
|
||||
return apis != null ? true : false;
|
||||
|
Loading…
Reference in New Issue
Block a user