mirror of
https://github.com/darksaid98/TownyChat.git
synced 2026-12-04 06:28:57 +00:00
Merge branch 'master' of https://github.com/LlmDl/TownyChat.git
Conflicts: .gitignore
This commit is contained in:
commit
243cbfd454
8 files changed
+12
-8
No files matched your search
@@ -1,2 +1 @@
|
|||||||
/bin
|
/bin
|
||||||
/
|
|
||||||
@@ -190,5 +190,3 @@ v0.44:
|
|||||||
- add a /ch list command to list what channels a player is currently listening to. Courtesy of Yaiyan.
|
- add a /ch list command to list what channels a player is currently listening to. Courtesy of Yaiyan.
|
||||||
v0.45:
|
v0.45:
|
||||||
- Add chatconfig.yml option for modifying the 'no one can hear you' message.
|
- Add chatconfig.yml option for modifying the 'no one can hear you' message.
|
||||||
v0.46:
|
|
||||||
- Add ability to use colour code (&) in the chat line.
|
|
||||||
@@ -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);
|
||||||
}
|
}
|
||||||
|
|||||||
+4
-1
@@ -1,6 +1,6 @@
|
|||||||
name: TownyChat
|
name: TownyChat
|
||||||
main: com.palmergames.bukkit.TownyChat.Chat
|
main: com.palmergames.bukkit.TownyChat.Chat
|
||||||
version: 0.46
|
version: 0.45
|
||||||
author: ElgarL, Shade, phrstbrn
|
author: ElgarL, Shade, phrstbrn
|
||||||
website: http://code.google.com/a/eclipselabs.org/p/towny/
|
website: http://code.google.com/a/eclipselabs.org/p/towny/
|
||||||
description: >
|
description: >
|
||||||
@@ -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