premium logic finished
This commit is contained in:
+11
-1
@@ -38,7 +38,7 @@ public class VelocityMethods implements PlatformMethods {
|
||||
public void sendPluginMessage(AdaptedPlayer player, String channel, String... data) {
|
||||
if(player == null) return;
|
||||
Player velocityPlayer = ((VelocityPlayer) player).getHandle();
|
||||
ByteArrayDataOutput out = ByteStreams.newDataOutput();
|
||||
@SuppressWarnings("UnstableApiUsage") ByteArrayDataOutput out = ByteStreams.newDataOutput();
|
||||
out.writeUTF( channel );
|
||||
out.writeUTF(player.getName());
|
||||
for(String s : data) {
|
||||
@@ -109,8 +109,18 @@ public class VelocityMethods implements PlatformMethods {
|
||||
return names;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getImplementationName() {
|
||||
return "velocity";
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<IBaseCommand> getCommands() {
|
||||
return plugin.commands;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean hasPlugin(String pluginName) {
|
||||
return proxyServer.getPluginManager().getPlugin(pluginName.toLowerCase(Locale.ROOT)).isPresent();
|
||||
}
|
||||
}
|
||||
|
||||
+6
@@ -10,6 +10,7 @@ import org.jetbrains.annotations.NotNull;
|
||||
import us.ajg0702.queue.api.players.AdaptedPlayer;
|
||||
import us.ajg0702.queue.api.server.AdaptedServer;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Optional;
|
||||
import java.util.UUID;
|
||||
|
||||
@@ -70,6 +71,11 @@ public class VelocityPlayer implements AdaptedPlayer, Audience {
|
||||
return handle.getUsername();
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<String> getPermissions() {
|
||||
throw new IllegalStateException("AdaptedPlayer#getPermissions cannot be used on velocity");
|
||||
}
|
||||
|
||||
@Override
|
||||
public Player getHandle() {
|
||||
return handle;
|
||||
|
||||
-1
@@ -10,7 +10,6 @@ import us.ajg0702.queue.api.server.AdaptedServerPing;
|
||||
import us.ajg0702.queue.platforms.velocity.players.VelocityPlayer;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collection;
|
||||
import java.util.List;
|
||||
import java.util.concurrent.CompletableFuture;
|
||||
import java.util.concurrent.ExecutionException;
|
||||
|
||||
Reference in New Issue
Block a user