aboutsummaryrefslogtreecommitdiff
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
parente9fa0afb91c70de41c4b3ef5b0537b21e2991da4 (diff)
downloadspark-9d5aad9413ec8a219549f626db6e33ccca2f5acf.tar.gz
spark-9d5aad9413ec8a219549f626db6e33ccca2f5acf.tar.bz2
spark-9d5aad9413ec8a219549f626db6e33ccca2f5acf.zip
cleanup
-rw-r--r--build.gradle2
-rw-r--r--spark-bukkit/src/main/java/me/lucko/spark/bukkit/SparkBukkitPlugin.java10
-rw-r--r--spark-bungeecord/src/main/java/me/lucko/spark/bungeecord/SparkBungeeCordPlugin.java10
-rw-r--r--spark-common/src/main/java/me/lucko/spark/common/SparkPlugin.java2
-rw-r--r--spark-velocity/build.gradle4
5 files changed, 14 insertions, 14 deletions
diff --git a/build.gradle b/build.gradle
index 7711c7c..831ed9b 100644
--- a/build.gradle
+++ b/build.gradle
@@ -27,7 +27,7 @@ subprojects {
maven { url "https://repo.lucko.me/" }
maven { url "https://hub.spigotmc.org/nexus/content/repositories/snapshots/" }
maven { url "https://repo.spongepowered.org/maven" }
- maven { url "https://repo.velocitypowered.com/snapshots/" }
+ maven { url "https://repo.velocitypowered.com/releases/" }
}
}
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());
diff --git a/spark-bungeecord/src/main/java/me/lucko/spark/bungeecord/SparkBungeeCordPlugin.java b/spark-bungeecord/src/main/java/me/lucko/spark/bungeecord/SparkBungeeCordPlugin.java
index 121a678..9becaf1 100644
--- a/spark-bungeecord/src/main/java/me/lucko/spark/bungeecord/SparkBungeeCordPlugin.java
+++ b/spark-bungeecord/src/main/java/me/lucko/spark/bungeecord/SparkBungeeCordPlugin.java
@@ -20,11 +20,11 @@
package me.lucko.spark.bungeecord;
-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;
import me.lucko.spark.common.sampler.TickCounter;
+import net.md_5.bungee.api.CommandSender;
import net.md_5.bungee.api.plugin.Command;
import net.md_5.bungee.api.plugin.Plugin;
import net.md_5.bungee.api.plugin.TabExecutor;
@@ -67,8 +67,8 @@ public class SparkBungeeCordPlugin extends Plugin implements SparkPlugin {
}
@Override
- public Set<CommandSender> getSendersWithPermission(String permission) {
- List<net.md_5.bungee.api.CommandSender> senders = new LinkedList<>(getProxy().getPlayers());
+ public Set<BungeeCordCommandSender> getSendersWithPermission(String permission) {
+ List<CommandSender> senders = new LinkedList<>(getProxy().getPlayers());
senders.removeIf(sender -> !sender.hasPermission(permission));
senders.add(getProxy().getConsole());
return senders.stream().map(BungeeCordCommandSender::new).collect(Collectors.toSet());
@@ -98,12 +98,12 @@ public class SparkBungeeCordPlugin extends Plugin implements SparkPlugin {
}
@Override
- public void execute(net.md_5.bungee.api.CommandSender sender, String[] args) {
+ public void execute(CommandSender sender, String[] args) {
this.plugin.platform.executeCommand(new BungeeCordCommandSender(sender), args);
}
@Override
- public Iterable<String> onTabComplete(net.md_5.bungee.api.CommandSender sender, String[] args) {
+ public Iterable<String> onTabComplete(CommandSender sender, String[] args) {
return this.plugin.platform.tabCompleteCommand(new BungeeCordCommandSender(sender), args);
}
}
diff --git a/spark-common/src/main/java/me/lucko/spark/common/SparkPlugin.java b/spark-common/src/main/java/me/lucko/spark/common/SparkPlugin.java
index 175fda5..2b48ca7 100644
--- a/spark-common/src/main/java/me/lucko/spark/common/SparkPlugin.java
+++ b/spark-common/src/main/java/me/lucko/spark/common/SparkPlugin.java
@@ -34,7 +34,7 @@ public interface SparkPlugin {
String getLabel();
- Set<CommandSender> getSendersWithPermission(String permission);
+ Set<? extends CommandSender> getSendersWithPermission(String permission);
void runAsync(Runnable r);
diff --git a/spark-velocity/build.gradle b/spark-velocity/build.gradle
index 847a70d..01f1faa 100644
--- a/spark-velocity/build.gradle
+++ b/spark-velocity/build.gradle
@@ -4,8 +4,8 @@ plugins {
dependencies {
compile project(':spark-common')
- compileOnly 'com.velocitypowered:velocity-api:1.0-SNAPSHOT'
- annotationProcessor 'com.velocitypowered:velocity-api:1.0-SNAPSHOT'
+ compileOnly 'com.velocitypowered:velocity-api:1.0.2'
+ annotationProcessor 'com.velocitypowered:velocity-api:1.0.2'
}
blossom {