aboutsummaryrefslogtreecommitdiff
path: root/spark-bukkit/src/main/java/me
diff options
context:
space:
mode:
authorLuck <git@lucko.me>2019-07-22 20:27:49 +0100
committerLuck <git@lucko.me>2019-07-22 20:27:49 +0100
commit9d5aad9413ec8a219549f626db6e33ccca2f5acf (patch)
treee40cdc2367f4f02388dd2f2a5f60eb8d85bc2037 /spark-bukkit/src/main/java/me
parente9fa0afb91c70de41c4b3ef5b0537b21e2991da4 (diff)
downloadspark-9d5aad9413ec8a219549f626db6e33ccca2f5acf.tar.gz
spark-9d5aad9413ec8a219549f626db6e33ccca2f5acf.tar.bz2
spark-9d5aad9413ec8a219549f626db6e33ccca2f5acf.zip
cleanup
Diffstat (limited to 'spark-bukkit/src/main/java/me')
-rw-r--r--spark-bukkit/src/main/java/me/lucko/spark/bukkit/SparkBukkitPlugin.java10
1 files changed, 5 insertions, 5 deletions
diff --git a/spark-bukkit/src/main/java/me/lucko/spark/bukkit/SparkBukkitPlugin.java b/spark-bukkit/src/main/java/me/lucko/spark/bukkit/SparkBukkitPlugin.java
index fac03af..15882ce 100644
--- a/spark-bukkit/src/main/java/me/lucko/spark/bukkit/SparkBukkitPlugin.java
+++ b/spark-bukkit/src/main/java/me/lucko/spark/bukkit/SparkBukkitPlugin.java
@@ -20,7 +20,6 @@
package me.lucko.spark.bukkit;
-import me.lucko.spark.common.CommandSender;
import me.lucko.spark.common.SparkPlatform;
import me.lucko.spark.common.SparkPlugin;
import me.lucko.spark.common.sampler.ThreadDumper;
@@ -28,6 +27,7 @@ import me.lucko.spark.common.sampler.TickCounter;
import org.bukkit.ChatColor;
import org.bukkit.command.Command;
import org.bukkit.command.CommandExecutor;
+import org.bukkit.command.CommandSender;
import org.bukkit.plugin.java.JavaPlugin;
import java.nio.file.Path;
@@ -76,13 +76,13 @@ public class SparkBukkitPlugin extends JavaPlugin implements SparkPlugin {
}
@Override
- public boolean onCommand(org.bukkit.command.CommandSender sender, Command command, String label, String[] args) {
+ public boolean onCommand(CommandSender sender, Command command, String label, String[] args) {
this.platform.executeCommand(new BukkitCommandSender(sender), args);
return true;
}
@Override
- public List<String> onTabComplete(org.bukkit.command.CommandSender sender, Command command, String alias, String[] args) {
+ public List<String> onTabComplete(CommandSender sender, Command command, String alias, String[] args) {
return this.platform.tabCompleteCommand(new BukkitCommandSender(sender), args);
}
@@ -102,8 +102,8 @@ public class SparkBukkitPlugin extends JavaPlugin implements SparkPlugin {
}
@Override
- public Set<CommandSender> getSendersWithPermission(String permission) {
- List<org.bukkit.command.CommandSender> senders = new LinkedList<>(getServer().getOnlinePlayers());
+ public Set<BukkitCommandSender> getSendersWithPermission(String permission) {
+ List<CommandSender> senders = new LinkedList<>(getServer().getOnlinePlayers());
senders.removeIf(sender -> !sender.hasPermission(permission));
senders.add(getServer().getConsoleSender());
return senders.stream().map(BukkitCommandSender::new).collect(Collectors.toSet());