mirror of
https://github.com/darksaid98/TownyChat.git
synced 2026-12-02 06:28:58 +00:00
- Replace deprecated Essentials call.
This commit is contained in:
1 parent
ceef86242e
commit
cc12304b2e
3 files changed
+6
-5
No files matched your search
@@ -7,7 +7,7 @@
|
||||
<groupId>com.palmergames.bukkit</groupId>
|
||||
<artifactId>TownyChat</artifactId>
|
||||
<packaging>jar</packaging>
|
||||
<version>0.87</version>
|
||||
<version>0.88</version>
|
||||
|
||||
<licenses>
|
||||
<license>
|
||||
|
||||
@@ -370,4 +370,6 @@ v0.86:
|
||||
v0.87:
|
||||
- Fix event firing async.
|
||||
- Fix ranged global channels' chat being forwarded to dynmap.
|
||||
- Fix UnsupportedOperationException which was possible when leaving a channel.
|
||||
- Fix UnsupportedOperationException which was possible when leaving a channel.
|
||||
v0.88:
|
||||
- Replace deprecated Essentials call.
|
||||
@@ -244,12 +244,10 @@ public class StandardChannel extends Channel {
|
||||
* @param list
|
||||
* @return Set containing a list of players for this message.
|
||||
*/
|
||||
@SuppressWarnings("deprecation")
|
||||
private Set<Player> findRecipients(Player sender, List<Player> list) {
|
||||
|
||||
Set<Player> recipients = new HashSet<>();
|
||||
boolean bEssentials = plugin.getTowny().isEssentials();
|
||||
String sendersName = sender.getName();
|
||||
|
||||
// Compile the list of recipients
|
||||
for (Player test : list) {
|
||||
@@ -267,10 +265,11 @@ public class StandardChannel extends Channel {
|
||||
if (bEssentials) {
|
||||
try {
|
||||
User targetUser = plugin.getTowny().getEssentials().getUser(test);
|
||||
User senderUser = plugin.getTowny().getEssentials().getUser(sender);
|
||||
/*
|
||||
* Don't send this message if the user is ignored
|
||||
*/
|
||||
if (targetUser.isIgnoredPlayer(sendersName))
|
||||
if (targetUser.isIgnoredPlayer(senderUser))
|
||||
continue;
|
||||
} catch (TownyException e) {
|
||||
// Failed to fetch user so ignore.
|
||||
|
||||
Reference in new issue
Block a user