forked from SteamWar/SteamWar
Remove TinyProtocol.addTypedFilter
This commit is contained in:
@@ -62,7 +62,7 @@ public class NoClipCommand extends SWCommand implements Listener {
|
||||
public NoClipCommand() {
|
||||
super("noclip", "nc");
|
||||
|
||||
BiFunction<Player, Object, Object> first = (player, o) -> {
|
||||
BiFunction<Player, ServerboundMovePlayerPacket, Object> first = (player, o) -> {
|
||||
NoClipData noClipData = SWPlayer.of(player).getComponent(NoClipData.class).orElse(null);
|
||||
if (noClipData == null) return o;
|
||||
if (noClipData.lastTick == TPSUtils.currentTick.get()) return o;
|
||||
@@ -100,7 +100,7 @@ public class NoClipCommand extends SWCommand implements Listener {
|
||||
}
|
||||
return o;
|
||||
};
|
||||
TinyProtocol.instance.addTypedFilter(ServerboundSetCreativeModeSlotPacket.class, third);
|
||||
TinyProtocol.instance.addFilter(ServerboundSetCreativeModeSlotPacket.class, third);
|
||||
}
|
||||
|
||||
private static final Reflection.Field<GameType> playerGameMode = Reflection.getField(ServerPlayerGameMode.class, GameType.class, 0);
|
||||
|
||||
Reference in New Issue
Block a user