Merge pull request #52 from Leymooo/header-footer
Add Header and Footer. Resolves #50
This commit is contained in:
@@ -1,7 +1,6 @@
|
||||
package com.velocitypowered.api.event;
|
||||
|
||||
import com.google.common.base.Preconditions;
|
||||
|
||||
import net.kyori.text.Component;
|
||||
import net.kyori.text.serializer.ComponentSerializers;
|
||||
import org.checkerframework.checker.nullness.qual.NonNull;
|
||||
|
@@ -1,16 +1,13 @@
|
||||
package com.velocitypowered.api.proxy;
|
||||
|
||||
import com.velocitypowered.api.command.CommandSource;
|
||||
import com.velocitypowered.api.event.connection.LoginEvent;
|
||||
import com.velocitypowered.api.proxy.messages.ChannelMessageSink;
|
||||
import com.velocitypowered.api.proxy.messages.ChannelMessageSource;
|
||||
import com.velocitypowered.api.server.ServerInfo;
|
||||
import com.velocitypowered.api.util.GameProfile.Property;
|
||||
import com.velocitypowered.api.util.MessagePosition;
|
||||
import net.kyori.text.Component;
|
||||
import org.checkerframework.checker.nullness.qual.NonNull;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Optional;
|
||||
import java.util.UUID;
|
||||
|
||||
@@ -58,5 +55,21 @@ public interface Player extends CommandSource, InboundConnection, ChannelMessage
|
||||
*/
|
||||
ConnectionRequestBuilder createConnectionRequest(@NonNull ServerInfo info);
|
||||
|
||||
/**
|
||||
* Sets a header and footer to the player
|
||||
* @param header component with header
|
||||
* @param footer component with footer
|
||||
*/
|
||||
void setHeaderAndFooter(Component header, Component footer);
|
||||
|
||||
/**
|
||||
* Clears a header and footer for the player
|
||||
*/
|
||||
void clearHeaderAndFooter();
|
||||
|
||||
/**
|
||||
* Disconnects the player with the reason
|
||||
* @param reason component with the reason
|
||||
*/
|
||||
void disconnect(Component reason);
|
||||
}
|
||||
|
@@ -25,7 +25,7 @@ public class GameProfile {
|
||||
public UUID idAsUuid() {
|
||||
return UuidUtils.fromUndashed(id);
|
||||
}
|
||||
|
||||
|
||||
public String getName() {
|
||||
return name;
|
||||
}
|
||||
|
Reference in New Issue
Block a user