mirror of
https://github.com/darksaid98/Carbon.git
synced 2026-12-03 22:15:45 +00:00
Completions and shadowmute support in RP
This commit is contained in:
1 parent
5c0d901aaf
commit
03e8f4ec53
3 files changed
+13
-5
No files matched your search
@@ -27,12 +27,16 @@ public class MeCommand extends BaseCommand {
|
|||||||
String format = PlaceholderAPI.setPlaceholders(player, simpleChat.getConfig().getString("language.me"));
|
String format = PlaceholderAPI.setPlaceholders(player, simpleChat.getConfig().getString("language.me"));
|
||||||
Component component = MiniMessage.instance().parse(format, "message", message);
|
Component component = MiniMessage.instance().parse(format, "message", message);
|
||||||
|
|
||||||
for (Player onlinePlayer : Bukkit.getOnlinePlayers()) {
|
if (simpleChat.isUserShadowMuted(player)) {
|
||||||
if (simpleChat.playerHasPlayerIgnored(onlinePlayer, player)) {
|
simpleChat.getAudiences().player(player).sendMessage(component);
|
||||||
continue;
|
} else {
|
||||||
}
|
for (Player onlinePlayer : Bukkit.getOnlinePlayers()) {
|
||||||
|
if (simpleChat.playerHasPlayerIgnored(onlinePlayer, player)) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
simpleChat.getAudiences().player(onlinePlayer).sendMessage(component);
|
simpleChat.getAudiences().player(onlinePlayer).sendMessage(component);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -2,6 +2,7 @@ package net.draycia.simplechat.commands;
|
|||||||
|
|
||||||
import co.aikar.commands.BaseCommand;
|
import co.aikar.commands.BaseCommand;
|
||||||
import co.aikar.commands.annotation.CommandAlias;
|
import co.aikar.commands.annotation.CommandAlias;
|
||||||
|
import co.aikar.commands.annotation.CommandCompletion;
|
||||||
import co.aikar.commands.annotation.CommandPermission;
|
import co.aikar.commands.annotation.CommandPermission;
|
||||||
import co.aikar.commands.annotation.Default;
|
import co.aikar.commands.annotation.Default;
|
||||||
import net.draycia.simplechat.SimpleChat;
|
import net.draycia.simplechat.SimpleChat;
|
||||||
@@ -20,6 +21,7 @@ public class MessageCommand extends BaseCommand {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Default
|
@Default
|
||||||
|
@CommandCompletion("@players")
|
||||||
public void baseCommand(Player player, String target, String... args) {
|
public void baseCommand(Player player, String target, String... args) {
|
||||||
OfflinePlayer targetPlayer = Bukkit.getOfflinePlayer(target);
|
OfflinePlayer targetPlayer = Bukkit.getOfflinePlayer(target);
|
||||||
|
|
||||||
|
|||||||
@@ -2,6 +2,7 @@ package net.draycia.simplechat.commands;
|
|||||||
|
|
||||||
import co.aikar.commands.BaseCommand;
|
import co.aikar.commands.BaseCommand;
|
||||||
import co.aikar.commands.annotation.CommandAlias;
|
import co.aikar.commands.annotation.CommandAlias;
|
||||||
|
import co.aikar.commands.annotation.CommandCompletion;
|
||||||
import co.aikar.commands.annotation.CommandPermission;
|
import co.aikar.commands.annotation.CommandPermission;
|
||||||
import co.aikar.commands.annotation.Default;
|
import co.aikar.commands.annotation.Default;
|
||||||
import net.draycia.simplechat.SimpleChat;
|
import net.draycia.simplechat.SimpleChat;
|
||||||
@@ -21,6 +22,7 @@ public class ShadowMuteCommand extends BaseCommand {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Default
|
@Default
|
||||||
|
@CommandCompletion("@players")
|
||||||
public void baseCommand(CommandSender sender, OfflinePlayer target) {
|
public void baseCommand(CommandSender sender, OfflinePlayer target) {
|
||||||
boolean isNowMuted = simpleChat.toggleShadowMute(target);
|
boolean isNowMuted = simpleChat.toggleShadowMute(target);
|
||||||
|
|
||||||
|
|||||||
Reference in new issue
Block a user