Add getEntry to TabList.java
This commit is contained in:
@@ -111,6 +111,11 @@ public class KeyedVelocityTabList implements InternalTabList {
|
||||
return entries.containsKey(uuid);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Optional<TabListEntry> getEntry(UUID uuid) {
|
||||
return Optional.ofNullable(this.entries.get(uuid));
|
||||
}
|
||||
|
||||
/**
|
||||
* Clears all entries from the tab list. Note that the entries are written with
|
||||
* {@link MinecraftConnection#delayedWrite(Object)}, so make sure to do an explicit
|
||||
|
@@ -162,6 +162,11 @@ public class VelocityTabList implements InternalTabList {
|
||||
return this.entries.containsKey(uuid);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Optional<TabListEntry> getEntry(UUID uuid) {
|
||||
return Optional.ofNullable(this.entries.get(uuid));
|
||||
}
|
||||
|
||||
@Override
|
||||
public Collection<TabListEntry> getEntries() {
|
||||
return this.entries.values().stream().map(e -> (TabListEntry) e).collect(Collectors.toList());
|
||||
|
Reference in New Issue
Block a user