mirror of
https://github.com/mcMMO-Dev/mcMMO.git
synced 2024-11-22 21:26:46 +01:00
Added 'Chat.Channels.Party.Spies.Automatically_Enable_Spying' which allows chat spys to join servers with spying toggled on instead of off
its a QOL feature for people who are always spying on chat
This commit is contained in:
parent
8856d2b071
commit
449407439a
@ -1,6 +1,7 @@
|
|||||||
Version 2.1.151
|
Version 2.1.151
|
||||||
Fixed a bug where players could use the party chat command without the party chat permission
|
Fixed a bug where players could use the party chat command without the party chat permission
|
||||||
Added new config 'chat.yml'
|
Added new config 'chat.yml'
|
||||||
|
Added 'Chat.Channels.Party.Spies.Automatically_Enable_Spying' to chat.yml which when enabled will start users who have the chat spy permission in chat spying mode
|
||||||
All chat settings that used to be in 'config.yml' are now in 'chat.yml'
|
All chat settings that used to be in 'config.yml' are now in 'chat.yml'
|
||||||
|
|
||||||
NOTES:
|
NOTES:
|
||||||
|
@ -219,4 +219,3 @@ public class ChatManager {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -48,4 +48,9 @@ public class ChatConfig extends AutoUpdateConfigLoader {
|
|||||||
String key = "Chat.Channels." + StringUtils.getCapitalized(chatChannel.toString()) + ".Use_Display_Names";
|
String key = "Chat.Channels." + StringUtils.getCapitalized(chatChannel.toString()) + ".Use_Display_Names";
|
||||||
return config.getBoolean(key, true);
|
return config.getBoolean(key, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public boolean isSpyingAutomatic() {
|
||||||
|
return config.getBoolean("Chat.Channels.Party.Spies.Automatically_Enable_Spying", false);
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
@ -3,6 +3,7 @@ package com.gmail.nossr50.datatypes.player;
|
|||||||
import com.gmail.nossr50.chat.author.AdminAuthor;
|
import com.gmail.nossr50.chat.author.AdminAuthor;
|
||||||
import com.gmail.nossr50.chat.author.PartyAuthor;
|
import com.gmail.nossr50.chat.author.PartyAuthor;
|
||||||
import com.gmail.nossr50.config.AdvancedConfig;
|
import com.gmail.nossr50.config.AdvancedConfig;
|
||||||
|
import com.gmail.nossr50.config.ChatConfig;
|
||||||
import com.gmail.nossr50.config.Config;
|
import com.gmail.nossr50.config.Config;
|
||||||
import com.gmail.nossr50.config.WorldBlacklist;
|
import com.gmail.nossr50.config.WorldBlacklist;
|
||||||
import com.gmail.nossr50.config.experience.ExperienceConfig;
|
import com.gmail.nossr50.config.experience.ExperienceConfig;
|
||||||
@ -161,6 +162,10 @@ public class McMMOPlayer implements Identified {
|
|||||||
this.partyAuthor = new PartyAuthor(player);
|
this.partyAuthor = new PartyAuthor(player);
|
||||||
|
|
||||||
this.chatChannel = ChatChannel.NONE;
|
this.chatChannel = ChatChannel.NONE;
|
||||||
|
|
||||||
|
if(ChatConfig.getInstance().isSpyingAutomatic() && Permissions.adminChatSpy(getPlayer())) {
|
||||||
|
chatSpy = true;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public String getPlayerName() {
|
public String getPlayerName() {
|
||||||
|
@ -8,6 +8,9 @@ Chat:
|
|||||||
Enable: true
|
Enable: true
|
||||||
# Whether or not to use the current display name of a player
|
# Whether or not to use the current display name of a player
|
||||||
Use_Display_Names: true
|
Use_Display_Names: true
|
||||||
|
Spies:
|
||||||
|
# Whether or not players with the chat spy permission join the server with chat spying toggled on
|
||||||
|
Automatically_Enable_Spying: false
|
||||||
Admin:
|
Admin:
|
||||||
# Enable or disable party chat
|
# Enable or disable party chat
|
||||||
Enable: true
|
Enable: true
|
||||||
|
Loading…
Reference in New Issue
Block a user