mirror of
https://github.com/NEZNAMY/TAB.git
synced 2026-11-26 10:29:49 -05:00
fixed NoSuchElementException on velocity
This commit is contained in:
1 parent
4b3a9c3894
commit
bdc5ba162d
1 file changed
+6
-1
@@ -29,7 +29,12 @@ public class VelocityTabPlayer extends ITabPlayer{
|
||||
*/
|
||||
public VelocityTabPlayer(Player p) {
|
||||
player = p;
|
||||
world = p.getCurrentServer().get().getServerInfo().getName();
|
||||
if (p.getCurrentServer().isPresent()) {
|
||||
world = p.getCurrentServer().get().getServerInfo().getName();
|
||||
} else {
|
||||
//tab reload while a player is connecting, how unfortunate
|
||||
world = "<null>";
|
||||
}
|
||||
channel = ((ConnectedPlayer)player).getConnection().getChannel();
|
||||
uniqueId = p.getUniqueId();
|
||||
name = p.getUsername();
|
||||
|
||||
Reference in new issue
Block a user