-
-
Notifications
You must be signed in to change notification settings - Fork 7
Home
SkyChanger is a light-weight plugin built for Spigot and Sponge. The main function of this plugin is to change the color of the sky for yourself, a specific player, a specific world, or everyone. This plugin functions by sending a packet with a specified ID to the target player(s). Every packet number that is not 0 will cause rain to appear, and higher magnitude packet numbers increase the intensity of the rain. For an optimal experience it is recommended to use this plugin with Optifine and to turn rain and rain particles off. If this is not possible or inconvenient, rain is automatically turned off in Desert
and Mesa
biomes. You may want to use this plugin exclusively there.
If you have optifine installed, you should turn off Rain Splash, which can be found under Options > Video Settings > Animations > Rain Splash. You could also turn off regular rainfall, however this does not cause any lag. If you want to do this aswell, you can find it under Options > Video Settings > Details > Rain & Snow.
- Allow players to change the color of their personal sky.
- Change the sky color for specific players.
- Change the sky color for a specific world.
- Change the sky color for everyone online.
- Freeze/Unfreeze yourself, others, a world, or everyone online.
- Configurable limits to the range of packets that can be sent.
- Usage messages tailored to specific users based on permission level.
- Multilanguage support.
- Metrics tracking by bStats.
Command | Description | Required Permission |
---|---|---|
/SkyChanger <#> [#] | Change the color of your personal sky using a packet number. The second number is optional. It can be used for more color combinations. | skychanger.changesky.self |
/SkyChanger <#> [#] [player] | Change the sky color for a specific player. The player argument may either be a name or UUID. | skychanger.changesky.others |
/SkyChanger <#> [#] [-a] | Change the sky color for everyone online. | skychanger.changesky.all |
/SkyChanger <#> [#] [-r <#>] | Change the sky color for everyone within a given radius. | skychanger.changesky.radius.[* OR limit] |
/SkyChanger <#> [-w [world]] | Change the sky color for everyone in [world]. If the world paramter is left blank, your current world will be the target. | skychanger.changesky.world.[* OR world] |
/SkyChanger freeze/unfreeze | Freeze/unfreeze yourself. | skychanger.freeze.self |
/SkyChanger freeze/unfreeze [player] | Freeze/unfreeze a specific player. | skychanger.freeze.others |
/SkyChanger freeze/unfreeze [-a] | Freeze/unfreeze everyone online. | skychanger.freeze.all |
/SkyChanger freeze/unfreeze [-r <#>] | Freeze/unfreeze everyone within a given radius. | skychanger.freeze.radius.[* OR limit] |
/SkyChanger freeze/unfreeze [-w [world]] | Freeze/unfreeze everyone in [world]. If the world paramter is left blank, your current world will be the target. | skychanger.freeze.world.[* OR world] |
/SkyChanger reload | Reload the configuration file. | skychanger.reload |
/SkyChanger version | Display plugin version information. | - |
The freeze command only freezes the player's client and it stays frozen until there is a packet update that will effectively unfreeze them. This means that they will not be protected or immune on the server and will still be subject to damage. A freeze is not harmful, as the only observable affect is unloading chunks on a client and rendering them unable to move. The unfreeze command will unfreeze the player, however sometimes the chunks may not reload. In order to force reload them you may use the keybind F3 + A
. A player will also be automatically unfrozen if they teleport somewhere (for example to spawn or their home). As always the best way for a player to be fully unfrozen is to relog. Freezing only appears to work in the Overworld.
Command usage messages are tailored to the permission level of each user. For example, if a user only had the permission skychanger.changesky.self
, the usage message they would see is /SkyChanger <#>
. If a user had the permission skychanger.changesky.*
, the usage message would be /SkyChanger <#> [player | -a]
. Further, if a user only had the permission skychanger.changesky.others
, the usage message would be displayed as /SkyChanger <#> [player]
Also, if a player does not have permission for a command altogether they will not see it on the help page brought up by typing either /SkyChanger
or /SkyChanger help
.
The packet numbers will be bound to the range you specify in the config.yml, however anyone with the permission skychanger.bypasslimit
will be able to specify any number for the packet. The packet numbers are floating points (decimals, ex 1.2) and are subject to the maximum and minimum values of floating point numbers. The max and min values are |3.4028235E38|
and |1.4E-45|
, respectively. Any magnitude smaller than the min will be truncated, while any magnitude higher than the maximum will produce complete darkness and no rain. See the table below for details.
Packet numbers are accepted in scientific notation as well as standard notation, that is [number]E[power].
Below is a table of useful packet numbers to know
NUMBERS OF HIGH MAGNITUDE WILL INCREASE RAIN AND RAIN PARTICLES, THIS CAN CAUSE YOU TO LAG OUT AT A CERTAIN POINT. TAKE CAUTION WHEN PICKING A PACKET NUMBER!
Number/Range | Description |
---|---|
(-infinity , -3.4028236E38 ] |
Eternal Darkness, no rain. |
(-3.4028235E38 , -2 ] |
No observable difference from -1, however there will be more rain and particles. |
-1 |
Makes the stars brighter at night. |
0 |
Sunny sky. |
1 |
Rain. |
2 |
Brown colored sky. |
[3 , 6 ] |
Nether sky, larger numbers cause more darkness. |
[7 , ~15 ] |
Black sky with yellow tinted light. Reduced shadows with higher numbers. |
[~15 , 3.4028235E38 ) |
No observable change, however there will be more rain and particles. |
[3.4028236E38 , infinity ) |
Eternal Darkness, no rain. |
These numbers are just the standard effects. The effects will change if you have night vision on, for example. The effects work best in the Overworld and may not produce any changes in the Nether or End.
These effects will vary when providing a second number (ex. /skychanger 4 = red, /skychanger 4 10 = light blue). Note that if you omit the second number, that packet will not be reset. To reset it, run the command with the value set to 0 (ex. /skychanger 4 0 = restore red sky).
If you want to reset your sky, your best option is to use a packet number of 0
or reconnect to the server you're on.
Note that the self permissions are automatically granted if a user has access to either the others, all, or world permissions.
On sponge, wildcard permissions do not exist. Omit the .*
to get the same functionality.
Permission | Descrption | Default |
---|---|---|
skychanger.* |
Access to all SkyChanger commands. | OP |
skychanger.changesky.* |
Access to every part of the main SkyChanger command. | OP |
skychanger.changesky.self |
Access to change your personal sky color. | OP |
skychanger.changesky.others |
Access to changing a specific person's sky color. | OP |
skychanger.changesky.radius.* |
Access to change the sky color for all players within a radius. | OP |
skychanger.changesky.radius.[limit] |
Access to change the sky color for all players within a limited radius. | OP |
skychanger.changesky.world.* |
Access to changing a specific world's sky color. | OP |
skychanger.changesky.world.[world] |
Access to changing the sky color of ONLY [world]. | OP |
skychanger.changesky.all |
Access to changing the sky color of all online players. | OP |
skychanger.freeze.* |
Access to every part of the SkyChanger freeze and unfreeze commands. | OP |
skychanger.freeze.self |
Access to freeze/unfreeze yourself. | OP |
skychanger.freeze.others |
Access to freeze/unfreeze a specific person. | OP |
skychanger.freeze.radius.* |
Access to freeze/unfreeze all players within a radius. | OP |
skychanger.freeze.radius.[limit] |
Access to freeze/unfreeze all players within a limited radius. | OP |
skychanger.freeze.world.* |
Access to freeze/unfreeze a specific world. | OP |
skychanger.freeze.world.[world] |
Access to freeze/unfreeze ONLY [world]. | OP |
skychanger.freeze.all |
Access to freeze/unfreeze all online players. | OP |
skychanger.bypasslimit |
Bypass the packet range limits set in the config.yml. | OP |
skychanger.reload |
Access to reload the configuration. | OP |
If you, for example, want to allow a user to change the sky color of all worlds except one you can add permissions like so:
- -skychanger.changesky.world.heaven
- skychanger.changesky.world.*
This would mean the user has permission to change the sky in all worlds except the world named heaven.
skychanger.*
skychanger.changesky.*
skychanger.changesky.self
skychanger.changesky.others
skychanger.changesky.radius.[* OR limit]
skychanger.changesky.world.*
skychanger.changesky.world.[world]
skychanger.changesky.all
skychanger.freeze.*
skychanger.freeze.self
skychanger.freeze.others
skychanger.freeze.radius.[* OR limit]
skychanger.freeze.world.*
skychanger.freeze.world.[world]
skychanger.freeze.all
skychanger.bypasslimit
skychanger.reload
#-----------------------------------------------
# Sky Changer Config
#-----------------------------------------------
# DO NOT CHANGE THIS VALUE.
# CHANGING IT COULD RESULT IN DATA LOSS.
ConfigVersion: 1.0
#--------------[General Settings]---------------
general_settings:
# Upper packet limit. Scientific notation is accepted.
# Must be less than 3.4028236E38 or there will be no limit.
upper_limit: 50.0
# Lower packet limit. Scientific notation is accepted.
# Must be greater than -3.4028236E38 or there will be no limit.
lower_limit: -50.0
# Choose the language of this plugin. The value must be supported
# and follow the format "language_COUNTRY". For example en_US.
# Submit Translations: https://github.com/dscalzi/SkyChanger/wiki/Translation-Guide
# Supported languages:
# - en_US (English, United States)
# - it_IT (Italiano, Italia)
# - de_DE (Deutsche, Deutschland)
# - nl_NL (Nederlands, Nederland)
# - es_EC (Español, Ecuador)
# - es_AR (Español, Argentina)
# - no_NO (Norsk, Norge)
# - iw_IL (ישראל, עברית)
# - hu_HU (Magyar, Magyarország)
# - zh_CN (简体中文, 中国)
# - ja_JP (日本語, 日本)
# - fr_FR (Français, France)
language: en_US
SkyChanger has built-in multilanguage support. If you wish to change the language of the plugin all you need to do is change the language value in the configuration file. The supported languages will be listed there, however note that the list will not be updated in the config each time you update the plugin. The list is only updated when you regenerate the config file or copy the current one from the wiki section above. Even though the list may not be updated, the languages supported by your version of the plugin will still be accessible.
Currently Supported Languages
- English, United States (en_US)
- Italiano, Italia (it_IT)
- Deutsche, Deutschland (de_DE)
- Nederlands, Nederland (nl_NL)
- Español, Ecuador (es_EC)
- Español, Argentina (es_AR)
- Norsk, Norge (no_NO)
- ישראל, עברית (iw_IL)
- Magyar, Magyarország (hu_HU)
- 简体中文, 中国 (zh_CN)
- 日本語, 日本 (ja_JP)
- Français, France (fr_FR)
If you would like to contribute your language or correct an incorrect translation, follow this quick guide.
Translation Credits: Daniel Scalzi (English, Italiano), Kenzie667 (Deutsche), Casper (Nederlands), Essi (Español), Ørjan Oliversen (Norsk), Amit (עברית), montlikadani (Magyar), Richard Zheng (简体中文), JanMaki (日本語), Superkooka (Français, France)
If you want to hook SkyChanger into your own plugin or simply want to extend functionality, you may use the provided API. If you feel the API is missing anything, or should be changed, please let us know.
SkyChanger 5.x+ will be hosted on GitHub packages. See https://github.com/dscalzi/SkyChanger/packages SkyChanger 4.x and earlier were hosted on jcenter, which shutdown.
Javadocs are not hosted, however they are provided on the maven repository.
See https://docs.github.com/articles/configuring-gradle-for-use-with-github-package-registry/ to learn more.
dependencies {
// For Bukkit
implementation 'com.dscalzi:skychanger-bukkit:VERSION'
// For Sponge
implementation 'com.dscalzi:skychanger-sponge:VERSION'
}
See https://docs.github.com/articles/configuring-apache-maven-for-use-with-github-package-registry/ to learn more.
<!-- For Bukkit -->
<dependency>
<groupId>com.dscalzi</groupId>
<artifactId>skychanger-bukkit</artifactId>
<version>VERSION</version>
</dependency>
<!-- For Sponge -->
<dependency>
<groupId>com.dscalzi</groupId>
<artifactId>skychanger-sponge</artifactId>
<version>VERSION</version>
</dependency>
/**
* Example usage of the API. The following implementation
* would not be practical, it exists only to demonstrate
* the API capabilities.
*
* @param player The player to experiment on.
*/
public void skychangerTests(Player player) {
// Get a reference to the API.
final SkyAPI api = SkyChanger.getAPI();
// Change the sky and save the result.
// Equivalent to /SkyChanger 3
boolean result1 = api.changeSky(SkyChanger.wrapPlayer(player), SkyPacket.RAIN_LEVEL_CHANGE, 3F);
if(result1) {
player.sendMessage("Why did the sky turn red?");
}
// Equivalent to /SkyChanger 4 8
boolean result2 = api.changeSky(SkyChanger.wrapPlayer(player), SkyPacket.RAIN_LEVEL_CHANGE, 4F)
&& api.changeSky(SkyChanger.wrapPlayer(player), SkyPacket.THUNDER_LEVEL_CHANGE, 8F);
if(result2) {
player.sendMessage("Why did the sky turn light blue?");
}
// Freeze the player.
boolean result3 = api.freeze(SkyChanger.wrapPlayer(player));
if(result3) {
player.sendMessage("Where did the land go?");
// Unfreeze the player.
result3 = api.unfreeze(SkyChanger.wrapPlayer(player));
if(result3) {
player.sendMessage("You've been unfrozen! Press (F3 + A) to reload chunks.");
}
}
}
All screenshots taken with Optifine and with both rain and rain particles off.
Packet 0 at Night
Packet -1 at Night
Packet 0 at Day
Packet 2 at Day
Packet 3 at Day
Packet 4 at Day
Packet 5 at Day
Packet 6 at Day
Packet 7 at Day
Packet 8 at Day
Packet 15 at Day
Packet 7 with NightVision at Day
Any magnitude larger than 3.4028236E38 at day
Packet -1 at Night while Frozen
/SkyChanger 3 10 at Day while frozen.
/SkyChanger 4 10 at Day