mirror of
https://github.com/darksaid98/TownyChat.git
synced 2026-12-04 14:38:58 +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/dynmap-api.jar"/>
|
||||||
<classpathentry kind="lib" path="../lib/HeroicDeath.jar"/>
|
<classpathentry kind="lib" path="../lib/HeroicDeath.jar"/>
|
||||||
<classpathentry combineaccessrules="false" kind="src" path="/Towny"/>
|
<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"/>
|
<classpathentry kind="output" path="bin"/>
|
||||||
</classpath>
|
</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.Chat;
|
||||||
import com.palmergames.bukkit.TownyChat.channels.Channel;
|
import com.palmergames.bukkit.TownyChat.channels.Channel;
|
||||||
import com.palmergames.bukkit.towny.TownyMessaging;
|
import com.palmergames.bukkit.towny.TownyMessaging;
|
||||||
import com.palmergames.bukkit.towny.object.TownyUniverse;
|
|
||||||
import com.palmergames.bukkit.util.Colors;
|
import com.palmergames.bukkit.util.Colors;
|
||||||
import com.palmergames.bukkit.util.ChatTools;
|
import com.palmergames.bukkit.util.ChatTools;
|
||||||
|
|
||||||
|
|||||||
@@ -51,6 +51,7 @@ public class MuteCommand implements CommandExecutor {
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@SuppressWarnings("deprecation")
|
||||||
Player muteePlayer = plugin.getServer().getPlayer(mutee);
|
Player muteePlayer = plugin.getServer().getPlayer(mutee);
|
||||||
if (muteePlayer == null) {
|
if (muteePlayer == null) {
|
||||||
TownyMessaging.sendErrorMsg(sender, "[TownyChat] There are no online players with name " + Colors.White + mutee);
|
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;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@SuppressWarnings("deprecation")
|
||||||
Player muteePlayer = plugin.getServer().getPlayer(mutee);
|
Player muteePlayer = plugin.getServer().getPlayer(mutee);
|
||||||
if (muteePlayer == null) {
|
if (muteePlayer == null) {
|
||||||
TownyMessaging.sendErrorMsg(sender, "[TownyChat] There are no online players with name " + Colors.White + mutee);
|
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 java.util.WeakHashMap;
|
||||||
|
|
||||||
|
import org.bukkit.ChatColor;
|
||||||
import org.bukkit.entity.Player;
|
import org.bukkit.entity.Player;
|
||||||
import org.bukkit.event.EventHandler;
|
import org.bukkit.event.EventHandler;
|
||||||
import org.bukkit.event.EventPriority;
|
import org.bukkit.event.EventPriority;
|
||||||
@@ -160,6 +161,9 @@ public class TownyChatPlayerListener implements Listener {
|
|||||||
|
|
||||||
Player player = event.getPlayer();
|
Player player = event.getPlayer();
|
||||||
|
|
||||||
|
if(player.hasPermission("townychat.chat.color"))
|
||||||
|
event.setMessage(ChatColor.translateAlternateColorCodes('&', event.getMessage()));
|
||||||
|
|
||||||
// Check if essentials has this player muted.
|
// Check if essentials has this player muted.
|
||||||
if (!isMuted(player)) {
|
if (!isMuted(player)) {
|
||||||
|
|
||||||
|
|||||||
@@ -16,14 +16,14 @@ public class onPlayerJoinTask implements Runnable {
|
|||||||
|
|
||||||
Chat plugin;
|
Chat plugin;
|
||||||
Towny towny;
|
Towny towny;
|
||||||
String playerName;
|
Player player;
|
||||||
String mode;
|
String mode;
|
||||||
|
|
||||||
public onPlayerJoinTask(Chat plugin, Player player, Channel defaultChannel) {
|
public onPlayerJoinTask(Chat plugin, Player player, Channel defaultChannel) {
|
||||||
super();
|
super();
|
||||||
this.plugin = plugin;
|
this.plugin = plugin;
|
||||||
this.towny = plugin.getTowny();
|
this.towny = plugin.getTowny();
|
||||||
this.playerName = player.getName();
|
this.player = player;
|
||||||
this.mode = defaultChannel.getName();
|
this.mode = defaultChannel.getName();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -31,7 +31,6 @@ public class onPlayerJoinTask implements Runnable {
|
|||||||
public void run() {
|
public void run() {
|
||||||
if (this.towny.isEnabled()) {
|
if (this.towny.isEnabled()) {
|
||||||
if (!this.towny.isError()) {
|
if (!this.towny.isError()) {
|
||||||
Player player = plugin.getServer().getPlayer(playerName);
|
|
||||||
if (player != null) {
|
if (player != null) {
|
||||||
towny.setPlayerMode(player, new String[] { mode }, true);
|
towny.setPlayerMode(player, new String[] { mode }, true);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -57,3 +57,6 @@ permissions:
|
|||||||
townychat.mod.unmute:
|
townychat.mod.unmute:
|
||||||
description: Allows mods access to the unmute command to remove a previous mute.
|
description: Allows mods access to the unmute command to remove a previous mute.
|
||||||
default: op
|
default: op
|
||||||
|
townychat.chat.color:
|
||||||
|
description: Allows players to use colors to format chat messages.
|
||||||
|
default: op
|
||||||
Reference in new issue
Block a user