mirror of
https://github.com/darksaid98/TownyChat.git
synced 2026-12-04 06:28:57 +00:00
Merge pull request #45 from TownyAdvanced/feature/exclamation_point_option
Make exclamation point shouting optional.
This commit is contained in:
5 files changed
+18
-2
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.102</version>
|
<version>0.103</version>
|
||||||
|
|
||||||
<licenses>
|
<licenses>
|
||||||
<license>
|
<license>
|
||||||
|
|||||||
@@ -439,3 +439,7 @@ v0.101:
|
|||||||
- Fix permission test backing /channel join {channelname}.
|
- Fix permission test backing /channel join {channelname}.
|
||||||
v0.102:
|
v0.102:
|
||||||
- Parse placeholders when we're unable to find a channel to speak into, but modify_chat is true.
|
- Parse placeholders when we're unable to find a channel to speak into, but modify_chat is true.
|
||||||
|
v0.103:
|
||||||
|
- New Config Option: allow_exclamation_point_to_shout
|
||||||
|
- Default: true
|
||||||
|
- If true players that say !somewords will have their message sent to a global type channel with unlimited range (usually your general chat.)
|
||||||
@@ -168,6 +168,11 @@ public enum ChatConfigNodes {
|
|||||||
"true",
|
"true",
|
||||||
"",
|
"",
|
||||||
"# If true players will see You have joined channel {channel} message on joining the server."),
|
"# If true players will see You have joined channel {channel} message on joining the server."),
|
||||||
|
ALLOW_EXCLAMATION_POINT_SHOUTS(
|
||||||
|
"allow_exclamation_point_to_shout",
|
||||||
|
"true",
|
||||||
|
"",
|
||||||
|
"# If true players that say !somewords will have their message sent to a global type channel with unlimited range (usually your general chat.)"),
|
||||||
WORLDS("worlds","","");
|
WORLDS("worlds","","");
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -177,6 +177,13 @@ public class ChatSettings {
|
|||||||
return getBoolean(ChatConfigNodes.DISPLAY_CHANNEL_JOIN_MESSAGE_ON_JOIN);
|
return getBoolean(ChatConfigNodes.DISPLAY_CHANNEL_JOIN_MESSAGE_ON_JOIN);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @return true if preceding exclamation points shouts into global channel with unlimited range.
|
||||||
|
*/
|
||||||
|
public static boolean isExclamationPoint() {
|
||||||
|
return getBoolean(ChatConfigNodes.ALLOW_EXCLAMATION_POINT_SHOUTS);
|
||||||
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Get Tags formats.
|
* Get Tags formats.
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -75,7 +75,7 @@ public class TownyChatPlayerListener implements Listener {
|
|||||||
// Check if essentials has this player muted.
|
// Check if essentials has this player muted.
|
||||||
if (!isEssentialsMuted(player)) {
|
if (!isEssentialsMuted(player)) {
|
||||||
|
|
||||||
boolean forceGlobal = event.getMessage().startsWith("!");
|
boolean forceGlobal = ChatSettings.isExclamationPoint() && event.getMessage().startsWith("!");
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* If this was directed chat send it via the relevant channel
|
* If this was directed chat send it via the relevant channel
|
||||||
|
|||||||
Reference in new issue
Block a user