mirror of
https://github.com/darksaid98/TownyChat.git
synced 2026-12-02 14:38:57 +00:00
Fix warnings
This commit is contained in:
1 parent
494bc50c4c
commit
3f8ca2cef2
5 files changed
+5
-4
No files matched your search
@@ -0,0 +1 @@
|
||||
/bin/
|
||||
@@ -8,7 +8,6 @@ import org.bukkit.entity.Player;
|
||||
import com.palmergames.bukkit.TownyChat.Chat;
|
||||
import com.palmergames.bukkit.TownyChat.channels.Channel;
|
||||
import com.palmergames.bukkit.towny.TownyMessaging;
|
||||
import com.palmergames.bukkit.towny.object.TownyUniverse;
|
||||
import com.palmergames.bukkit.util.Colors;
|
||||
import com.palmergames.bukkit.util.ChatTools;
|
||||
|
||||
|
||||
@@ -51,6 +51,7 @@ public class MuteCommand implements CommandExecutor {
|
||||
return true;
|
||||
}
|
||||
|
||||
@SuppressWarnings("deprecation")
|
||||
Player muteePlayer = plugin.getServer().getPlayer(mutee);
|
||||
if (muteePlayer == null) {
|
||||
TownyMessaging.sendErrorMsg(sender, "[TownyChat] There are no online players with name " + Colors.White + mutee);
|
||||
|
||||
@@ -51,6 +51,7 @@ public class UnmuteCommand implements CommandExecutor {
|
||||
return true;
|
||||
}
|
||||
|
||||
@SuppressWarnings("deprecation")
|
||||
Player muteePlayer = plugin.getServer().getPlayer(mutee);
|
||||
if (muteePlayer == null) {
|
||||
TownyMessaging.sendErrorMsg(sender, "[TownyChat] There are no online players with name " + Colors.White + mutee);
|
||||
|
||||
@@ -16,14 +16,14 @@ public class onPlayerJoinTask implements Runnable {
|
||||
|
||||
Chat plugin;
|
||||
Towny towny;
|
||||
String playerName;
|
||||
Player player;
|
||||
String mode;
|
||||
|
||||
public onPlayerJoinTask(Chat plugin, Player player, Channel defaultChannel) {
|
||||
super();
|
||||
this.plugin = plugin;
|
||||
this.towny = plugin.getTowny();
|
||||
this.playerName = player.getName();
|
||||
this.player = player;
|
||||
this.mode = defaultChannel.getName();
|
||||
}
|
||||
|
||||
@@ -31,7 +31,6 @@ public class onPlayerJoinTask implements Runnable {
|
||||
public void run() {
|
||||
if (this.towny.isEnabled()) {
|
||||
if (!this.towny.isError()) {
|
||||
Player player = plugin.getServer().getPlayer(playerName);
|
||||
if (player != null) {
|
||||
towny.setPlayerMode(player, new String[] { mode }, true);
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user