summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLogan Fick <logaldeveloper@protonmail.com>2018-12-11 18:39:17 -0500
committerLogan Fick <logaldeveloper@protonmail.com>2018-12-11 18:39:17 -0500
commitbc4ec4561ed1200497a5edcd03738ec9c0a16072 (patch)
tree16128770c7dc713f781e3910705cc5a98522c0fc
parentfd3823f2d9beb2f33c6eac019c8bea0fb090eb50 (diff)
Reverted commit unintentionally pushed to master.
-rw-r--r--src/com/redstoner/misc/Utils.java42
1 files changed, 0 insertions, 42 deletions
diff --git a/src/com/redstoner/misc/Utils.java b/src/com/redstoner/misc/Utils.java
index d950d67..8186bcb 100644
--- a/src/com/redstoner/misc/Utils.java
+++ b/src/com/redstoner/misc/Utils.java
@@ -12,9 +12,6 @@ import org.bukkit.entity.Player;
import com.redstoner.annotations.Version;
-import net.nemez.chatapi.ChatAPI;
-import net.nemez.chatapi.click.Message;
-
/** The utils class containing utility functions. Those include but are not limited to sending formatted messages, broadcasts and more.
*
* @author Pepich */
@@ -72,45 +69,6 @@ public final class Utils
}
}
- /** This method broadcasts a message to all players and console that are allowed by the filter. Set the filter to NULL to broadcast to everyone.</br>
- * If you want to, you can set a message that will be logged to console. Set to null to not log anything.</br>
- * You can still allow console in the filter to log the original message.
- *
- * @param prefix The prefix for the message. Set to NULL to let it auto generate.
- * @param message the message to be sent around
- * @param filter the BroadcastFilter to be applied.</br>
- * Write a class implementing the interface and pass it to this method, the "sendTo()" method will be called for each recipient.
- * @param logmessage the log message to appear in console. Set to null to not log this (you can still log the original message by returning true in the filter).
- */
- public static int broadcast(String prefix, Message message, BroadcastFilter filter)
- {
- if (prefix == null)
- prefix = "§8[§2" + getCaller() + "§8]: ";
- if (filter == null)
- {
- for (Player p : Bukkit.getOnlinePlayers())
- ChatAPI.createMessage(p).appendText(prefix).appendMessage(message).send();
- Bukkit.getConsoleSender().sendMessage(prefix + message);
- return Bukkit.getOnlinePlayers().size() + 1;
- }
- else
- {
- int count = 0;
- for (Player p : Bukkit.getOnlinePlayers())
- if (filter.sendTo(p))
- {
- ChatAPI.createMessage(p).appendText(prefix).appendMessage(message).send();
- count++;
- }
- if (filter.sendTo(Bukkit.getConsoleSender()))
- {
- Bukkit.getConsoleSender().sendMessage(prefix + message);
- count++;
- }
- return count;
- }
- }
-
/** This method will find the next parent caller and return their class name, omitting package names.
*
* @return the Name of the calling class. */