mirror of
https://github.com/GeyserMC/MCProtocolLib.git
synced 2024-12-04 21:01:02 -05:00
Fix stack overflow in flag methods.
This commit is contained in:
parent
be70b05e3c
commit
72bde6a3c0
1 changed files with 1 additions and 11 deletions
|
@ -32,19 +32,9 @@ public class TcpServerSession extends TcpSession {
|
||||||
return this.server.hasGlobalFlag(key);
|
return this.server.hasGlobalFlag(key);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public <T> T getFlag(String key) {
|
|
||||||
T ret = super.getFlag(key);
|
|
||||||
if(ret != null) {
|
|
||||||
return ret;
|
|
||||||
}
|
|
||||||
|
|
||||||
return this.server.getGlobalFlag(key);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public <T> T getFlag(String key, T def) {
|
public <T> T getFlag(String key, T def) {
|
||||||
T ret = super.getFlag(key);
|
T ret = super.getFlag(key, null);
|
||||||
if(ret != null) {
|
if(ret != null) {
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue