Added an asPlayer method to LocalCommandSender, which casts the object to LocalPlayer if possible and throws an exception otherwise.
This commit is contained in:
@@ -549,4 +549,8 @@ public abstract class LocalPlayer extends LocalCommandSender {
|
||||
public void dispatchCUIHandshake() {
|
||||
}
|
||||
|
||||
@Override
|
||||
public LocalPlayer asPlayer() {
|
||||
return this;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user