mirror of
https://github.com/darksaid98/TownyChat.git
synced 2026-12-04 06:28:57 +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>
|
<groupId>com.palmergames.bukkit</groupId>
|
||||||
<artifactId>TownyChat</artifactId>
|
<artifactId>TownyChat</artifactId>
|
||||||
<packaging>jar</packaging>
|
<packaging>jar</packaging>
|
||||||
<version>0.87</version>
|
<version>0.88</version>
|
||||||
|
|
||||||
<licenses>
|
<licenses>
|
||||||
<license>
|
<license>
|
||||||
|
|||||||
@@ -370,4 +370,6 @@ v0.86:
|
|||||||
v0.87:
|
v0.87:
|
||||||
- Fix event firing async.
|
- Fix event firing async.
|
||||||
- Fix ranged global channels' chat being forwarded to dynmap.
|
- 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
|
* @param list
|
||||||
* @return Set containing a list of players for this message.
|
* @return Set containing a list of players for this message.
|
||||||
*/
|
*/
|
||||||
@SuppressWarnings("deprecation")
|
|
||||||
private Set<Player> findRecipients(Player sender, List<Player> list) {
|
private Set<Player> findRecipients(Player sender, List<Player> list) {
|
||||||
|
|
||||||
Set<Player> recipients = new HashSet<>();
|
Set<Player> recipients = new HashSet<>();
|
||||||
boolean bEssentials = plugin.getTowny().isEssentials();
|
boolean bEssentials = plugin.getTowny().isEssentials();
|
||||||
String sendersName = sender.getName();
|
|
||||||
|
|
||||||
// Compile the list of recipients
|
// Compile the list of recipients
|
||||||
for (Player test : list) {
|
for (Player test : list) {
|
||||||
@@ -267,10 +265,11 @@ public class StandardChannel extends Channel {
|
|||||||
if (bEssentials) {
|
if (bEssentials) {
|
||||||
try {
|
try {
|
||||||
User targetUser = plugin.getTowny().getEssentials().getUser(test);
|
User targetUser = plugin.getTowny().getEssentials().getUser(test);
|
||||||
|
User senderUser = plugin.getTowny().getEssentials().getUser(sender);
|
||||||
/*
|
/*
|
||||||
* Don't send this message if the user is ignored
|
* Don't send this message if the user is ignored
|
||||||
*/
|
*/
|
||||||
if (targetUser.isIgnoredPlayer(sendersName))
|
if (targetUser.isIgnoredPlayer(senderUser))
|
||||||
continue;
|
continue;
|
||||||
} catch (TownyException e) {
|
} catch (TownyException e) {
|
||||||
// Failed to fetch user so ignore.
|
// Failed to fetch user so ignore.
|
||||||
|
|||||||
Reference in new issue
Block a user