Unnerved by 1.18 fog? This Spigot plugin will remove it!

Overview

ClearFog

Are you also unnerved by the new 1.18 fog system? And you tried to increase the server view distance?
You don't have to! This Spigot plugin "tells" the player that the view distance is higher than it actually is. The server view distance won't change.
You can even change the default view distance or set individual view distances for different players!

URLs

Why?

As of 1.18 the fog in Minecraft is not done by the client anymore but by the server. This raises the problem that the server view distance may not be that high and the player will have very unnerving fog.
If you can't increase it for some reason or you don't want to in order to save performance this was getting even more annoying.

How this plugin works

The plugin modifies the login packet that is sent to the client when the client joins and changes the view distance.
How that looks:

Before

2021-12-17_17 54 32

After

2021-12-17_17 54 14

Config

The default config.yml looks like this:

check-for-updates: true
default:
  enabled: true
  view-distance: 32
distances:
  enabled: false
  players: {}

You can change all values using commands, but you can edit the config, too.
Here's what the values do:

  • check-for-updates - Whether to check for plugin updates on startup.
  • default
    • enabled - Changes whether the default view distance is applied.
    • view-distance - The default view distance.
  • distances
    • enabled - Changes whether player specific view distances are applied.
    • players - Here are player specific view distances saved.

Messages

You can also change all messages in the messages.yml file!

Commands

The plugin contains one basic command: /fog
Sub commands are:

  • /fog reload - Reloads the config.
  • /fog default <enable/disable> - Enables or disables the default view distance.
  • /fog default get - Returns the default view distance.
  • /fog default set <View Distance> - Sets the default view distance.
  • /fog individual <enable|disable> - Enables or disables player specific view distances.
  • /fog individual get [Player] - Returns the player specific view distance for yourself or another player.
  • /fog individual set <View Distance> [Player] - Sets the player specific view distance for yourself or another player.
  • /fog individual unset [Player] - Removes the player specific view distance for yourself or another player.

You can also use the alias /myfog for all /fog individual commmands.
For example: You can use /myfog set 16 instead of /fog individual set 16.

Please also note that fog is only applied on join, so you have to rejoin for the changes to take effect.

Permissions

  • clearfog.reload - Permission for /fog reload
  • clearfog.default.toggle - Permission for /fog default <enable|disable>
  • clearfog.default.values - Permission for /fog default get and /fog default set
  • clearfog.individual.toggle - Permission for /fog individual <enable|disable>
  • clearfog.individual.values - Permission for /fog individual get, /fog individual set and /fog individual unset
  • clearfog.individual.values.others - Allows players to change the player specific view distances for other players.

Additional information

This plugin collects anonymous server stats with bStats, an open-source statistics service for Minecraft software. If you don't want this, you can deactivate it in plugins/bStats/config.yml.

Credits

Credits go to dmulloy2 and aadnk for TinyProtocol (a part of ProtocolLib) from which I used some code.

You might also like...

Minecraft spigot plugin for.... spits (just for fun) [1.16+]

Minecraft spigot plugin for.... spits (just for fun) [1.16+]

Easy-to-use fun plugin that just adds ability to... spit :3 How to spit? Just use /funnyspits spit command! You can also use /spit, which is more fast

Jul 6, 2022

MissileWars is a famous, fun and fast minigame spigot-plugin for Minecraft

MissileWars MissileWars is a famous, fun and fast minigame spigot-plugin for Minecraft Downloads Get binary jars directly here: https://www.spigotmc.o

Dec 23, 2022

DnD Plugin submission using Atlas. Plugin inspired on the TrollGUI bukkit plugin

πŸ’‘ PunishGUI DnD Plugin submission using Atlas. Plugin inspired on the TrollGUI bukkit plugin πŸ“œ Dependencies πŸ“ƒ Paper 1.18 🌎 Atlas πŸ’» Commands /hell

Jan 19, 2022

[Minecraft] Configs from Spigot core

SpigotConfigLibrary [Minecraft] Configs from Spigot core English This is a cut-out piece of config code from the Spigot core. You can use it for conve

Sep 9, 2022

Totally Spigot 1.17

"""Spigot 1.17""" Thanks for all the rages, but Spigot 1.17 is now officially available and can be obtained by using BuildTools! See this for more inf

Jun 3, 2022

sign gui api for spigot plugins

hSignAPI public class ExampleSign extends JavaPlugin { private SignAPI signAPI; @Override public void onEnable() { this.signAPI

Jan 6, 2022

particle api for spigot plugins

hParticleAPI public class ExampleParticle extends JavaPlugin { private ParticleAPI particleAPI; @Override public void onEnable() {

Dec 15, 2021

An advanced 1.8.8 spigot backdoor.

CelestialBackdoor An advanced 1.8.8 spigot backdoor. This backdoor contains a plethora of commands to execute. This backdoor supports commands for Dis

Jan 19, 2022

The loader for mods under Fabric. It provides mod loading facilities and useful abstractions for other mods to use, which is compatible with spigot now

Silk The loader for mods under Fabric. It provides mod loading facilities and useful abstractions for other mods to use, which is compatible with spig

Oct 1, 2022
Comments
  • Suggestion: World-specific settings

    Suggestion: World-specific settings

    Can it be set per world? I like this plugin because the nether world is foggy. The reason I'm suggesting this is because I don't want to remove fog from other worlds, but I want to reduce fog from the nether world.

    enhancement 
    opened by Pantera07 8
  • Bug report: Version 1.18.2 is not supported.

    Bug report: Version 1.18.2 is not supported.

    Describe the bug Version 1.18.2 is not supported.

    To Reproduce Steps to reproduce the behavior:

    1. Running with 1.18.2

    Expected behavior The plugin must be workable in 1.18.2

    Screenshots

    [13:18:37] [Server thread/INFO]: [ClearFog] Enabling ClearFog v1.5.1
    [13:18:37] [Server thread/ERROR]: Error occurred while enabling ClearFog v1.5.1 (Is it up to date?)
    java.lang.IllegalStateException: ClearFog does not support the server version "1_18_R2"
    	at de.rapha149.clearfog.ClearFog.onEnable(ClearFog.java:35) ~[ClearFog.jar:?]
    	at org.bukkit.plugin.java.JavaPlugin.setEnabled(JavaPlugin.java:264) ~[purpur-api-1.18.2-R0.1-SNAPSHOT.jar:?]
    	at org.bukkit.plugin.java.JavaPluginLoader.enablePlugin(JavaPluginLoader.java:370) ~[purpur-api-1.18.2-R0.1-SNAPSHOT.jar:?]
    	at org.bukkit.plugin.SimplePluginManager.enablePlugin(SimplePluginManager.java:501) ~[purpur-api-1.18.2-R0.1-SNAPSHOT.jar:?]
    	at org.bukkit.craftbukkit.v1_18_R2.CraftServer.enablePlugin(CraftServer.java:559) ~[purpur-1.18.2.jar:git-Purpur-1570]
    	at org.bukkit.craftbukkit.v1_18_R2.CraftServer.enablePlugins(CraftServer.java:473) ~[purpur-1.18.2.jar:git-Purpur-1570]
    	at net.minecraft.server.MinecraftServer.loadWorld0(MinecraftServer.java:671) ~[purpur-1.18.2.jar:git-Purpur-1570]
    	at net.minecraft.server.MinecraftServer.loadLevel(MinecraftServer.java:438) ~[purpur-1.18.2.jar:git-Purpur-1570]
    	at net.minecraft.server.dedicated.DedicatedServer.initServer(DedicatedServer.java:352) ~[purpur-1.18.2.jar:git-Purpur-1570]
    	at net.minecraft.server.MinecraftServer.runServer(MinecraftServer.java:1174) ~[purpur-1.18.2.jar:git-Purpur-1570]
    	at net.minecraft.server.MinecraftServer.lambda$spin$1(MinecraftServer.java:322) ~[purpur-1.18.2.jar:git-Purpur-1570]
    	at java.lang.Thread.run(Thread.java:833) ~[?:?]
    Caused by: java.lang.ClassNotFoundException: de.rapha149.clearfog.version.Wrapper1_18_R2
    	at org.bukkit.plugin.java.PluginClassLoader.loadClass0(PluginClassLoader.java:153) ~[purpur-api-1.18.2-R0.1-SNAPSHOT.jar:?]
    	at org.bukkit.plugin.java.PluginClassLoader.loadClass(PluginClassLoader.java:105) ~[purpur-api-1.18.2-R0.1-SNAPSHOT.jar:?]
    	at java.lang.ClassLoader.loadClass(ClassLoader.java:520) ~[?:?]
    	at java.lang.Class.forName0(Native Method) ~[?:?]
    	at java.lang.Class.forName(Class.java:375) ~[?:?]
    	at de.rapha149.clearfog.ClearFog.onEnable(ClearFog.java:31) ~[ClearFog.jar:?]
    	... 11 more
    [13:18:37] [Server thread/INFO]: [ClearFog] Disabling ClearFog v1.5.1
    [13:18:37] [Server thread/INFO]: [ClearFog] Plugin disabled.
    

    Desktop (please complete the following information):

    • Server software: Purpur
    • Server version: 1.18.2
    • Plugin version: 1.5.1
    bug 
    opened by Pantera07 6
  • BUG: Bedrock 1.19 error upon joining.

    BUG: Bedrock 1.19 error upon joining.

    Describe the bug When joining the server in the console it throws an error. Fog is not reduced or gone.

    To Reproduce Steps to reproduce the behavior:

    1. Use bedrock edition 1.19 as the server is 1.19 based
    2. Join the server
    3. See error in the console during/after joining

    Expected behavior Clear fog does not throw an error and clears the fog.

    Desktop (please complete the following information):

    • Server software: Purpur
    • Server version: 1.19
    • Plugin version: Latest

    Smartphone (please complete the following information):

    • Device: Any mobile or PC Bedrock client

    Additional context [14:51:16 ERROR]: Could not pass event PlayerJoinEvent to ClearFog v1.5.4 java.lang.NullPointerException: Cannot invoke "java.lang.Integer.intValue()" because the return value of "java.util.Map.get(Object)" is null at de.rapha149.clearfog.Util.updateViewDistances(Util.java:91) ~[ClearFog.jar:?] at de.rapha149.clearfog.Util.updateViewDistance(Util.java:71) ~[ClearFog.jar:?] at de.rapha149.clearfog.Events.onJoin(Events.java:12) ~[ClearFog.jar:?] at com.destroystokyo.paper.event.executor.asm.generated.GeneratedEventExecutor237.execute(Unknown Source) ~[?:?] at org.bukkit.plugin.EventExecutor.lambda$create$1(EventExecutor.java:75) ~[purpur-api-1.19-R0.1-SNAPSHOT.jar:?] at co.aikar.timings.TimedEventExecutor.execute(TimedEventExecutor.java:76) ~[purpur-api-1.19-R0.1-SNAPSHOT.jar:git-Purpur-1662] at org.bukkit.plugin.RegisteredListener.callEvent(RegisteredListener.java:70) ~[purpur-api-1.19-R0.1-SNAPSHOT.jar:?] at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.java:666) ~[purpur-api-1.19-R0.1-SNAPSHOT.jar:?] at net.minecraft.server.players.PlayerList.postChunkLoadJoin(PlayerList.java:365) ~[purpur-1.19.jar:git-Purpur-1662] at net.minecraft.server.players.PlayerList.lambda$placeNewPlayer$1(PlayerList.java:307) ~[purpur-1.19.jar:git-Purpur-1662] at net.minecraft.server.network.ServerGamePacketListenerImpl.tick(ServerGamePacketListenerImpl.java:341) ~[?:?] at net.minecraft.network.Connection.tick(Connection.java:577) ~[?:?] at net.minecraft.server.network.ServerConnectionListener.tick(ServerConnectionListener.java:232) ~[?:?] at net.minecraft.server.MinecraftServer.tickChildren(MinecraftServer.java:1609) ~[purpur-1.19.jar:git-Purpur-1662] at net.minecraft.server.dedicated.DedicatedServer.tickChildren(DedicatedServer.java:485) ~[purpur-1.19.jar:git-Purpur-1662] at net.minecraft.server.MinecraftServer.tickServer(MinecraftServer.java:1441) ~[purpur-1.19.jar:git-Purpur-1662] at net.minecraft.server.MinecraftServer.runServer(MinecraftServer.java:1208) ~[purpur-1.19.jar:git-Purpur-1662] at net.minecraft.server.MinecraftServer.lambda$spin$1(MinecraftServer.java:307) ~[purpur-1.19.jar:git-Purpur-1662] at java.lang.Thread.run(Thread.java:833) ~[?:?]

    bug 
    opened by SavageTheUnicorn 1
  • Feature request!

    Feature request!

    Hello, is it possible to make this plugin work on 1.17.1 with viaversion so 1.18 clients don't get the fog? If you can't implement the feature publicly we will pay you for it! Add me on discord to discuss!

    Discord:

    Barry#0 3 6 3 (Had to separate the discord name so it shows up correctly.)

    enhancement help wanted 
    opened by bpx573 9
simple spigot plugin malware remover, made in 10 minutes lol

spigot-malware-remover Simple spigot plugin malware remover made in 10 minutes, using ASM bytecode manipulation library. Compile it using maven, if yo

MichaΕ‚ Kaczmarek 24 Oct 29, 2022
Plugin with helpful tools for factions, made to be used beside atlas spigot.

AtlasUtils Plugin with helpful tools for factions, made to be used beside atlas spigot. Features: Config: Found in your plugins folder at AtlasUtils/c

null 2 Dec 24, 2021
A Spigot plugin to edit block properties and more.

BoneTool BoneTool is a tool created to edit block properties with many features for builders. This is a creative tool developed as a package of featur

DeZilla 1 Jan 6, 2022
Spigot plugin with a bunch of quite useful commands in it!

QuiteUsefulCommands Spigot plugin with a bunch of quite useful commands in it. Install Download the latest release and drag it into your server's plug

MightyCoderX 6 Aug 20, 2022
A simple Bingo Plugin for Spigot 1.18.1

Bingo The first one to find 4 items in a line wins A simple Bingo Plugin for Spigot 1.18.1 Preview Commands /board - Prints out the Bingo Board to the

null 7 Jun 19, 2022
A Spigot plugin that tracks statistics with InfluxDB for timescale analytics.

RiceStats I made this plugin for my SMP server. It's able to track statistics and send it to InfluxDB where it can be processed by an analytics progra

Andy 11 Dec 24, 2022
πŸƒ A lightweight, multiarena, complex Parkour Spigot/Bukkit plugin for Minecraft Server

?? A lightweight, multiarena, multilanguage, completely configurable and complex Parkour Spigot/Bukkit plugin for Minecraft Server

Victor Rodrigues 6 Oct 17, 2022
Spigot Plugin for creating light shows/concerts in Minecraft

Spigot Plugin for creating light shows/concerts in Minecraft. It works by simulating ingame effects like guardian and beacon beams.

null 38 Dec 16, 2022
A spigot plugin for spawning a chest when the player dies

A spigot plugin for spawning a chest when the player dies. It supports Holographic Displays, Decent Holograms, ProtocolLib, WorldGuard, and PlotSquared for additional features

Ricardo Borutta 6 Dec 30, 2022
An advanced coin plugin for spigot.

rCoins Description rCoins is an advanced coin system which has a great api. For developers If you need to use API of rCoins, you can use maven or grad

RIN 7 Sep 22, 2022