File tree Expand file tree Collapse file tree 2 files changed +15
-1
lines changed
eternalcore-core/src/main/java/com/eternalcode/core/viewer Expand file tree Collapse file tree 2 files changed +15
-1
lines changed Original file line number Diff line number Diff line change @@ -4,7 +4,7 @@ object Versions {
4
4
const val PAPER_API = " 1.21.3-R0.1-SNAPSHOT"
5
5
6
6
const val ETERNALCODE_COMMONS = " 1.1.7"
7
- const val MULTIFICATION = " 1.2.1 "
7
+ const val MULTIFICATION = " 1.2.2 "
8
8
9
9
const val JETBRAINS_ANNOTATIONS = " 26.0.2"
10
10
const val PLACEHOLDER_API = " 2.11.6"
Original file line number Diff line number Diff line change 5
5
import com .eternalcode .core .user .User ;
6
6
import com .eternalcode .core .user .UserManager ;
7
7
import com .eternalcode .multification .viewer .ViewerProvider ;
8
+ import java .util .List ;
8
9
import org .bukkit .Server ;
9
10
import org .bukkit .command .BlockCommandSender ;
10
11
import org .bukkit .command .CommandSender ;
@@ -51,6 +52,19 @@ public Collection<Viewer> onlinePlayers() {
51
52
return audiences ;
52
53
}
53
54
55
+ @ Override
56
+ public Collection <Viewer > onlinePlayers (String permission ) {
57
+ Set <Viewer > audiences = new HashSet <>();
58
+
59
+ for (Player player : this .server .getOnlinePlayers ()) {
60
+ if (player .hasPermission (permission )) {
61
+ audiences .add (this .player (player .getUniqueId ()));
62
+ }
63
+ }
64
+
65
+ return audiences ;
66
+ }
67
+
54
68
@ Override
55
69
public Viewer console () {
56
70
return BukkitViewerImpl .console ();
You can’t perform that action at this time.
0 commit comments