mirror of
https://github.com/darksaid98/Carbon.git
synced 2026-12-02 22:16:22 +00:00
impl vs api
This commit is contained in:
1 parent
0370d6313f
commit
24ec001157
1 file changed
+7
-10
@@ -29,10 +29,7 @@ import java.io.FileReader;
|
|||||||
import java.io.FileWriter;
|
import java.io.FileWriter;
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
import java.lang.reflect.Type;
|
import java.lang.reflect.Type;
|
||||||
import java.util.ArrayList;
|
import java.util.*;
|
||||||
import java.util.HashMap;
|
|
||||||
import java.util.Map;
|
|
||||||
import java.util.UUID;
|
|
||||||
|
|
||||||
public final class SimpleChat extends JavaPlugin {
|
public final class SimpleChat extends JavaPlugin {
|
||||||
|
|
||||||
@@ -264,7 +261,7 @@ public final class SimpleChat extends JavaPlugin {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public boolean playerHasPlayerIgnored(OfflinePlayer player, OfflinePlayer target) {
|
public boolean playerHasPlayerIgnored(OfflinePlayer player, OfflinePlayer target) {
|
||||||
ArrayList<UUID> ignores = userIgnores.get(player.getUniqueId());
|
List<UUID> ignores = userIgnores.get(player.getUniqueId());
|
||||||
|
|
||||||
if (ignores == null) {
|
if (ignores == null) {
|
||||||
return false;
|
return false;
|
||||||
@@ -274,7 +271,7 @@ public final class SimpleChat extends JavaPlugin {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public boolean togglePlayerIgnoringPlayer(Player player, OfflinePlayer target) {
|
public boolean togglePlayerIgnoringPlayer(Player player, OfflinePlayer target) {
|
||||||
ArrayList<UUID> ignores = userIgnores.computeIfAbsent(player.getUniqueId(), (uuid) -> new ArrayList<>());
|
List<UUID> ignores = userIgnores.computeIfAbsent(player.getUniqueId(), (uuid) -> new ArrayList<>());
|
||||||
|
|
||||||
if (ignores.contains(target.getUniqueId())) {
|
if (ignores.contains(target.getUniqueId())) {
|
||||||
ignores.remove(target.getUniqueId());
|
ignores.remove(target.getUniqueId());
|
||||||
@@ -290,7 +287,7 @@ public final class SimpleChat extends JavaPlugin {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public boolean togglePlayerChannelMute(Player player, ChatChannel chatChannel) {
|
public boolean togglePlayerChannelMute(Player player, ChatChannel chatChannel) {
|
||||||
ArrayList<String> toggles = getUserChannelMutes(player);
|
List<String> toggles = getUserChannelMutes(player);
|
||||||
|
|
||||||
if (toggles.contains(chatChannel.getName())) {
|
if (toggles.contains(chatChannel.getName())) {
|
||||||
toggles.remove(chatChannel.getName());
|
toggles.remove(chatChannel.getName());
|
||||||
@@ -301,11 +298,11 @@ public final class SimpleChat extends JavaPlugin {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public ArrayList<String> getUserChannelMutes(Player player) {
|
public List<String> getUserChannelMutes(Player player) {
|
||||||
return userToggles.computeIfAbsent(player.getUniqueId(), (uuid) -> new ArrayList<>());
|
return userToggles.computeIfAbsent(player.getUniqueId(), (uuid) -> new ArrayList<>());
|
||||||
}
|
}
|
||||||
|
|
||||||
public ArrayList<UUID> getShadowMutes() {
|
public List<UUID> getShadowMutes() {
|
||||||
return shadowMutes;
|
return shadowMutes;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -397,7 +394,7 @@ public final class SimpleChat extends JavaPlugin {
|
|||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
public ArrayList<ChatChannel> getChannels() {
|
public List<ChatChannel> getChannels() {
|
||||||
return channels;
|
return channels;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in new issue
Block a user