mirror of
https://github.com/darksaid98/TownyChat.git
synced 2026-12-02 22:23:18 +00:00
commit
99a037fa34
8 files changed
+13
-5
No files matched your search
+1
-1
@@ -12,6 +12,6 @@
|
||||
<classpathentry kind="lib" path="../lib/dynmap-api.jar"/>
|
||||
<classpathentry kind="lib" path="../lib/HeroicDeath.jar"/>
|
||||
<classpathentry combineaccessrules="false" kind="src" path="/Towny"/>
|
||||
<classpathentry kind="lib" path="C:/Users/Rogan/git/lib/bukkit.jar"/>
|
||||
<classpathentry kind="lib" path="../lib/bukkit.jar"/>
|
||||
<classpathentry kind="output" path="bin"/>
|
||||
</classpath>
|
||||
@@ -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);
|
||||
|
||||
@@ -2,6 +2,7 @@ package com.palmergames.bukkit.TownyChat.listener;
|
||||
|
||||
import java.util.WeakHashMap;
|
||||
|
||||
import org.bukkit.ChatColor;
|
||||
import org.bukkit.entity.Player;
|
||||
import org.bukkit.event.EventHandler;
|
||||
import org.bukkit.event.EventPriority;
|
||||
@@ -160,6 +161,9 @@ public class TownyChatPlayerListener implements Listener {
|
||||
|
||||
Player player = event.getPlayer();
|
||||
|
||||
if(player.hasPermission("townychat.chat.color"))
|
||||
event.setMessage(ChatColor.translateAlternateColorCodes('&', event.getMessage()));
|
||||
|
||||
// Check if essentials has this player muted.
|
||||
if (!isMuted(player)) {
|
||||
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
@@ -57,3 +57,6 @@ permissions:
|
||||
townychat.mod.unmute:
|
||||
description: Allows mods access to the unmute command to remove a previous mute.
|
||||
default: op
|
||||
townychat.chat.color:
|
||||
description: Allows players to use colors to format chat messages.
|
||||
default: op
|
||||
Reference in new issue
Block a user