mirror of
https://github.com/darksaid98/Carbon.git
synced 2026-12-03 14:38:51 +00:00
Experimental changes - do not use in prod without testing first
Experimental changes - do not use in prod without testing first
This commit is contained in:
84 files changed
+452
-698
No files matched your search
@@ -1,71 +0,0 @@
|
|||||||
plugins {
|
|
||||||
id 'com.github.johnrengelman.shadow' version '6.0.0'
|
|
||||||
id 'net.minecrell.plugin-yml.bukkit' version '0.3.0'
|
|
||||||
}
|
|
||||||
|
|
||||||
repositories {
|
|
||||||
mavenLocal()
|
|
||||||
mavenCentral()
|
|
||||||
}
|
|
||||||
|
|
||||||
dependencies {
|
|
||||||
compile 'co.aikar:acf-bukkit:0.5.0-SNAPSHOT'
|
|
||||||
compile 'net.kyori:adventure-api:4.0.0-SNAPSHOT'
|
|
||||||
compile 'net.kyori:adventure-nbt:4.0.0-SNAPSHOT'
|
|
||||||
compile 'net.kyori:adventure-platform-bukkit:4.0.0-SNAPSHOT'
|
|
||||||
compile 'net.kyori:adventure-text-minimessage:3.0.0-SNAPSHOT'
|
|
||||||
compile 'de.themoep:minedown-adventure:1.6.1-SNAPSHOT'
|
|
||||||
compile 'co.aikar:idb-bukkit:1.0.0-SNAPSHOT'
|
|
||||||
compile 'com.zaxxer:HikariCP:2.4.1'
|
|
||||||
compile 'io.github.leonardosnt:bungeechannelapi:1.0.0-SNAPSHOT'
|
|
||||||
compile 'io.lettuce:lettuce-core:6.0.0.M1'
|
|
||||||
|
|
||||||
compileOnly 'me.clip:placeholderapi:2.10.9'
|
|
||||||
compileOnly 'com.github.TownyAdvanced:Towny:0.96.1.11'
|
|
||||||
compileOnly 'com.github.MilkBowl:VaultAPI:1.7'
|
|
||||||
compileOnly 'com.vexsoftware:nuvotifier-universal:2.6.0'
|
|
||||||
compileOnly 'net.luckperms:api:5.1'
|
|
||||||
compileOnly 'org.jetbrains:annotations:16.0.1'
|
|
||||||
}
|
|
||||||
|
|
||||||
description = 'CarbonChat'
|
|
||||||
|
|
||||||
bukkit {
|
|
||||||
name = description
|
|
||||||
version = project.version
|
|
||||||
main = 'net.draycia.carbon.CarbonChat'
|
|
||||||
apiVersion = '1.13'
|
|
||||||
author = 'Draycia'
|
|
||||||
depend = ['PlaceholderAPI', 'Vault']
|
|
||||||
softDepend = ['LuckPerms']
|
|
||||||
loadBefore = ["Essentials"]
|
|
||||||
permissions {
|
|
||||||
'carbonchat.channels.Global.see' {
|
|
||||||
setDefault("TRUE")
|
|
||||||
}
|
|
||||||
|
|
||||||
'carbonchat.channels.Global.use' {
|
|
||||||
setDefault("TRUE")
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
tasks.build.dependsOn tasks.shadowJar
|
|
||||||
|
|
||||||
shadowJar {
|
|
||||||
minimize()
|
|
||||||
archiveFileName.set(project.name + "-" + project.property('projectVersion') + ".jar")
|
|
||||||
}
|
|
||||||
|
|
||||||
jar {
|
|
||||||
archiveFileName.set(project.name + "-" + project.property('projectVersion') + ".jar")
|
|
||||||
}
|
|
||||||
|
|
||||||
import com.github.jengelman.gradle.plugins.shadow.tasks.ConfigureShadowRelocation
|
|
||||||
|
|
||||||
task relocateShadowJar(type: ConfigureShadowRelocation) {
|
|
||||||
target = tasks.shadowJar
|
|
||||||
prefix = "net.draycia.carbon.libs" // Default value is "shadow"
|
|
||||||
}
|
|
||||||
|
|
||||||
tasks.shadowJar.dependsOn tasks.relocateShadowJar
|
|
||||||
@@ -1,35 +0,0 @@
|
|||||||
plugins {
|
|
||||||
id 'com.github.johnrengelman.shadow' version '6.0.0'
|
|
||||||
id 'net.minecrell.plugin-yml.bukkit' version '0.3.0'
|
|
||||||
}
|
|
||||||
|
|
||||||
repositories {
|
|
||||||
maven { url 'https://jitpack.io' }
|
|
||||||
}
|
|
||||||
|
|
||||||
dependencies {
|
|
||||||
compileOnly 'com.github.mcMMO-Dev:mcMMO:-SNAPSHOT'
|
|
||||||
|
|
||||||
compileOnly project(path: ':CarbonChat', configuration: 'shadow')
|
|
||||||
}
|
|
||||||
|
|
||||||
description = 'CarbonChatMCMMO'
|
|
||||||
|
|
||||||
bukkit {
|
|
||||||
name = description
|
|
||||||
version = project.version
|
|
||||||
main = 'net.draycia.carbonmcmmo.CarbonChatMCMMO'
|
|
||||||
apiVersion = '1.13'
|
|
||||||
author = 'Draycia'
|
|
||||||
depend = ['CarbonChat', 'mcMMO']
|
|
||||||
}
|
|
||||||
|
|
||||||
tasks.build.dependsOn tasks.shadowJar
|
|
||||||
|
|
||||||
shadowJar {
|
|
||||||
archiveFileName.set(project.name + "-" + project.property('projectVersion') + ".jar")
|
|
||||||
}
|
|
||||||
|
|
||||||
jar {
|
|
||||||
archiveFileName.set(project.name + "-" + project.property('projectVersion') + ".jar")
|
|
||||||
}
|
|
||||||
@@ -1 +0,0 @@
|
|||||||
cancellation-message: "<red>You do not have a party!"
|
|
||||||
@@ -1,35 +0,0 @@
|
|||||||
plugins {
|
|
||||||
id 'com.github.johnrengelman.shadow' version '6.0.0'
|
|
||||||
id 'net.minecrell.plugin-yml.bukkit' version '0.3.0'
|
|
||||||
}
|
|
||||||
|
|
||||||
repositories {
|
|
||||||
mavenLocal()
|
|
||||||
mavenCentral()
|
|
||||||
}
|
|
||||||
|
|
||||||
dependencies {
|
|
||||||
compileOnly project(path: ':CarbonChat', configuration: 'shadow')
|
|
||||||
}
|
|
||||||
|
|
||||||
description = 'CarbonChatModeration'
|
|
||||||
|
|
||||||
bukkit {
|
|
||||||
name = description
|
|
||||||
version = project.version
|
|
||||||
main = 'net.draycia.carbonmoderation.CarbonChatModeration'
|
|
||||||
apiVersion = '1.13'
|
|
||||||
author = 'Draycia'
|
|
||||||
depend = ['CarbonChat']
|
|
||||||
}
|
|
||||||
|
|
||||||
tasks.build.dependsOn tasks.shadowJar
|
|
||||||
|
|
||||||
shadowJar {
|
|
||||||
relocate "co.aikar.commands", "net.draycia.carbon.libs.co.aikar.commands"
|
|
||||||
archiveFileName.set(project.name + "-" + project.property('projectVersion') + ".jar")
|
|
||||||
}
|
|
||||||
|
|
||||||
jar {
|
|
||||||
archiveFileName.set(project.name + "-" + project.property('projectVersion') + ".jar")
|
|
||||||
}
|
|
||||||
-54
@@ -1,54 +0,0 @@
|
|||||||
package net.draycia.carbonmoderation;
|
|
||||||
|
|
||||||
import net.draycia.carbon.libs.co.aikar.commands.BukkitCommandManager;
|
|
||||||
import net.draycia.carbon.CarbonChat;
|
|
||||||
import net.draycia.carbonmoderation.commands.ClearChatCommand;
|
|
||||||
import net.draycia.carbonmoderation.commands.ModReloadCommand;
|
|
||||||
import net.draycia.carbonmoderation.commands.MuteCommand;
|
|
||||||
import net.draycia.carbonmoderation.commands.ShadowMuteCommand;
|
|
||||||
import net.draycia.carbonmoderation.listeners.CapsHandler;
|
|
||||||
import net.draycia.carbonmoderation.listeners.FilterHandler;
|
|
||||||
import net.draycia.carbonmoderation.listeners.MuteHandler;
|
|
||||||
import net.draycia.carbonmoderation.listeners.ShadowMuteHandler;
|
|
||||||
import org.bukkit.Bukkit;
|
|
||||||
import org.bukkit.plugin.java.JavaPlugin;
|
|
||||||
|
|
||||||
public final class CarbonChatModeration extends JavaPlugin {
|
|
||||||
|
|
||||||
private CarbonChat carbonChat;
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void onEnable() {
|
|
||||||
saveDefaultConfig();
|
|
||||||
|
|
||||||
carbonChat = (CarbonChat)Bukkit.getPluginManager().getPlugin("CarbonChat");
|
|
||||||
|
|
||||||
registerCommands();
|
|
||||||
registerListeners();
|
|
||||||
}
|
|
||||||
|
|
||||||
private void registerCommands() {
|
|
||||||
BukkitCommandManager commandManager = carbonChat.getCommandManager().getCommandManager();
|
|
||||||
|
|
||||||
commandManager.registerCommand(new ClearChatCommand(this));
|
|
||||||
commandManager.registerCommand(new MuteCommand(this));
|
|
||||||
commandManager.registerCommand(new ShadowMuteCommand(this));
|
|
||||||
commandManager.registerCommand(new ModReloadCommand(this));
|
|
||||||
}
|
|
||||||
|
|
||||||
private void registerListeners() {
|
|
||||||
Bukkit.getPluginManager().registerEvents(new CapsHandler(this), this);
|
|
||||||
Bukkit.getPluginManager().registerEvents(new FilterHandler(this), this);
|
|
||||||
Bukkit.getPluginManager().registerEvents(new MuteHandler(), this);
|
|
||||||
Bukkit.getPluginManager().registerEvents(new ShadowMuteHandler(this), this);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void onDisable() {
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
public CarbonChat getCarbonChat() {
|
|
||||||
return carbonChat;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
-52
@@ -1,52 +0,0 @@
|
|||||||
package net.draycia.carbonmoderation.commands;
|
|
||||||
|
|
||||||
import net.draycia.carbon.libs.co.aikar.commands.BaseCommand;
|
|
||||||
import net.draycia.carbon.libs.co.aikar.commands.annotation.CommandAlias;
|
|
||||||
import net.draycia.carbon.libs.co.aikar.commands.annotation.CommandPermission;
|
|
||||||
import net.draycia.carbon.libs.co.aikar.commands.annotation.Default;
|
|
||||||
import net.draycia.carbon.storage.ChatUser;
|
|
||||||
import net.draycia.carbonmoderation.CarbonChatModeration;
|
|
||||||
import net.draycia.carbon.libs.net.kyori.adventure.text.Component;
|
|
||||||
import org.bukkit.Bukkit;
|
|
||||||
import org.bukkit.command.CommandSender;
|
|
||||||
import org.bukkit.entity.Player;
|
|
||||||
|
|
||||||
@CommandAlias("clearchat|cc")
|
|
||||||
@CommandPermission("carbonchat.clearchat.clear")
|
|
||||||
public class ClearChatCommand extends BaseCommand {
|
|
||||||
|
|
||||||
private final CarbonChatModeration moderation;
|
|
||||||
|
|
||||||
public ClearChatCommand(CarbonChatModeration moderation) {
|
|
||||||
this.moderation = moderation;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Default
|
|
||||||
public void baseCommand(CommandSender issuer) {
|
|
||||||
String format = moderation.getConfig().getString("clear-chat.message", "");
|
|
||||||
Component component = moderation.getCarbonChat().getAdventureManager().processMessage(format, "br", "\n");
|
|
||||||
|
|
||||||
for (Player player : Bukkit.getOnlinePlayers()) {
|
|
||||||
if (player.hasPermission("carbonchat.clearchat.exempt")) {
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
|
|
||||||
ChatUser audience = moderation.getCarbonChat().getUserService().wrap(player);
|
|
||||||
|
|
||||||
for (int i = 0; i < moderation.getConfig().getInt("clear-chat.message-count", 100); i++) {
|
|
||||||
audience.sendMessage(component);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (player.hasPermission("carbonchat.clearchat.notify")) {
|
|
||||||
String message = moderation.getConfig().getString("language.clear-notify");
|
|
||||||
audience.sendMessage(moderation.getCarbonChat().getAdventureManager().processMessage(message, "player", issuer.getName()));
|
|
||||||
}
|
|
||||||
|
|
||||||
if (player.hasPermission("carbonchat.clearchat.exempt")) {
|
|
||||||
String message = moderation.getConfig().getString("language.clear-exempt");
|
|
||||||
audience.sendMessage(moderation.getCarbonChat().getAdventureManager().processMessage(message, "player", issuer.getName()));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
-33
@@ -1,33 +0,0 @@
|
|||||||
package net.draycia.carbonmoderation.commands;
|
|
||||||
|
|
||||||
import net.draycia.carbon.libs.co.aikar.commands.BaseCommand;
|
|
||||||
import net.draycia.carbon.libs.co.aikar.commands.annotation.CommandAlias;
|
|
||||||
import net.draycia.carbon.libs.co.aikar.commands.annotation.CommandPermission;
|
|
||||||
import net.draycia.carbon.libs.co.aikar.commands.annotation.Default;
|
|
||||||
import net.draycia.carbon.libs.co.aikar.commands.annotation.Dependency;
|
|
||||||
import net.draycia.carbon.libs.net.kyori.adventure.text.Component;
|
|
||||||
import net.draycia.carbonmoderation.CarbonChatModeration;
|
|
||||||
import org.bukkit.command.CommandSender;
|
|
||||||
|
|
||||||
@CommandAlias("modreload|mreload")
|
|
||||||
@CommandPermission("carbonchat.reload")
|
|
||||||
public class ModReloadCommand extends BaseCommand {
|
|
||||||
|
|
||||||
private final CarbonChatModeration moderation;
|
|
||||||
|
|
||||||
public ModReloadCommand(CarbonChatModeration moderation) {
|
|
||||||
this.moderation = moderation;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Default
|
|
||||||
public void baseCommand(CommandSender sender) {
|
|
||||||
moderation.reloadConfig();
|
|
||||||
|
|
||||||
Component message = moderation.getCarbonChat().getAdventureManager()
|
|
||||||
.processMessage(moderation.getConfig().getString("language.reloaded"),
|
|
||||||
"br", "\n");
|
|
||||||
|
|
||||||
moderation.getCarbonChat().getAdventureManager().getAudiences().audience(sender).sendMessage(message);
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
-61
@@ -1,61 +0,0 @@
|
|||||||
package net.draycia.carbonmoderation.commands;
|
|
||||||
|
|
||||||
import net.draycia.carbon.libs.co.aikar.commands.annotation.Syntax;
|
|
||||||
import net.draycia.carbon.libs.co.aikar.commands.BaseCommand;
|
|
||||||
import net.draycia.carbon.libs.co.aikar.commands.annotation.CommandAlias;
|
|
||||||
import net.draycia.carbon.libs.co.aikar.commands.annotation.CommandCompletion;
|
|
||||||
import net.draycia.carbon.libs.co.aikar.commands.annotation.CommandPermission;
|
|
||||||
import net.draycia.carbon.libs.co.aikar.commands.annotation.Default;
|
|
||||||
import net.draycia.carbon.storage.ChatUser;
|
|
||||||
import net.draycia.carbonmoderation.CarbonChatModeration;
|
|
||||||
import net.draycia.carbon.libs.net.kyori.adventure.audience.Audience;
|
|
||||||
import net.draycia.carbon.libs.net.kyori.adventure.text.Component;
|
|
||||||
import net.milkbowl.vault.permission.Permission;
|
|
||||||
import org.bukkit.Bukkit;
|
|
||||||
import org.bukkit.command.CommandSender;
|
|
||||||
|
|
||||||
@CommandAlias("mute")
|
|
||||||
@CommandPermission("carbonchat.mute")
|
|
||||||
public class MuteCommand extends BaseCommand {
|
|
||||||
|
|
||||||
private final CarbonChatModeration moderation;
|
|
||||||
|
|
||||||
public MuteCommand(CarbonChatModeration moderation) {
|
|
||||||
this.moderation = moderation;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Default
|
|
||||||
@CommandCompletion("@players")
|
|
||||||
@Syntax("<player>")
|
|
||||||
public void baseCommand(CommandSender sender, ChatUser targetUser) {
|
|
||||||
Audience audience = moderation.getCarbonChat().getAdventureManager().getAudiences().audience(sender);
|
|
||||||
|
|
||||||
if (targetUser.isMuted()) {
|
|
||||||
targetUser.setMuted(false);
|
|
||||||
String format = moderation.getConfig().getString("language.no-longer-muted");
|
|
||||||
|
|
||||||
Component message = moderation.getCarbonChat().getAdventureManager().processMessage(format, "br", "\n",
|
|
||||||
"player", targetUser.asOfflinePlayer().getName());
|
|
||||||
|
|
||||||
audience.sendMessage(message);
|
|
||||||
} else {
|
|
||||||
Bukkit.getScheduler().runTaskAsynchronously(moderation, () -> {
|
|
||||||
Permission permission = moderation.getCarbonChat().getPermission();
|
|
||||||
String format;
|
|
||||||
|
|
||||||
if (permission.playerHas(null, targetUser.asOfflinePlayer(), "carbonchat.mute.exempt")) {
|
|
||||||
format = moderation.getConfig().getString("language.mute-exempt");
|
|
||||||
} else {
|
|
||||||
targetUser.setMuted(true);
|
|
||||||
format = moderation.getConfig().getString("language.is-now-muted");
|
|
||||||
}
|
|
||||||
|
|
||||||
Component message = moderation.getCarbonChat().getAdventureManager().processMessage(format, "br", "\n",
|
|
||||||
"player", targetUser.asOfflinePlayer().getName());
|
|
||||||
|
|
||||||
audience.sendMessage(message);
|
|
||||||
});
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
-60
@@ -1,60 +0,0 @@
|
|||||||
package net.draycia.carbonmoderation.commands;
|
|
||||||
|
|
||||||
import net.draycia.carbon.libs.co.aikar.commands.annotation.Syntax;
|
|
||||||
import net.draycia.carbon.libs.co.aikar.commands.BaseCommand;
|
|
||||||
import net.draycia.carbon.libs.co.aikar.commands.annotation.CommandAlias;
|
|
||||||
import net.draycia.carbon.libs.co.aikar.commands.annotation.CommandCompletion;
|
|
||||||
import net.draycia.carbon.libs.co.aikar.commands.annotation.CommandPermission;
|
|
||||||
import net.draycia.carbon.libs.co.aikar.commands.annotation.Default;
|
|
||||||
import net.draycia.carbon.storage.ChatUser;
|
|
||||||
import net.draycia.carbonmoderation.CarbonChatModeration;
|
|
||||||
import net.draycia.carbon.libs.net.kyori.adventure.audience.Audience;
|
|
||||||
import net.draycia.carbon.libs.net.kyori.adventure.text.Component;
|
|
||||||
import net.milkbowl.vault.permission.Permission;
|
|
||||||
import org.bukkit.Bukkit;
|
|
||||||
import org.bukkit.command.CommandSender;
|
|
||||||
|
|
||||||
@CommandAlias("shadowmute|sm|smute")
|
|
||||||
@CommandPermission("carbonchat.shadowmute")
|
|
||||||
public class ShadowMuteCommand extends BaseCommand {
|
|
||||||
|
|
||||||
private final CarbonChatModeration moderation;
|
|
||||||
|
|
||||||
public ShadowMuteCommand(CarbonChatModeration moderation) {
|
|
||||||
this.moderation = moderation;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Default
|
|
||||||
@CommandCompletion("@players")
|
|
||||||
@Syntax("<player>")
|
|
||||||
public void baseCommand(CommandSender sender, ChatUser targetUser) {
|
|
||||||
Audience audience = moderation.getCarbonChat().getAdventureManager().getAudiences().audience(sender);
|
|
||||||
|
|
||||||
if (targetUser.isShadowMuted()) {
|
|
||||||
targetUser.setShadowMuted(false);
|
|
||||||
String format = moderation.getConfig().getString("language.no-longer-shadow-muted");
|
|
||||||
|
|
||||||
Component message = moderation.getCarbonChat().getAdventureManager().processMessage(format, "br", "\n",
|
|
||||||
"player", targetUser.asOfflinePlayer().getName());
|
|
||||||
|
|
||||||
audience.sendMessage(message);
|
|
||||||
} else {
|
|
||||||
Bukkit.getScheduler().runTaskAsynchronously(moderation, () -> {
|
|
||||||
Permission permission = moderation.getCarbonChat().getPermission();
|
|
||||||
String format;
|
|
||||||
|
|
||||||
if (permission.playerHas(null, targetUser.asOfflinePlayer(), "carbonchat.shadowmute.exempt")) {
|
|
||||||
format = moderation.getConfig().getString("language.shadow-mute-exempt");
|
|
||||||
} else {
|
|
||||||
targetUser.setShadowMuted(true);
|
|
||||||
format = moderation.getConfig().getString("language.is-now-shadow-muted");
|
|
||||||
}
|
|
||||||
|
|
||||||
Component message = moderation.getCarbonChat().getAdventureManager().processMessage(format, "br", "\n",
|
|
||||||
"player", targetUser.asOfflinePlayer().getName());
|
|
||||||
|
|
||||||
audience.sendMessage(message);
|
|
||||||
});
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,37 +0,0 @@
|
|||||||
plugins {
|
|
||||||
id 'com.github.johnrengelman.shadow' version '6.0.0'
|
|
||||||
id 'net.minecrell.plugin-yml.bukkit' version '0.3.0'
|
|
||||||
}
|
|
||||||
|
|
||||||
repositories {
|
|
||||||
mavenLocal()
|
|
||||||
mavenCentral()
|
|
||||||
maven { url = "https://jitpack.io" }
|
|
||||||
}
|
|
||||||
|
|
||||||
dependencies {
|
|
||||||
compileOnly 'com.github.TownyAdvanced:Towny:0.96.2.0'
|
|
||||||
|
|
||||||
compileOnly project(':CarbonChat')
|
|
||||||
}
|
|
||||||
|
|
||||||
description = 'CarbonChatTowny'
|
|
||||||
|
|
||||||
bukkit {
|
|
||||||
name = description
|
|
||||||
version = project.version
|
|
||||||
main = 'net.draycia.carbontowny.CarbonChatTowny'
|
|
||||||
apiVersion = '1.13'
|
|
||||||
author = 'Draycia'
|
|
||||||
depend = ['CarbonChat', 'Towny']
|
|
||||||
}
|
|
||||||
|
|
||||||
tasks.build.dependsOn tasks.shadowJar
|
|
||||||
|
|
||||||
shadowJar {
|
|
||||||
archiveFileName.set(project.name + "-" + project.property('projectVersion') + ".jar")
|
|
||||||
}
|
|
||||||
|
|
||||||
jar {
|
|
||||||
archiveFileName.set(project.name + "-" + project.property('projectVersion') + ".jar")
|
|
||||||
}
|
|
||||||
@@ -1 +0,0 @@
|
|||||||
cancellation-message: "<red>You do not belong to a town!"
|
|
||||||
@@ -1,37 +0,0 @@
|
|||||||
plugins {
|
|
||||||
id 'com.github.johnrengelman.shadow' version '6.0.0'
|
|
||||||
id 'net.minecrell.plugin-yml.bukkit' version '0.3.0'
|
|
||||||
}
|
|
||||||
|
|
||||||
repositories {
|
|
||||||
mavenLocal()
|
|
||||||
mavenCentral()
|
|
||||||
maven { url = "https://maven.enginehub.org/repo/" }
|
|
||||||
}
|
|
||||||
|
|
||||||
dependencies {
|
|
||||||
compileOnly 'com.sk89q.worldguard:worldguard-bukkit:7.0.4-SNAPSHOT'
|
|
||||||
|
|
||||||
compileOnly project(':CarbonChat')
|
|
||||||
}
|
|
||||||
|
|
||||||
description = 'CarbonChatWorldGuard'
|
|
||||||
|
|
||||||
bukkit {
|
|
||||||
name = description
|
|
||||||
version = project.version
|
|
||||||
main = 'net.draycia.carbonworldguard.CarbonChatWorldGuard'
|
|
||||||
apiVersion = '1.13'
|
|
||||||
author = 'Draycia'
|
|
||||||
depend = ['CarbonChat', 'WorldGuard']
|
|
||||||
}
|
|
||||||
|
|
||||||
tasks.build.dependsOn tasks.shadowJar
|
|
||||||
|
|
||||||
shadowJar {
|
|
||||||
archiveFileName.set(project.name + "-" + project.property('projectVersion') + ".jar")
|
|
||||||
}
|
|
||||||
|
|
||||||
jar {
|
|
||||||
archiveFileName.set(project.name + "-" + project.property('projectVersion') + ".jar")
|
|
||||||
}
|
|
||||||
Whitespace-only changes.
+91
-53
@@ -1,73 +1,111 @@
|
|||||||
plugins {
|
plugins {
|
||||||
|
id 'com.github.johnrengelman.shadow' version '6.0.0'
|
||||||
|
id 'net.minecrell.plugin-yml.bukkit' version '0.3.0'
|
||||||
id 'com.palantir.git-version' version '0.12.3'
|
id 'com.palantir.git-version' version '0.12.3'
|
||||||
}
|
}
|
||||||
|
|
||||||
|
apply plugin: 'java-library'
|
||||||
|
apply plugin: 'java'
|
||||||
|
apply plugin: 'maven-publish'
|
||||||
|
apply plugin: 'maven'
|
||||||
|
|
||||||
ext.projectVersion = '1.0'
|
ext.projectVersion = '1.0'
|
||||||
def gitHash = versionDetails().gitHash
|
def gitHash = versionDetails().gitHash
|
||||||
|
|
||||||
allprojects {
|
group = 'net.draycia'
|
||||||
group = 'net.draycia'
|
version = project.property('projectVersion') + '-' + gitHash
|
||||||
version = project.property('projectVersion') + '-' + gitHash
|
|
||||||
|
repositories {
|
||||||
|
mavenLocal()
|
||||||
|
mavenCentral()
|
||||||
|
|
||||||
|
maven {url = "https://maven.enginehub.org/repo/"}
|
||||||
|
maven {url = 'https://repo.maven.apache.org/maven2'}
|
||||||
|
maven {url = 'https://hub.spigotmc.org/nexus/content/repositories/snapshots/'}
|
||||||
|
maven {url = 'https://oss.sonatype.org/content/groups/public/'}
|
||||||
|
maven {url = 'https://repo.extendedclip.com/content/repositories/placeholderapi/'}
|
||||||
|
maven {url = 'https://jitpack.io'}
|
||||||
|
maven {url = 'https://dl.bintray.com/ichbinjoe/public/'}
|
||||||
|
maven {url = 'https://repo.codemc.org/repository/maven-public/'}
|
||||||
|
maven {url = 'https://repo.minebench.de/'}
|
||||||
|
maven {url = "https://repo.aikar.co/content/groups/aikar/"}
|
||||||
}
|
}
|
||||||
|
|
||||||
apply plugin: 'base'
|
dependencies {
|
||||||
|
compile 'co.aikar:acf-bukkit:0.5.0-SNAPSHOT'
|
||||||
|
compile 'net.kyori:adventure-api:4.0.0-SNAPSHOT'
|
||||||
|
compile 'net.kyori:adventure-nbt:4.0.0-SNAPSHOT'
|
||||||
|
compile 'net.kyori:adventure-platform-bukkit:4.0.0-SNAPSHOT'
|
||||||
|
compile 'net.kyori:adventure-text-minimessage:3.0.0-SNAPSHOT'
|
||||||
|
compile 'de.themoep:minedown-adventure:1.6.1-SNAPSHOT'
|
||||||
|
compile 'co.aikar:idb-bukkit:1.0.0-SNAPSHOT'
|
||||||
|
compile 'com.zaxxer:HikariCP:2.4.1'
|
||||||
|
compile 'io.github.leonardosnt:bungeechannelapi:1.0.0-SNAPSHOT'
|
||||||
|
compile 'io.lettuce:lettuce-core:6.0.0.M1'
|
||||||
|
|
||||||
subprojects {
|
compileOnly 'com.gmail.nossr50.mcMMO:mcMMO:2.1.143'
|
||||||
apply plugin: 'java-library'
|
compileOnly 'com.github.TownyAdvanced:Towny:0.96.2.0'
|
||||||
apply plugin: 'java'
|
compileOnly 'com.sk89q.worldguard:worldguard-bukkit:7.0.4-SNAPSHOT'
|
||||||
apply plugin: 'maven-publish'
|
compileOnly 'me.clip:placeholderapi:2.10.9'
|
||||||
apply plugin: 'maven'
|
compileOnly 'com.github.TownyAdvanced:Towny:0.96.1.11'
|
||||||
|
compileOnly 'com.github.MilkBowl:VaultAPI:1.7'
|
||||||
|
compileOnly 'com.vexsoftware:nuvotifier-universal:2.6.0'
|
||||||
|
compileOnly 'net.luckperms:api:5.1'
|
||||||
|
compileOnly 'org.jetbrains:annotations:16.0.1'
|
||||||
|
}
|
||||||
|
|
||||||
repositories {
|
description = 'CarbonChat'
|
||||||
mavenLocal()
|
|
||||||
mavenCentral()
|
|
||||||
|
|
||||||
maven {url = 'https://repo.maven.apache.org/maven2'}
|
bukkit {
|
||||||
maven {url = 'https://hub.spigotmc.org/nexus/content/repositories/snapshots/'}
|
name = description
|
||||||
maven {url = 'https://oss.sonatype.org/content/groups/public/'}
|
version = project.version
|
||||||
maven {url = 'https://repo.extendedclip.com/content/repositories/placeholderapi/'}
|
main = 'net.draycia.carbon.CarbonChat'
|
||||||
maven {url = 'https://jitpack.io'}
|
apiVersion = '1.13'
|
||||||
maven {url = 'https://dl.bintray.com/ichbinjoe/public/'}
|
author = 'Draycia'
|
||||||
maven {url = 'https://repo.codemc.org/repository/maven-public/'}
|
depend = ['PlaceholderAPI', 'Vault']
|
||||||
maven {url = 'https://repo.minebench.de/'}
|
softDepend = ['LuckPerms', 'Towny', 'mcMMO', 'WorldGuard']
|
||||||
maven {url = "https://repo.aikar.co/content/groups/aikar/"}
|
loadBefore = ["Essentials"]
|
||||||
}
|
permissions {
|
||||||
|
'carbonchat.channels.Global.see' {
|
||||||
|
setDefault("TRUE")
|
||||||
|
}
|
||||||
|
|
||||||
dependencies {
|
'carbonchat.channels.Global.use' {
|
||||||
compileOnly 'org.spigotmc:spigot-api:1.16.1-R0.1-SNAPSHOT'
|
setDefault("TRUE")
|
||||||
compileOnly 'com.github.MilkBowl:VaultAPI:1.7'
|
|
||||||
|
|
||||||
compileOnly 'co.aikar:acf-bukkit:0.5.0-SNAPSHOT'
|
|
||||||
compileOnly 'net.kyori:adventure-api:4.0.0-SNAPSHOT'
|
|
||||||
compileOnly 'net.kyori:adventure-nbt:4.0.0-SNAPSHOT'
|
|
||||||
compileOnly 'net.kyori:adventure-platform-bukkit:4.0.0-SNAPSHOT'
|
|
||||||
compileOnly 'net.kyori:adventure-text-minimessage:3.0.0-SNAPSHOT'
|
|
||||||
compileOnly 'de.themoep:minedown-adventure:1.6.1-SNAPSHOT'
|
|
||||||
compileOnly 'co.aikar:idb-bukkit:1.0.0-SNAPSHOT'
|
|
||||||
compileOnly 'com.zaxxer:HikariCP:2.4.1'
|
|
||||||
compileOnly 'io.github.leonardosnt:bungeechannelapi:1.0.0-SNAPSHOT'
|
|
||||||
compileOnly 'io.lettuce:lettuce-core:6.0.0.M1'
|
|
||||||
}
|
|
||||||
|
|
||||||
sourceCompatibility = '1.8'
|
|
||||||
|
|
||||||
publishing {
|
|
||||||
publications {
|
|
||||||
maven(MavenPublication) {
|
|
||||||
from(components.java)
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
tasks.withType(JavaCompile) {
|
|
||||||
options.encoding = 'UTF-8'
|
|
||||||
}
|
|
||||||
|
|
||||||
tasks.withType(Jar) {
|
|
||||||
getDestinationDirectory().set(file("$rootDir/build/bundled"))
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
sourceCompatibility = '1.8'
|
||||||
|
|
||||||
|
tasks.withType(JavaCompile) {
|
||||||
|
options.encoding = 'UTF-8'
|
||||||
|
}
|
||||||
|
|
||||||
|
tasks.withType(Jar) {
|
||||||
|
getDestinationDirectory().set(file("$rootDir/build"))
|
||||||
|
}
|
||||||
|
|
||||||
|
tasks.build.dependsOn tasks.shadowJar
|
||||||
|
|
||||||
|
shadowJar {
|
||||||
|
minimize()
|
||||||
|
archiveFileName.set(project.name + "-" + project.property('projectVersion') + ".jar")
|
||||||
|
}
|
||||||
|
|
||||||
|
jar {
|
||||||
|
archiveFileName.set(project.name + "-" + project.property('projectVersion') + ".jar")
|
||||||
|
}
|
||||||
|
|
||||||
|
import com.github.jengelman.gradle.plugins.shadow.tasks.ConfigureShadowRelocation
|
||||||
|
|
||||||
|
task relocateShadowJar(type: ConfigureShadowRelocation) {
|
||||||
|
target = tasks.shadowJar
|
||||||
|
prefix = "net.draycia.carbon.libs" // Default value is "shadow"
|
||||||
|
}
|
||||||
|
|
||||||
|
tasks.shadowJar.dependsOn tasks.relocateShadowJar
|
||||||
|
|
||||||
clean.doFirst {
|
clean.doFirst {
|
||||||
delete "$rootDir/build/bundled"
|
delete "$rootDir/build/bundled"
|
||||||
}
|
}
|
||||||
@@ -1,11 +0,0 @@
|
|||||||
/*
|
|
||||||
* This file was generated by the Gradle 'init' task.
|
|
||||||
*/
|
|
||||||
|
|
||||||
rootProject.name = 'CarbonChatPlugin'
|
|
||||||
|
|
||||||
include(':CarbonChat')
|
|
||||||
include(':CarbonChatModeration')
|
|
||||||
include(':CarbonChatMCMMO')
|
|
||||||
include(':CarbonChatTowny')
|
|
||||||
include(':CarbonChatWorldGuard')
|
|
||||||
+72
-4
@@ -1,6 +1,10 @@
|
|||||||
package net.draycia.carbon;
|
package net.draycia.carbon;
|
||||||
|
|
||||||
|
import net.draycia.carbon.channels.contexts.impl.EconomyContext;
|
||||||
import net.draycia.carbon.channels.contexts.impl.DistanceContext;
|
import net.draycia.carbon.channels.contexts.impl.DistanceContext;
|
||||||
|
import net.draycia.carbon.channels.contexts.impl.TownyContext;
|
||||||
|
import net.draycia.carbon.channels.contexts.impl.WorldGuardContext;
|
||||||
|
import net.draycia.carbon.channels.contexts.impl.mcMMOContext;
|
||||||
import net.draycia.carbon.listeners.*;
|
import net.draycia.carbon.listeners.*;
|
||||||
import net.draycia.carbon.managers.*;
|
import net.draycia.carbon.managers.*;
|
||||||
import net.draycia.carbon.messaging.MessageManager;
|
import net.draycia.carbon.messaging.MessageManager;
|
||||||
@@ -10,10 +14,17 @@ import net.draycia.carbon.storage.impl.MySQLUserService;
|
|||||||
import net.draycia.carbon.util.CarbonPlaceholders;
|
import net.draycia.carbon.util.CarbonPlaceholders;
|
||||||
import net.draycia.carbon.util.ItemStackUtils;
|
import net.draycia.carbon.util.ItemStackUtils;
|
||||||
import net.kyori.adventure.text.serializer.legacy.LegacyComponentSerializer;
|
import net.kyori.adventure.text.serializer.legacy.LegacyComponentSerializer;
|
||||||
|
import net.milkbowl.vault.economy.Economy;
|
||||||
import net.milkbowl.vault.permission.Permission;
|
import net.milkbowl.vault.permission.Permission;
|
||||||
|
import org.bukkit.Bukkit;
|
||||||
|
import org.bukkit.configuration.InvalidConfigurationException;
|
||||||
|
import org.bukkit.configuration.file.YamlConfiguration;
|
||||||
import org.bukkit.plugin.PluginManager;
|
import org.bukkit.plugin.PluginManager;
|
||||||
import org.bukkit.plugin.java.JavaPlugin;
|
import org.bukkit.plugin.java.JavaPlugin;
|
||||||
|
|
||||||
|
import java.io.File;
|
||||||
|
import java.io.IOException;
|
||||||
|
|
||||||
public final class CarbonChat extends JavaPlugin {
|
public final class CarbonChat extends JavaPlugin {
|
||||||
|
|
||||||
private Permission permission;
|
private Permission permission;
|
||||||
@@ -28,11 +39,43 @@ public final class CarbonChat extends JavaPlugin {
|
|||||||
|
|
||||||
private ItemStackUtils itemStackUtils;
|
private ItemStackUtils itemStackUtils;
|
||||||
|
|
||||||
|
private YamlConfiguration modConfig;
|
||||||
|
private YamlConfiguration languageConfig;
|
||||||
|
|
||||||
public static final LegacyComponentSerializer LEGACY =
|
public static final LegacyComponentSerializer LEGACY =
|
||||||
LegacyComponentSerializer.builder().extractUrls().character('§').build();
|
LegacyComponentSerializer.builder().extractUrls().character('§').build();
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onEnable() {
|
public void onEnable() {
|
||||||
|
// Ensure config is present to be modified by the user
|
||||||
|
if (!(new File(getDataFolder(), "config.yml").exists())) {
|
||||||
|
saveDefaultConfig();
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!(new File(getDataFolder(), "moderation.yml").exists())) {
|
||||||
|
saveResource("moderation.yml", false);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!(new File(getDataFolder(), "language.yml").exists())) {
|
||||||
|
saveResource("language.yml", false);
|
||||||
|
}
|
||||||
|
|
||||||
|
modConfig = new YamlConfiguration();
|
||||||
|
|
||||||
|
try {
|
||||||
|
modConfig.load(new File(getDataFolder(), "moderation.yml"));
|
||||||
|
} catch (IOException | InvalidConfigurationException e) {
|
||||||
|
e.printStackTrace();
|
||||||
|
}
|
||||||
|
|
||||||
|
languageConfig = new YamlConfiguration();
|
||||||
|
|
||||||
|
try {
|
||||||
|
languageConfig.load(new File(getDataFolder(), "language.yml"));
|
||||||
|
} catch (IOException | InvalidConfigurationException e) {
|
||||||
|
e.printStackTrace();
|
||||||
|
}
|
||||||
|
|
||||||
// Setup Adventure
|
// Setup Adventure
|
||||||
adventureManager = new AdventureManager(this);
|
adventureManager = new AdventureManager(this);
|
||||||
|
|
||||||
@@ -45,9 +88,6 @@ public final class CarbonChat extends JavaPlugin {
|
|||||||
// Setup vault and permissions
|
// Setup vault and permissions
|
||||||
permission = getServer().getServicesManager().getRegistration(Permission.class).getProvider();
|
permission = getServer().getServicesManager().getRegistration(Permission.class).getProvider();
|
||||||
|
|
||||||
// Ensure config is present to be modified by the user
|
|
||||||
saveDefaultConfig();
|
|
||||||
|
|
||||||
// Initialize managers
|
// Initialize managers
|
||||||
commandManager = new CommandManager(this);
|
commandManager = new CommandManager(this);
|
||||||
channelManager = new ChannelManager(this);
|
channelManager = new ChannelManager(this);
|
||||||
@@ -72,6 +112,22 @@ public final class CarbonChat extends JavaPlugin {
|
|||||||
registerContexts();
|
registerContexts();
|
||||||
|
|
||||||
new CarbonPlaceholders(this).register();
|
new CarbonPlaceholders(this).register();
|
||||||
|
|
||||||
|
if (Bukkit.getPluginManager().isPluginEnabled("Towny")) {
|
||||||
|
getServer().getPluginManager().registerEvents(new TownyContext(this), this);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (Bukkit.getPluginManager().isPluginEnabled("mcMMO")) {
|
||||||
|
getServer().getPluginManager().registerEvents(new mcMMOContext(this), this);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (Bukkit.getPluginManager().isPluginEnabled("WorldGuard")) {
|
||||||
|
getServer().getPluginManager().registerEvents(new WorldGuardContext(this), this);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (Bukkit.getServicesManager().isProvidedFor(Economy.class)) {
|
||||||
|
Bukkit.getPluginManager().registerEvents(new EconomyContext(this), this);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@@ -94,13 +150,25 @@ public final class CarbonChat extends JavaPlugin {
|
|||||||
pluginManager.registerEvents(new RelationalPlaceholderHandler(), this);
|
pluginManager.registerEvents(new RelationalPlaceholderHandler(), this);
|
||||||
pluginManager.registerEvents(new UserFormattingListener(), this);
|
pluginManager.registerEvents(new UserFormattingListener(), this);
|
||||||
pluginManager.registerEvents(new WhisperPingHandler(this), this);
|
pluginManager.registerEvents(new WhisperPingHandler(this), this);
|
||||||
pluginManager.registerEvents(new RequiredBalanceHandler(this), this);
|
|
||||||
|
pluginManager.registerEvents(new CapsHandler(this), this);
|
||||||
|
pluginManager.registerEvents(new FilterHandler(this), this);
|
||||||
|
pluginManager.registerEvents(new MuteHandler(), this);
|
||||||
|
pluginManager.registerEvents(new ShadowMuteHandler(this), this);
|
||||||
}
|
}
|
||||||
|
|
||||||
private void registerContexts() {
|
private void registerContexts() {
|
||||||
getContextManager().register("distance", new DistanceContext());
|
getContextManager().register("distance", new DistanceContext());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public YamlConfiguration getModConfig() {
|
||||||
|
return modConfig;
|
||||||
|
}
|
||||||
|
|
||||||
|
public YamlConfiguration getLanguage() {
|
||||||
|
return languageConfig;
|
||||||
|
}
|
||||||
|
|
||||||
public Permission getPermission() {
|
public Permission getPermission() {
|
||||||
return permission;
|
return permission;
|
||||||
}
|
}
|
||||||
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
+4
-26
@@ -1,4 +1,4 @@
|
|||||||
package net.draycia.carbon.listeners;
|
package net.draycia.carbon.channels.contexts.impl;
|
||||||
|
|
||||||
import net.draycia.carbon.CarbonChat;
|
import net.draycia.carbon.CarbonChat;
|
||||||
import net.draycia.carbon.events.PreChatFormatEvent;
|
import net.draycia.carbon.events.PreChatFormatEvent;
|
||||||
@@ -8,35 +8,17 @@ import org.bukkit.event.EventHandler;
|
|||||||
import org.bukkit.event.Listener;
|
import org.bukkit.event.Listener;
|
||||||
import org.bukkit.plugin.RegisteredServiceProvider;
|
import org.bukkit.plugin.RegisteredServiceProvider;
|
||||||
|
|
||||||
public class RequiredBalanceHandler implements Listener {
|
public class EconomyContext implements Listener {
|
||||||
private final CarbonChat carbonChat;
|
private final CarbonChat carbonChat;
|
||||||
private final Economy economy;
|
private final Economy economy;
|
||||||
private final boolean enabled;
|
|
||||||
|
|
||||||
public RequiredBalanceHandler(CarbonChat carbonChat) {
|
public EconomyContext(CarbonChat carbonChat) {
|
||||||
this.carbonChat = carbonChat;
|
this.carbonChat = carbonChat;
|
||||||
|
this.economy = carbonChat.getServer().getServicesManager().getRegistration(Economy.class).getProvider();
|
||||||
RegisteredServiceProvider<Economy> registeredEco = carbonChat.getServer().getServicesManager().getRegistration(Economy.class);
|
|
||||||
|
|
||||||
if (registeredEco == null) {
|
|
||||||
carbonChat.getServer().getLogger().warning("No Vault-compatible Economy plugin detected! Economy features won't work!");
|
|
||||||
|
|
||||||
this.economy = null;
|
|
||||||
this.enabled = false;
|
|
||||||
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
this.enabled = true;
|
|
||||||
this.economy = registeredEco.getProvider();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@EventHandler
|
@EventHandler
|
||||||
public void onChatReqBal(PreChatFormatEvent event) {
|
public void onChatReqBal(PreChatFormatEvent event) {
|
||||||
if (!enabled) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
Object requiredBalObject = event.getChannel().getContext("vault-balance");
|
Object requiredBalObject = event.getChannel().getContext("vault-balance");
|
||||||
|
|
||||||
Double requiredBal;
|
Double requiredBal;
|
||||||
@@ -66,10 +48,6 @@ public class RequiredBalanceHandler implements Listener {
|
|||||||
|
|
||||||
@EventHandler
|
@EventHandler
|
||||||
public void onChatCost(PreChatFormatEvent event) {
|
public void onChatCost(PreChatFormatEvent event) {
|
||||||
if (!enabled) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
Object costObject = event.getChannel().getContext("vault-cost");
|
Object costObject = event.getChannel().getContext("vault-cost");
|
||||||
|
|
||||||
Double cost;
|
Double cost;
|
||||||
File renamed without changes.
+7
-14
@@ -1,4 +1,4 @@
|
|||||||
package net.draycia.carbontowny;
|
package net.draycia.carbon.channels.contexts.impl;
|
||||||
|
|
||||||
import com.palmergames.bukkit.towny.TownyAPI;
|
import com.palmergames.bukkit.towny.TownyAPI;
|
||||||
import com.palmergames.bukkit.towny.event.TownRemoveResidentEvent;
|
import com.palmergames.bukkit.towny.event.TownRemoveResidentEvent;
|
||||||
@@ -8,32 +8,25 @@ import net.draycia.carbon.CarbonChat;
|
|||||||
import net.draycia.carbon.events.ChannelSwitchEvent;
|
import net.draycia.carbon.events.ChannelSwitchEvent;
|
||||||
import net.draycia.carbon.events.PreChatFormatEvent;
|
import net.draycia.carbon.events.PreChatFormatEvent;
|
||||||
import net.draycia.carbon.storage.ChatUser;
|
import net.draycia.carbon.storage.ChatUser;
|
||||||
import org.bukkit.Bukkit;
|
|
||||||
import org.bukkit.event.EventHandler;
|
import org.bukkit.event.EventHandler;
|
||||||
import org.bukkit.event.Listener;
|
import org.bukkit.event.Listener;
|
||||||
import org.bukkit.event.player.PlayerJoinEvent;
|
import org.bukkit.event.player.PlayerJoinEvent;
|
||||||
import org.bukkit.plugin.java.JavaPlugin;
|
|
||||||
|
|
||||||
public final class CarbonChatTowny extends JavaPlugin implements Listener {
|
public final class TownyContext implements Listener {
|
||||||
|
|
||||||
private CarbonChat carbonChat;
|
private final CarbonChat carbonChat;
|
||||||
private static final String KEY = "towny-town";
|
private static final String KEY = "towny-town";
|
||||||
|
|
||||||
@Override
|
public TownyContext(CarbonChat carbonChat) {
|
||||||
public void onEnable() {
|
this.carbonChat = carbonChat;
|
||||||
saveDefaultConfig();
|
|
||||||
|
|
||||||
carbonChat = (CarbonChat) Bukkit.getPluginManager().getPlugin("CarbonChat");
|
this.carbonChat.getContextManager().register("towny-town", (context) -> {
|
||||||
|
|
||||||
carbonChat.getContextManager().register("towny-town", (context) -> {
|
|
||||||
if ((context.getValue() instanceof Boolean) && ((Boolean) context.getValue())) {
|
if ((context.getValue() instanceof Boolean) && ((Boolean) context.getValue())) {
|
||||||
return isInSameTown(context.getSender(), context.getTarget());
|
return isInSameTown(context.getSender(), context.getTarget());
|
||||||
}
|
}
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
});
|
});
|
||||||
|
|
||||||
Bukkit.getPluginManager().registerEvents(this, this);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@EventHandler(ignoreCancelled = true)
|
@EventHandler(ignoreCancelled = true)
|
||||||
@@ -43,7 +36,7 @@ public final class CarbonChatTowny extends JavaPlugin implements Listener {
|
|||||||
if ((town instanceof Boolean) && ((Boolean) town)) {
|
if ((town instanceof Boolean) && ((Boolean) town)) {
|
||||||
if (!isInTown(event.getUser())) {
|
if (!isInTown(event.getUser())) {
|
||||||
event.setCancelled(true);
|
event.setCancelled(true);
|
||||||
event.setFailureMessage(getConfig().getString("cancellation-message"));
|
event.setFailureMessage(carbonChat.getConfig().getString("contexts.Towny.cancellation-message"));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
+3
-11
@@ -1,4 +1,4 @@
|
|||||||
package net.draycia.carbonworldguard;
|
package net.draycia.carbon.channels.contexts.impl;
|
||||||
|
|
||||||
import com.sk89q.worldedit.bukkit.BukkitAdapter;
|
import com.sk89q.worldedit.bukkit.BukkitAdapter;
|
||||||
import com.sk89q.worldedit.util.Location;
|
import com.sk89q.worldedit.util.Location;
|
||||||
@@ -12,27 +12,19 @@ import net.draycia.carbon.CarbonChat;
|
|||||||
import net.draycia.carbon.events.ChannelSwitchEvent;
|
import net.draycia.carbon.events.ChannelSwitchEvent;
|
||||||
import net.draycia.carbon.events.PreChatFormatEvent;
|
import net.draycia.carbon.events.PreChatFormatEvent;
|
||||||
import net.draycia.carbon.storage.ChatUser;
|
import net.draycia.carbon.storage.ChatUser;
|
||||||
import org.bukkit.Bukkit;
|
|
||||||
import org.bukkit.event.EventHandler;
|
import org.bukkit.event.EventHandler;
|
||||||
import org.bukkit.event.Listener;
|
import org.bukkit.event.Listener;
|
||||||
import org.bukkit.plugin.java.JavaPlugin;
|
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
public final class CarbonChatWorldGuard extends JavaPlugin implements Listener {
|
public final class WorldGuardContext implements Listener {
|
||||||
|
|
||||||
private static final String KEY = "worldguard-region";
|
private static final String KEY = "worldguard-region";
|
||||||
|
|
||||||
@Override
|
public WorldGuardContext(CarbonChat carbonChat) {
|
||||||
public void onEnable() {
|
|
||||||
saveDefaultConfig();
|
|
||||||
CarbonChat carbonChat = (CarbonChat) Bukkit.getPluginManager().getPlugin("CarbonChat");
|
|
||||||
|
|
||||||
carbonChat.getContextManager().register(KEY, (context) -> {
|
carbonChat.getContextManager().register(KEY, (context) -> {
|
||||||
return this.testContext(context.getSender(), context.getTarget(), context.getValue());
|
return this.testContext(context.getSender(), context.getTarget(), context.getValue());
|
||||||
});
|
});
|
||||||
|
|
||||||
Bukkit.getPluginManager().registerEvents(this, this);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@EventHandler(ignoreCancelled = true)
|
@EventHandler(ignoreCancelled = true)
|
||||||
+6
-12
@@ -1,4 +1,4 @@
|
|||||||
package net.draycia.carbonmcmmo;
|
package net.draycia.carbon.channels.contexts.impl;
|
||||||
|
|
||||||
import com.gmail.nossr50.api.PartyAPI;
|
import com.gmail.nossr50.api.PartyAPI;
|
||||||
import com.gmail.nossr50.events.party.McMMOPartyChangeEvent;
|
import com.gmail.nossr50.events.party.McMMOPartyChangeEvent;
|
||||||
@@ -6,31 +6,24 @@ import net.draycia.carbon.CarbonChat;
|
|||||||
import net.draycia.carbon.events.ChannelSwitchEvent;
|
import net.draycia.carbon.events.ChannelSwitchEvent;
|
||||||
import net.draycia.carbon.events.PreChatFormatEvent;
|
import net.draycia.carbon.events.PreChatFormatEvent;
|
||||||
import net.draycia.carbon.storage.ChatUser;
|
import net.draycia.carbon.storage.ChatUser;
|
||||||
import org.bukkit.Bukkit;
|
|
||||||
import org.bukkit.event.EventHandler;
|
import org.bukkit.event.EventHandler;
|
||||||
import org.bukkit.event.Listener;
|
import org.bukkit.event.Listener;
|
||||||
import org.bukkit.event.player.PlayerJoinEvent;
|
import org.bukkit.event.player.PlayerJoinEvent;
|
||||||
import org.bukkit.plugin.java.JavaPlugin;
|
|
||||||
|
|
||||||
public final class CarbonChatMCMMO extends JavaPlugin implements Listener {
|
public final class mcMMOContext implements Listener {
|
||||||
|
|
||||||
private CarbonChat carbonChat;
|
private CarbonChat carbonChat;
|
||||||
|
|
||||||
@Override
|
public mcMMOContext(CarbonChat carbonChat) {
|
||||||
public void onEnable() {
|
this.carbonChat = carbonChat;
|
||||||
saveDefaultConfig();
|
|
||||||
|
|
||||||
carbonChat = (CarbonChat) Bukkit.getPluginManager().getPlugin("CarbonChat");
|
this.carbonChat.getContextManager().register("mcmmo-party", (context) -> {
|
||||||
|
|
||||||
carbonChat.getContextManager().register("mcmmo-party", (context) -> {
|
|
||||||
if ((context.getValue() instanceof Boolean) && ((Boolean) context.getValue())) {
|
if ((context.getValue() instanceof Boolean) && ((Boolean) context.getValue())) {
|
||||||
return isInSameParty(context.getSender(), context.getTarget());
|
return isInSameParty(context.getSender(), context.getTarget());
|
||||||
}
|
}
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
});
|
});
|
||||||
|
|
||||||
Bukkit.getPluginManager().registerEvents(this, this);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@EventHandler(ignoreCancelled = true)
|
@EventHandler(ignoreCancelled = true)
|
||||||
@@ -40,6 +33,7 @@ public final class CarbonChatMCMMO extends JavaPlugin implements Listener {
|
|||||||
if ((party instanceof Boolean) && ((Boolean) party)) {
|
if ((party instanceof Boolean) && ((Boolean) party)) {
|
||||||
if (!isInParty(event.getUser())) {
|
if (!isInParty(event.getUser())) {
|
||||||
event.setCancelled(true);
|
event.setCancelled(true);
|
||||||
|
event.setFailureMessage(carbonChat.getConfig().getString("contexts.mcMMO.cancellation-message"));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
File renamed without changes.
File renamed without changes.
File renamed without changes.
+1
-1
@@ -22,7 +22,7 @@ public class ChatReloadCommand extends BaseCommand {
|
|||||||
|
|
||||||
carbonChat.getChannelManager().reload();
|
carbonChat.getChannelManager().reload();
|
||||||
|
|
||||||
Component message = carbonChat.getAdventureManager().processMessage(carbonChat.getConfig().getString("language.reloaded"),
|
Component message = carbonChat.getAdventureManager().processMessage(carbonChat.getLanguage().getString("reloaded"),
|
||||||
"br", "\n");
|
"br", "\n");
|
||||||
|
|
||||||
carbonChat.getAdventureManager().getAudiences().audience(sender).sendMessage(message);
|
carbonChat.getAdventureManager().getAudiences().audience(sender).sendMessage(message);
|
||||||
@@ -0,0 +1,50 @@
|
|||||||
|
package net.draycia.carbon.commands;
|
||||||
|
|
||||||
|
import co.aikar.commands.BaseCommand;
|
||||||
|
import co.aikar.commands.annotation.CommandAlias;
|
||||||
|
import co.aikar.commands.annotation.CommandPermission;
|
||||||
|
import co.aikar.commands.annotation.Default;
|
||||||
|
import co.aikar.commands.annotation.Dependency;
|
||||||
|
import net.draycia.carbon.CarbonChat;
|
||||||
|
import net.draycia.carbon.storage.ChatUser;
|
||||||
|
import net.kyori.adventure.text.Component;
|
||||||
|
import org.bukkit.Bukkit;
|
||||||
|
import org.bukkit.command.CommandSender;
|
||||||
|
import org.bukkit.entity.Player;
|
||||||
|
|
||||||
|
@CommandAlias("clearchat|cc")
|
||||||
|
@CommandPermission("carbonchat.clearchat.clear")
|
||||||
|
public class ClearChatCommand extends BaseCommand {
|
||||||
|
|
||||||
|
@Dependency
|
||||||
|
private CarbonChat carbonChat;
|
||||||
|
|
||||||
|
@Default
|
||||||
|
public void baseCommand(CommandSender issuer) {
|
||||||
|
String format = carbonChat.getModConfig().getString("clear-chat.message", "");
|
||||||
|
Component component = carbonChat.getAdventureManager().processMessage(format, "br", "\n");
|
||||||
|
|
||||||
|
for (Player player : Bukkit.getOnlinePlayers()) {
|
||||||
|
if (player.hasPermission("carbonchat.clearchat.exempt")) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
|
ChatUser audience = carbonChat.getUserService().wrap(player);
|
||||||
|
|
||||||
|
for (int i = 0; i < carbonChat.getModConfig().getInt("clear-chat.message-count", 100); i++) {
|
||||||
|
audience.sendMessage(component);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (player.hasPermission("carbonchat.clearchat.notify")) {
|
||||||
|
String message = carbonChat.getLanguage().getString("clear-notify");
|
||||||
|
audience.sendMessage(carbonChat.getAdventureManager().processMessage(message, "player", issuer.getName()));
|
||||||
|
}
|
||||||
|
|
||||||
|
if (player.hasPermission("carbonchat.clearchat.exempt")) {
|
||||||
|
String message = carbonChat.getLanguage().getString("clear-exempt");
|
||||||
|
audience.sendMessage(carbonChat.getAdventureManager().processMessage(message, "player", issuer.getName()));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
+3
-3
@@ -24,16 +24,16 @@ public class IgnoreCommand extends BaseCommand {
|
|||||||
|
|
||||||
if (user.isIgnoringUser(targetUser)) {
|
if (user.isIgnoringUser(targetUser)) {
|
||||||
user.setIgnoringUser(targetUser, false);
|
user.setIgnoringUser(targetUser, false);
|
||||||
user.sendMessage(processMessage(player, carbonChat.getConfig().getString("language.not-ignoring-user")));
|
user.sendMessage(processMessage(player, carbonChat.getLanguage().getString("not-ignoring-user")));
|
||||||
} else {
|
} else {
|
||||||
Bukkit.getScheduler().runTaskAsynchronously(carbonChat, () -> {
|
Bukkit.getScheduler().runTaskAsynchronously(carbonChat, () -> {
|
||||||
Permission permission = carbonChat.getPermission();
|
Permission permission = carbonChat.getPermission();
|
||||||
|
|
||||||
if (permission.playerHas(null, targetUser.asOfflinePlayer(), "carbonchat.ignore.exempt")) {
|
if (permission.playerHas(null, targetUser.asOfflinePlayer(), "carbonchat.ignore.exempt")) {
|
||||||
user.sendMessage(processMessage(player, carbonChat.getConfig().getString("language.ignore-exempt")));
|
user.sendMessage(processMessage(player, carbonChat.getLanguage().getString("ignore-exempt")));
|
||||||
} else {
|
} else {
|
||||||
user.setIgnoringUser(targetUser, true);
|
user.setIgnoringUser(targetUser, true);
|
||||||
user.sendMessage(processMessage(player, carbonChat.getConfig().getString("language.ignoring-user")));
|
user.sendMessage(processMessage(player, carbonChat.getLanguage().getString("ignoring-user")));
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
+1
-1
@@ -24,7 +24,7 @@ public class MeCommand extends BaseCommand {
|
|||||||
}
|
}
|
||||||
|
|
||||||
String message = String.join(" ", args).replace("</pre>", "");
|
String message = String.join(" ", args).replace("</pre>", "");
|
||||||
String format = PlaceholderAPI.setPlaceholders(player, carbonChat.getConfig().getString("language.me"));
|
String format = PlaceholderAPI.setPlaceholders(player, carbonChat.getLanguage().getString("me"));
|
||||||
|
|
||||||
if (!player.hasPermission("carbonchat.me.formatting")) {
|
if (!player.hasPermission("carbonchat.me.formatting")) {
|
||||||
format = format.replace("<message>", "<pre><message></pre>");
|
format = format.replace("<message>", "<pre><message></pre>");
|
||||||
File renamed without changes.
@@ -0,0 +1,54 @@
|
|||||||
|
package net.draycia.carbon.commands;
|
||||||
|
|
||||||
|
import co.aikar.commands.annotation.*;
|
||||||
|
import co.aikar.commands.BaseCommand;
|
||||||
|
import net.draycia.carbon.CarbonChat;
|
||||||
|
import net.draycia.carbon.storage.ChatUser;
|
||||||
|
import net.kyori.adventure.audience.Audience;
|
||||||
|
import net.kyori.adventure.text.Component;
|
||||||
|
import net.milkbowl.vault.permission.Permission;
|
||||||
|
import org.bukkit.Bukkit;
|
||||||
|
import org.bukkit.command.CommandSender;
|
||||||
|
|
||||||
|
@CommandAlias("mute")
|
||||||
|
@CommandPermission("carbonchat.mute")
|
||||||
|
public class MuteCommand extends BaseCommand {
|
||||||
|
|
||||||
|
@Dependency
|
||||||
|
private CarbonChat carbonChat;
|
||||||
|
|
||||||
|
@Default
|
||||||
|
@CommandCompletion("@players")
|
||||||
|
@Syntax("<player>")
|
||||||
|
public void baseCommand(CommandSender sender, ChatUser targetUser) {
|
||||||
|
Audience audience = carbonChat.getAdventureManager().getAudiences().audience(sender);
|
||||||
|
|
||||||
|
if (targetUser.isMuted()) {
|
||||||
|
targetUser.setMuted(false);
|
||||||
|
String format = carbonChat.getLanguage().getString("no-longer-muted");
|
||||||
|
|
||||||
|
Component message = carbonChat.getAdventureManager().processMessage(format, "br", "\n",
|
||||||
|
"player", targetUser.asOfflinePlayer().getName());
|
||||||
|
|
||||||
|
audience.sendMessage(message);
|
||||||
|
} else {
|
||||||
|
Bukkit.getScheduler().runTaskAsynchronously(carbonChat, () -> {
|
||||||
|
Permission permission = carbonChat.getPermission();
|
||||||
|
String format;
|
||||||
|
|
||||||
|
if (permission.playerHas(null, targetUser.asOfflinePlayer(), "carbonchat.mute.exempt")) {
|
||||||
|
format = carbonChat.getLanguage().getString("mute-exempt");
|
||||||
|
} else {
|
||||||
|
targetUser.setMuted(true);
|
||||||
|
format = carbonChat.getLanguage().getString("is-now-muted");
|
||||||
|
}
|
||||||
|
|
||||||
|
Component message = carbonChat.getAdventureManager().processMessage(format, "br", "\n",
|
||||||
|
"player", targetUser.asOfflinePlayer().getName());
|
||||||
|
|
||||||
|
audience.sendMessage(message);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
+4
-4
@@ -39,9 +39,9 @@ public class NicknameCommand extends BaseCommand {
|
|||||||
String message;
|
String message;
|
||||||
|
|
||||||
if (nickname == null) {
|
if (nickname == null) {
|
||||||
message = carbonChat.getConfig().getString("language.other-nickname-reset");
|
message = carbonChat.getLanguage().getString("other-nickname-reset");
|
||||||
} else {
|
} else {
|
||||||
message = carbonChat.getConfig().getString("language.other-nickname-set");
|
message = carbonChat.getLanguage().getString("other-nickname-set");
|
||||||
}
|
}
|
||||||
|
|
||||||
sender.sendMessage(carbonChat.getAdventureManager().processMessage(
|
sender.sendMessage(carbonChat.getAdventureManager().processMessage(
|
||||||
@@ -53,9 +53,9 @@ public class NicknameCommand extends BaseCommand {
|
|||||||
String message;
|
String message;
|
||||||
|
|
||||||
if (nickname == null) {
|
if (nickname == null) {
|
||||||
message = carbonChat.getConfig().getString("language.nickname-reset");
|
message = carbonChat.getLanguage().getString("nickname-reset");
|
||||||
} else {
|
} else {
|
||||||
message = carbonChat.getConfig().getString("language.nickname-set");
|
message = carbonChat.getLanguage().getString("nickname-set");
|
||||||
}
|
}
|
||||||
|
|
||||||
sender.sendMessage(carbonChat.getAdventureManager().processMessageWithPapi(player,
|
sender.sendMessage(carbonChat.getAdventureManager().processMessageWithPapi(player,
|
||||||
+1
-1
@@ -24,7 +24,7 @@ public class ReplyCommand extends BaseCommand {
|
|||||||
ChatUser user = carbonChat.getUserService().wrap(player);
|
ChatUser user = carbonChat.getUserService().wrap(player);
|
||||||
|
|
||||||
if (user.getReplyTarget() == null) {
|
if (user.getReplyTarget() == null) {
|
||||||
String message = carbonChat.getConfig().getString("language.no-reply-target");
|
String message = carbonChat.getLanguage().getString("no-reply-target");
|
||||||
Component component = carbonChat.getAdventureManager().processMessage(message, "br", "\n");
|
Component component = carbonChat.getAdventureManager().processMessage(message, "br", "\n");
|
||||||
user.sendMessage(component);
|
user.sendMessage(component);
|
||||||
|
|
||||||
+1
-1
@@ -35,7 +35,7 @@ public class SetColorCommand extends BaseCommand {
|
|||||||
|
|
||||||
settings.setColor(TextColor.fromHexString(color));
|
settings.setColor(TextColor.fromHexString(color));
|
||||||
|
|
||||||
user.sendMessage(carbonChat.getAdventureManager().processMessageWithPapi(player, carbonChat.getConfig().getString("language.channel-color-set"),
|
user.sendMessage(carbonChat.getAdventureManager().processMessageWithPapi(player, carbonChat.getLanguage().getString("channel-color-set"),
|
||||||
"br", "\n", "color", "<color:" + color + ">", "channel", channel.getName(), "hex", color));
|
"br", "\n", "color", "<color:" + color + ">", "channel", channel.getName(), "hex", color));
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -0,0 +1,53 @@
|
|||||||
|
package net.draycia.carbon.commands;
|
||||||
|
|
||||||
|
import co.aikar.commands.annotation.*;
|
||||||
|
import co.aikar.commands.BaseCommand;
|
||||||
|
import net.draycia.carbon.CarbonChat;
|
||||||
|
import net.draycia.carbon.storage.ChatUser;
|
||||||
|
import net.kyori.adventure.audience.Audience;
|
||||||
|
import net.kyori.adventure.text.Component;
|
||||||
|
import net.milkbowl.vault.permission.Permission;
|
||||||
|
import org.bukkit.Bukkit;
|
||||||
|
import org.bukkit.command.CommandSender;
|
||||||
|
|
||||||
|
@CommandAlias("shadowmute|sm|smute")
|
||||||
|
@CommandPermission("carbonchat.shadowmute")
|
||||||
|
public class ShadowMuteCommand extends BaseCommand {
|
||||||
|
|
||||||
|
@Dependency
|
||||||
|
private CarbonChat carbonChat;
|
||||||
|
|
||||||
|
@Default
|
||||||
|
@CommandCompletion("@players")
|
||||||
|
@Syntax("<player>")
|
||||||
|
public void baseCommand(CommandSender sender, ChatUser targetUser) {
|
||||||
|
Audience audience = carbonChat.getAdventureManager().getAudiences().audience(sender);
|
||||||
|
|
||||||
|
if (targetUser.isShadowMuted()) {
|
||||||
|
targetUser.setShadowMuted(false);
|
||||||
|
String format = carbonChat.getLanguage().getString("no-longer-shadow-muted");
|
||||||
|
|
||||||
|
Component message = carbonChat.getAdventureManager().processMessage(format, "br", "\n",
|
||||||
|
"player", targetUser.asOfflinePlayer().getName());
|
||||||
|
|
||||||
|
audience.sendMessage(message);
|
||||||
|
} else {
|
||||||
|
Bukkit.getScheduler().runTaskAsynchronously(carbonChat, () -> {
|
||||||
|
Permission permission = carbonChat.getPermission();
|
||||||
|
String format;
|
||||||
|
|
||||||
|
if (permission.playerHas(null, targetUser.asOfflinePlayer(), "carbonchat.shadowmute.exempt")) {
|
||||||
|
format = carbonChat.getLanguage().getString("shadow-mute-exempt");
|
||||||
|
} else {
|
||||||
|
targetUser.setShadowMuted(true);
|
||||||
|
format = carbonChat.getLanguage().getString("is-now-shadow-muted");
|
||||||
|
}
|
||||||
|
|
||||||
|
Component message = carbonChat.getAdventureManager().processMessage(format, "br", "\n",
|
||||||
|
"player", targetUser.asOfflinePlayer().getName());
|
||||||
|
|
||||||
|
audience.sendMessage(message);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
+4
-4
@@ -27,10 +27,10 @@ public class SpyChannelCommand extends BaseCommand {
|
|||||||
|
|
||||||
if (settings.isSpying()) {
|
if (settings.isSpying()) {
|
||||||
settings.setSpying(false);
|
settings.setSpying(false);
|
||||||
message = carbonChat.getConfig().getString("language.spy-toggled-off");
|
message = carbonChat.getLanguage().getString("spy-toggled-off");
|
||||||
} else {
|
} else {
|
||||||
settings.setSpying(true);
|
settings.setSpying(true);
|
||||||
message = carbonChat.getConfig().getString("language.spy-toggled-on");
|
message = carbonChat.getLanguage().getString("spy-toggled-on");
|
||||||
}
|
}
|
||||||
|
|
||||||
user.sendMessage(carbonChat.getAdventureManager().processMessageWithPapi(player, message, "br", "\n",
|
user.sendMessage(carbonChat.getAdventureManager().processMessageWithPapi(player, message, "br", "\n",
|
||||||
@@ -45,10 +45,10 @@ public class SpyChannelCommand extends BaseCommand {
|
|||||||
|
|
||||||
if (user.isSpyingWhispers()) {
|
if (user.isSpyingWhispers()) {
|
||||||
user.setSpyingWhispers(false);
|
user.setSpyingWhispers(false);
|
||||||
message = carbonChat.getConfig().getString("language.spy-whispers-off");
|
message = carbonChat.getLanguage().getString("spy-whispers-off");
|
||||||
} else {
|
} else {
|
||||||
user.setSpyingWhispers(true);
|
user.setSpyingWhispers(true);
|
||||||
message = carbonChat.getConfig().getString("language.spy-whispers-on");
|
message = carbonChat.getLanguage().getString("spy-whispers-on");
|
||||||
}
|
}
|
||||||
|
|
||||||
user.sendMessage(carbonChat.getAdventureManager().processMessageWithPapi(player, message, "br", "\n"));
|
user.sendMessage(carbonChat.getAdventureManager().processMessageWithPapi(player, message, "br", "\n"));
|
||||||
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
+9
-9
@@ -1,26 +1,26 @@
|
|||||||
package net.draycia.carbonmoderation.listeners;
|
package net.draycia.carbon.listeners;
|
||||||
|
|
||||||
|
import net.draycia.carbon.CarbonChat;
|
||||||
import net.draycia.carbon.events.PreChatFormatEvent;
|
import net.draycia.carbon.events.PreChatFormatEvent;
|
||||||
import net.draycia.carbonmoderation.CarbonChatModeration;
|
|
||||||
import org.bukkit.event.EventHandler;
|
import org.bukkit.event.EventHandler;
|
||||||
import org.bukkit.event.EventPriority;
|
import org.bukkit.event.EventPriority;
|
||||||
import org.bukkit.event.Listener;
|
import org.bukkit.event.Listener;
|
||||||
|
|
||||||
public class CapsHandler implements Listener {
|
public class CapsHandler implements Listener {
|
||||||
|
|
||||||
private final CarbonChatModeration moderation;
|
private final CarbonChat carbonChat;
|
||||||
|
|
||||||
public CapsHandler(CarbonChatModeration moderation) {
|
public CapsHandler(CarbonChat carbonChat) {
|
||||||
this.moderation = moderation;
|
this.carbonChat = carbonChat;
|
||||||
}
|
}
|
||||||
|
|
||||||
@EventHandler(priority = EventPriority.LOW, ignoreCancelled = true)
|
@EventHandler(priority = EventPriority.LOW, ignoreCancelled = true)
|
||||||
public void onMessage(PreChatFormatEvent event) {
|
public void onMessage(PreChatFormatEvent event) {
|
||||||
if (!moderation.getConfig().getBoolean("caps-protection.enabled")) {
|
if (!carbonChat.getModConfig().getBoolean("caps-protection.enabled")) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!(event.getMessage().length() >= moderation.getConfig().getInt("caps-protection.minimum-length"))) {
|
if (!(event.getMessage().length() >= carbonChat.getModConfig().getInt("caps-protection.minimum-length"))) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -34,11 +34,11 @@ public class CapsHandler implements Listener {
|
|||||||
|
|
||||||
double capsPercentage = (amountOfCaps * 100.0) / event.getMessage().length();
|
double capsPercentage = (amountOfCaps * 100.0) / event.getMessage().length();
|
||||||
|
|
||||||
if (!(capsPercentage >= moderation.getConfig().getDouble("caps-protection.percent-caps"))) {
|
if (!(capsPercentage >= carbonChat.getModConfig().getDouble("caps-protection.percent-caps"))) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (moderation.getConfig().getBoolean("block-message")) {
|
if (carbonChat.getModConfig().getBoolean("block-message")) {
|
||||||
event.setCancelled(true);
|
event.setCancelled(true);
|
||||||
} else {
|
} else {
|
||||||
event.setMessage(event.getMessage().toLowerCase());
|
event.setMessage(event.getMessage().toLowerCase());
|
||||||
+9
-9
@@ -1,8 +1,8 @@
|
|||||||
package net.draycia.carbonmoderation.listeners;
|
package net.draycia.carbon.listeners;
|
||||||
|
|
||||||
|
import net.draycia.carbon.CarbonChat;
|
||||||
import net.draycia.carbon.channels.ChatChannel;
|
import net.draycia.carbon.channels.ChatChannel;
|
||||||
import net.draycia.carbon.events.PreChatFormatEvent;
|
import net.draycia.carbon.events.PreChatFormatEvent;
|
||||||
import net.draycia.carbonmoderation.CarbonChatModeration;
|
|
||||||
import org.bukkit.configuration.ConfigurationSection;
|
import org.bukkit.configuration.ConfigurationSection;
|
||||||
import org.bukkit.configuration.file.FileConfiguration;
|
import org.bukkit.configuration.file.FileConfiguration;
|
||||||
import org.bukkit.event.EventHandler;
|
import org.bukkit.event.EventHandler;
|
||||||
@@ -18,15 +18,15 @@ import java.util.regex.Pattern;
|
|||||||
|
|
||||||
public class FilterHandler implements Listener {
|
public class FilterHandler implements Listener {
|
||||||
|
|
||||||
private final CarbonChatModeration moderation;
|
private final CarbonChat carbonChat;
|
||||||
|
|
||||||
private final Map<String, List<Pattern>> patternReplacements = new HashMap<>();
|
private final Map<String, List<Pattern>> patternReplacements = new HashMap<>();
|
||||||
private final List<Pattern> blockedWords = new ArrayList<>();
|
private final List<Pattern> blockedWords = new ArrayList<>();
|
||||||
|
|
||||||
public FilterHandler(CarbonChatModeration moderation) {
|
public FilterHandler(CarbonChat carbonChat) {
|
||||||
this.moderation = moderation;
|
this.carbonChat = carbonChat;
|
||||||
|
|
||||||
FileConfiguration config = moderation.getConfig();
|
FileConfiguration config = carbonChat.getModConfig();
|
||||||
|
|
||||||
ConfigurationSection filters = config.getConfigurationSection("filters.filters");
|
ConfigurationSection filters = config.getConfigurationSection("filters.filters");
|
||||||
|
|
||||||
@@ -34,7 +34,7 @@ public class FilterHandler implements Listener {
|
|||||||
List<Pattern> patterns = new ArrayList<>();
|
List<Pattern> patterns = new ArrayList<>();
|
||||||
|
|
||||||
for (String word : filters.getStringList(replacement)) {
|
for (String word : filters.getStringList(replacement)) {
|
||||||
if (moderation.getConfig().getBoolean("filters.case-sensitive")) {
|
if (carbonChat.getModConfig().getBoolean("filters.case-sensitive")) {
|
||||||
patterns.add(Pattern.compile(word));
|
patterns.add(Pattern.compile(word));
|
||||||
} else {
|
} else {
|
||||||
patterns.add(Pattern.compile(word, Pattern.CASE_INSENSITIVE));
|
patterns.add(Pattern.compile(word, Pattern.CASE_INSENSITIVE));
|
||||||
@@ -46,7 +46,7 @@ public class FilterHandler implements Listener {
|
|||||||
|
|
||||||
for (String replacement : config.getStringList("filters.blocked-words")) {
|
for (String replacement : config.getStringList("filters.blocked-words")) {
|
||||||
for (String word : filters.getStringList(replacement)) {
|
for (String word : filters.getStringList(replacement)) {
|
||||||
if (moderation.getConfig().getBoolean("filters.case-sensitive")) {
|
if (carbonChat.getModConfig().getBoolean("filters.case-sensitive")) {
|
||||||
blockedWords.add(Pattern.compile(word));
|
blockedWords.add(Pattern.compile(word));
|
||||||
} else {
|
} else {
|
||||||
blockedWords.add(Pattern.compile(word, Pattern.CASE_INSENSITIVE));
|
blockedWords.add(Pattern.compile(word, Pattern.CASE_INSENSITIVE));
|
||||||
@@ -57,7 +57,7 @@ public class FilterHandler implements Listener {
|
|||||||
|
|
||||||
@EventHandler(priority = EventPriority.LOWEST, ignoreCancelled = true)
|
@EventHandler(priority = EventPriority.LOWEST, ignoreCancelled = true)
|
||||||
public void onFilter(PreChatFormatEvent event) {
|
public void onFilter(PreChatFormatEvent event) {
|
||||||
if (!moderation.getConfig().getBoolean("filters.enabled")) {
|
if (!carbonChat.getModConfig().getBoolean("filters.enabled")) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
File renamed without changes.
File renamed without changes.
File renamed without changes.
+1
-1
@@ -1,4 +1,4 @@
|
|||||||
package net.draycia.carbonmoderation.listeners;
|
package net.draycia.carbon.listeners;
|
||||||
|
|
||||||
import net.draycia.carbon.events.PreChatFormatEvent;
|
import net.draycia.carbon.events.PreChatFormatEvent;
|
||||||
import org.bukkit.event.EventHandler;
|
import org.bukkit.event.EventHandler;
|
||||||
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
+6
-6
@@ -1,18 +1,18 @@
|
|||||||
package net.draycia.carbonmoderation.listeners;
|
package net.draycia.carbon.listeners;
|
||||||
|
|
||||||
|
import net.draycia.carbon.CarbonChat;
|
||||||
import net.draycia.carbon.events.ChatComponentEvent;
|
import net.draycia.carbon.events.ChatComponentEvent;
|
||||||
import net.draycia.carbon.events.ChatFormatEvent;
|
import net.draycia.carbon.events.ChatFormatEvent;
|
||||||
import net.draycia.carbonmoderation.CarbonChatModeration;
|
|
||||||
import org.bukkit.event.EventHandler;
|
import org.bukkit.event.EventHandler;
|
||||||
import org.bukkit.event.EventPriority;
|
import org.bukkit.event.EventPriority;
|
||||||
import org.bukkit.event.Listener;
|
import org.bukkit.event.Listener;
|
||||||
|
|
||||||
public class ShadowMuteHandler implements Listener {
|
public class ShadowMuteHandler implements Listener {
|
||||||
|
|
||||||
private final CarbonChatModeration moderation;
|
private final CarbonChat carbonChat;
|
||||||
|
|
||||||
public ShadowMuteHandler(CarbonChatModeration moderation) {
|
public ShadowMuteHandler(CarbonChat carbonChat) {
|
||||||
this.moderation = moderation;
|
this.carbonChat = carbonChat;
|
||||||
}
|
}
|
||||||
|
|
||||||
@EventHandler(priority = EventPriority.LOWEST)
|
@EventHandler(priority = EventPriority.LOWEST)
|
||||||
@@ -34,7 +34,7 @@ public class ShadowMuteHandler implements Listener {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
String prefix = moderation.getConfig().getString("shadow-mute-prefix", "[SM] ");
|
String prefix = carbonChat.getModConfig().getString("shadow-mute-prefix", "[SM] ");
|
||||||
|
|
||||||
event.setFormat(prefix + event.getFormat());
|
event.setFormat(prefix + event.getFormat());
|
||||||
}
|
}
|
||||||
File renamed without changes.
File renamed without changes.
+16
-1
@@ -23,9 +23,13 @@ public class AdventureManager {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public Component processMessage(String input, String... placeholders) {
|
public Component processMessage(String input, String... placeholders) {
|
||||||
switch (carbonChat.getConfig().getString("formatting.type", "minimessage").toLowerCase()) {
|
switch (carbonChat.getLanguage().getString("formatting.type", "minimessage").toLowerCase()) {
|
||||||
case "minedown":
|
case "minedown":
|
||||||
return processMineDown(input, placeholders);
|
return processMineDown(input, placeholders);
|
||||||
|
case "mojang":
|
||||||
|
case "mojangson":
|
||||||
|
case "json":
|
||||||
|
return processMojang(input, placeholders);
|
||||||
case "minimessage-markdown":
|
case "minimessage-markdown":
|
||||||
return MiniMessage.markdown().parse(input, placeholders);
|
return MiniMessage.markdown().parse(input, placeholders);
|
||||||
case "minimessage":
|
case "minimessage":
|
||||||
@@ -34,6 +38,17 @@ public class AdventureManager {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private Component processMojang(String input, String... placeholders) {
|
||||||
|
for (int i = 0; i < placeholders.length; i += 2) {
|
||||||
|
String placeholder = placeholders[i];
|
||||||
|
String replacement = placeholders[i+1];
|
||||||
|
|
||||||
|
input = input.replace("<" + placeholder + ">", replacement);
|
||||||
|
}
|
||||||
|
|
||||||
|
return getAudiences().gsonSerializer().deserialize(input);
|
||||||
|
}
|
||||||
|
|
||||||
private Component processMineDown(String input, String... placeholders) {
|
private Component processMineDown(String input, String... placeholders) {
|
||||||
return MineDown.parse(input, placeholders);
|
return MineDown.parse(input, placeholders);
|
||||||
}
|
}
|
||||||
File renamed without changes.
+6
-2
@@ -61,7 +61,7 @@ public class CommandManager {
|
|||||||
|
|
||||||
commandManager.getCommandConditions().addCondition(ChatChannel.class,"canuse", (context, execution, value) -> {
|
commandManager.getCommandConditions().addCondition(ChatChannel.class,"canuse", (context, execution, value) -> {
|
||||||
if (value == null) {
|
if (value == null) {
|
||||||
throw new ConditionFailedException(carbonChat.getConfig().getString("language.cannot-use-channel"));
|
throw new ConditionFailedException(carbonChat.getLanguage().getString("cannot-use-channel"));
|
||||||
}
|
}
|
||||||
|
|
||||||
ChatUser user = carbonChat.getUserService().wrap(context.getIssuer().getPlayer());
|
ChatUser user = carbonChat.getUserService().wrap(context.getIssuer().getPlayer());
|
||||||
@@ -73,7 +73,7 @@ public class CommandManager {
|
|||||||
|
|
||||||
commandManager.getCommandConditions().addCondition(ChatChannel.class,"exists", (context, execution, value) -> {
|
commandManager.getCommandConditions().addCondition(ChatChannel.class,"exists", (context, execution, value) -> {
|
||||||
if (value == null) {
|
if (value == null) {
|
||||||
throw new ConditionFailedException(carbonChat.getConfig().getString("language.cannot-use-channel"));
|
throw new ConditionFailedException(carbonChat.getLanguage().getString("cannot-use-channel"));
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
@@ -91,6 +91,10 @@ public class CommandManager {
|
|||||||
this.commandManager.registerCommand(new ReplyCommand());
|
this.commandManager.registerCommand(new ReplyCommand());
|
||||||
this.commandManager.registerCommand(new SetColorCommand());
|
this.commandManager.registerCommand(new SetColorCommand());
|
||||||
this.commandManager.registerCommand(new SpyChannelCommand());
|
this.commandManager.registerCommand(new SpyChannelCommand());
|
||||||
|
|
||||||
|
this.commandManager.registerCommand(new ClearChatCommand());
|
||||||
|
this.commandManager.registerCommand(new MuteCommand());
|
||||||
|
this.commandManager.registerCommand(new ShadowMuteCommand());
|
||||||
}
|
}
|
||||||
|
|
||||||
public BukkitCommandManager getCommandManager() {
|
public BukkitCommandManager getCommandManager() {
|
||||||
File renamed without changes.
+2
-2
@@ -58,7 +58,7 @@ public class MessageManager {
|
|||||||
user.setNickname(nickname, true);
|
user.setNickname(nickname, true);
|
||||||
|
|
||||||
if (user.isOnline()) {
|
if (user.isOnline()) {
|
||||||
String message = carbonChat.getConfig().getString("language.nickname-set");
|
String message = carbonChat.getLanguage().getString("nickname-set");
|
||||||
|
|
||||||
user.sendMessage(carbonChat.getAdventureManager().processMessageWithPapi(user.asPlayer(),
|
user.sendMessage(carbonChat.getAdventureManager().processMessageWithPapi(user.asPlayer(),
|
||||||
message, "nickname", nickname));
|
message, "nickname", nickname));
|
||||||
@@ -69,7 +69,7 @@ public class MessageManager {
|
|||||||
user.setNickname(null, true);
|
user.setNickname(null, true);
|
||||||
|
|
||||||
if (user.isOnline()) {
|
if (user.isOnline()) {
|
||||||
String message = carbonChat.getConfig().getString("language.nickname-reset");
|
String message = carbonChat.getLanguage().getString("nickname-reset");
|
||||||
|
|
||||||
user.sendMessage(carbonChat.getAdventureManager().processMessageWithPapi(user.asPlayer(), message));
|
user.sendMessage(carbonChat.getAdventureManager().processMessageWithPapi(user.asPlayer(), message));
|
||||||
}
|
}
|
||||||
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
+3
-3
@@ -246,8 +246,8 @@ public class CarbonChatUser implements ChatUser, ForwardingAudience {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
String toPlayerFormat = carbonChat.getConfig().getString("language.message-to-other");
|
String toPlayerFormat = carbonChat.getLanguage().getString("message-to-other");
|
||||||
String fromPlayerFormat = carbonChat.getConfig().getString("language.message-from-other");
|
String fromPlayerFormat = carbonChat.getLanguage().getString("message-from-other");
|
||||||
|
|
||||||
String senderName = sender.asOfflinePlayer().getName();
|
String senderName = sender.asOfflinePlayer().getName();
|
||||||
String senderOfflineName = senderName;
|
String senderOfflineName = senderName;
|
||||||
@@ -325,7 +325,7 @@ public class CarbonChatUser implements ChatUser, ForwardingAudience {
|
|||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
user.sendMessage(carbonChat.getAdventureManager().processMessage(carbonChat.getConfig().getString("language.spy-whispers"),
|
user.sendMessage(carbonChat.getAdventureManager().processMessage(carbonChat.getLanguage().getString("spy-whispers"),
|
||||||
"br", "\n", "message", message,
|
"br", "\n", "message", message,
|
||||||
"targetname", targetOfflineName, "sendername", senderOfflineName,
|
"targetname", targetOfflineName, "sendername", senderOfflineName,
|
||||||
"target", targetName, "sender", senderName));
|
"target", targetName, "sender", senderName));
|
||||||
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
@@ -95,37 +95,11 @@ channels:
|
|||||||
should-bungee: false
|
should-bungee: false
|
||||||
message-prefix: '!'
|
message-prefix: '!'
|
||||||
|
|
||||||
# Options:
|
contexts:
|
||||||
# 'MiniMessage': https://github.com/KyoriPowered/adventure-docs/blob/feature/minimessage/source/minimessage.rst#the-components
|
Towny:
|
||||||
# 'MiniMessage-Markdown': https://github.com/KyoriPowered/adventure-docs/blob/feature/minimessage/source/minimessage.rst#markdown
|
cancellation-message: '<red>You do not belong to a town!'
|
||||||
# 'MineDown': https://github.com/Phoenix616/MineDown#syntax
|
mcMMO:
|
||||||
# Note that the messages provided in the default config utilise MiniMessage, and need to be changed if you're using MineDown
|
cancellation-message: '<red>You do not have a party!'
|
||||||
formatting:
|
|
||||||
type: 'MiniMessage'
|
|
||||||
|
|
||||||
language:
|
|
||||||
# The following messages are only compatible with MiniMessage/MineDown
|
|
||||||
reloaded: '<yellow>Chat config has been reloaded!'
|
|
||||||
message-to-other: '<green>[<gray>Me <gold>-> <gray><target><reset><green>] <message>'
|
|
||||||
message-from-other: '<green>[<gray><sender><reset> <gold>-> <gray>Me<green>] <message>'
|
|
||||||
spy-whispers: '<yellow>Spy [<gray><sender><reset> <gold>-> <gray><target><reset><yellow>] <message>'
|
|
||||||
no-reply-target: '<red>You have no one to reply to!'
|
|
||||||
empty-channel: 'NONE' #<channel>, set to "NONE" to disable
|
|
||||||
other-nickname-set: '<green><user><reset>''s nickname was set to <nickname><green>!'
|
|
||||||
other-nickname-reset: '<green><user><reset>''s nickname was reset!'
|
|
||||||
|
|
||||||
# The following messages are compatible with PlaceholderAPI and MiniMessage/MineDown
|
|
||||||
me: '<italic><dark_purple>*<displayname> <reset><message>*</dark_purple></italic>'
|
|
||||||
ignoring-user: '<green>You are now ignoring <gold><player><reset><green>!'
|
|
||||||
not-ignoring-user: '<green>You are no longer ignoring <gold><player><reset><green>!'
|
|
||||||
ignore-exempt: '<red>User <player> <red>is exempt from being ignored!'
|
|
||||||
channel-color-set: '<green>You have set <color><channel> <green>color to <hex>!'
|
|
||||||
spy-toggled-on: '<gray>You are now spying on <color><channel> <gray>chat!'
|
|
||||||
spy-toggled-off: '<gray>You are no longer spying on <color><channel> <gray>chat!'
|
|
||||||
spy-whispers-on: '<gray>You are now spying on whispers!'
|
|
||||||
spy-whispers-off: '<gray>You are no longer spying on whispers!'
|
|
||||||
nickname-set: '<green>Your nickname was set to <nickname><reset><green>!'
|
|
||||||
nickname-reset: '<green>Your nickname was reset!'
|
|
||||||
|
|
||||||
# Used for <server> placeholder in channel formats
|
# Used for <server> placeholder in channel formats
|
||||||
server-name: 'Server'
|
server-name: 'Server'
|
||||||
@@ -0,0 +1,40 @@
|
|||||||
|
# Options:
|
||||||
|
# 'MiniMessage': https://github.com/KyoriPowered/adventure-docs/blob/feature/minimessage/source/minimessage.rst#the-components
|
||||||
|
# 'MiniMessage-Markdown': https://github.com/KyoriPowered/adventure-docs/blob/feature/minimessage/source/minimessage.rst#markdown
|
||||||
|
# 'MineDown': https://github.com/Phoenix616/MineDown#syntax
|
||||||
|
# 'JSON': https://minecraft.gamepedia.com/Raw_JSON_text_format
|
||||||
|
# Note that the messages provided in the default config utilise MiniMessage, and need to be changed if you're using MineDown
|
||||||
|
# Please DO NOT use JSON formatting unless you really know what you're doing
|
||||||
|
formatting:
|
||||||
|
type: 'MiniMessage'
|
||||||
|
|
||||||
|
# The following messages are only compatible with MiniMessage/MineDown
|
||||||
|
reloaded: '<yellow>Chat config has been reloaded!'
|
||||||
|
message-to-other: '<green>[<gray>Me <gold>-> <gray><target><reset><green>] <message>'
|
||||||
|
message-from-other: '<green>[<gray><sender><reset> <gold>-> <gray>Me<green>] <message>'
|
||||||
|
spy-whispers: '<yellow>Spy [<gray><sender><reset> <gold>-> <gray><target><reset><yellow>] <message>'
|
||||||
|
no-reply-target: '<red>You have no one to reply to!'
|
||||||
|
empty-channel: 'NONE' #<channel>, set to "NONE" to disable
|
||||||
|
other-nickname-set: '<green><user><reset>''s nickname was set to <nickname><green>!'
|
||||||
|
other-nickname-reset: '<green><user><reset>''s nickname was reset!'
|
||||||
|
|
||||||
|
# The following messages are compatible with PlaceholderAPI and MiniMessage/MineDown
|
||||||
|
me: '<italic><dark_purple>*<displayname> <reset><message>*</dark_purple></italic>'
|
||||||
|
ignoring-user: '<green>You are now ignoring <gold><player><reset><green>!'
|
||||||
|
not-ignoring-user: '<green>You are no longer ignoring <gold><player><reset><green>!'
|
||||||
|
ignore-exempt: '<red>User <player> <red>is exempt from being ignored!'
|
||||||
|
channel-color-set: '<green>You have set <color><channel> <green>color to <hex>!'
|
||||||
|
spy-toggled-on: '<gray>You are now spying on <color><channel> <gray>chat!'
|
||||||
|
spy-toggled-off: '<gray>You are no longer spying on <color><channel> <gray>chat!'
|
||||||
|
spy-whispers-on: '<gray>You are now spying on whispers!'
|
||||||
|
spy-whispers-off: '<gray>You are no longer spying on whispers!'
|
||||||
|
nickname-set: '<green>Your nickname was set to <nickname><reset><green>!'
|
||||||
|
nickname-reset: '<green>Your nickname was reset!'
|
||||||
|
is-now-shadow-muted: '<yellow>Player <player> is now shadow muted!'
|
||||||
|
no-longer-shadow-muted: '<yellow>Player <player> is no longer shadow muted!'
|
||||||
|
shadow-mute-exempt: '<red>Player <player> is exempt from being shadow muted!'
|
||||||
|
is-now-muted: '<yellow>Player <player> is now muted!'
|
||||||
|
no-longer-muted: '<yellow>Player <player> is no longer muted!'
|
||||||
|
mute-exempt: '<red>Player <player> is exempt from being muted!'
|
||||||
|
clear-notify: '<yellow>Chat has been cleared by <player>.'
|
||||||
|
clear-exempt: '<yellow>You were exempt from the clear due to your permissions!'
|
||||||
-11
@@ -28,14 +28,3 @@ clear-chat:
|
|||||||
message: ""
|
message: ""
|
||||||
# How many messages will be sent in order to clear chat
|
# How many messages will be sent in order to clear chat
|
||||||
message-count: 100
|
message-count: 100
|
||||||
|
|
||||||
language:
|
|
||||||
is-now-shadow-muted: '<yellow>Player <player> is now shadow muted!'
|
|
||||||
no-longer-shadow-muted: '<yellow>Player <player> is no longer shadow muted!'
|
|
||||||
shadow-mute-exempt: '<red>Player <player> is exempt from being shadow muted!'
|
|
||||||
is-now-muted: '<yellow>Player <player> is now muted!'
|
|
||||||
no-longer-muted: '<yellow>Player <player> is no longer muted!'
|
|
||||||
mute-exempt: '<red>Player <player> is exempt from being muted!'
|
|
||||||
reloaded: '<yellow>ChatModeration config has been reloaded!'
|
|
||||||
clear-notify: '<yellow>Chat has been cleared by <player>.'
|
|
||||||
clear-exempt: '<yellow>You were exempt from the clear due to your permissions!'
|
|
||||||
Reference in new issue
Block a user