mirror of
https://github.com/ViaVersion/ViaProxy.git
synced 2024-10-01 04:47:32 +02:00
Fixed protocol/version blocking not doing anything
This commit is contained in:
parent
b744a2c6d4
commit
ce10d26107
@ -0,0 +1,34 @@
|
||||
/*
|
||||
* This file is part of ViaProxy - https://github.com/RaphiMC/ViaProxy
|
||||
* Copyright (C) 2023 RK_01/RaphiMC and contributors
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
package net.raphimc.viaproxy.injection.transformer;
|
||||
|
||||
import com.viaversion.viaversion.connection.UserConnectionImpl;
|
||||
import net.lenni0451.classtransform.InjectionCallback;
|
||||
import net.lenni0451.classtransform.annotations.CTarget;
|
||||
import net.lenni0451.classtransform.annotations.CTransformer;
|
||||
import net.lenni0451.classtransform.annotations.injection.CInject;
|
||||
|
||||
@CTransformer(UserConnectionImpl.class)
|
||||
public abstract class UserConnectionImplTransformer {
|
||||
|
||||
@CInject(method = "shouldApplyBlockProtocol", target = @CTarget("HEAD"), cancellable = true)
|
||||
private void applyBlockProtocol(InjectionCallback ic) {
|
||||
ic.setReturnValue(true);
|
||||
}
|
||||
|
||||
}
|
Loading…
Reference in New Issue
Block a user