use of org.spongepowered.common.command.SpongeProxySource in project SpongeCommon by SpongePowered.
the class MixinCommandSenderWrapper method onInit.
@Inject(method = "<init>", at = @At("RETURN"))
private void onInit(ICommandSender delegateIn, Vec3d positionVectorIn, BlockPos positionIn, Integer permissionLevelIn, Entity entityIn, Boolean sendCommandFeedbackIn, CallbackInfo ci) {
CommandSource wrappedDelegate = WrapperCommandSource.of(this.delegate);
Subject subjectDelegate;
if (this.permissionLevel == null) {
subjectDelegate = wrappedDelegate;
} else {
subjectDelegate = new AndPermissionLevelSubject(this, wrappedDelegate);
}
if (this.positionVector != null || wrappedDelegate instanceof Locatable) {
this.sponge = new SpongeProxySource.Located(this, wrappedDelegate, subjectDelegate);
} else {
this.sponge = new SpongeProxySource(this, wrappedDelegate, subjectDelegate);
}
}
Aggregations