Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Weather System Implementation #6477

Draft
wants to merge 35 commits into
base: minor-next
Choose a base branch
from
Draft

Conversation

KnosTx
Copy link

@KnosTx KnosTx commented Oct 27, 2024

Introduction

Adding Weather System

Changes

API changes

Added WeatherCommand
Added permission pocketmine.command.weather
Added file in src/world/weather

  • WeatherManager
  • WeatherType

Added method in src/Server.php

  • toggleWeather

Added method in src/world/World.php getWeatherManager
Requires translations:

Tests

I tested this PR by doing the following (tick all that apply):

  • Writing PHPUnit tests (commit these in the tests/phpunit folder)
  • Playtesting using a Minecraft client (provide screenshots or a video)
  • Writing a test plugin (provide the code and sample output)
  • Other (provide details)

@KnosTx KnosTx changed the title Adding Weather System Implementation Weather System Implementation Oct 27, 2024
@GameParrot
Copy link
Contributor

There should be an option in the config and a method to disable the weather cycle and an event for when weather changes
Lightning bolts should also be added

@@ -106,6 +106,7 @@ public static function registerCorePermissions() : void{
self::registerPermission(new Permission(Names::COMMAND_UNBAN_IP, l10n::pocketmine_permission_command_unban_ip()), [$operatorRoot]);
self::registerPermission(new Permission(Names::COMMAND_UNBAN_PLAYER, l10n::pocketmine_permission_command_unban_player()), [$operatorRoot]);
self::registerPermission(new Permission(Names::COMMAND_VERSION, l10n::pocketmine_permission_command_version()), [$everyoneRoot]);
self::registerPermission(new Permission(Names::COMMAND_WEATHER, "Changing the weather in the world"));

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

??

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

a direct translation should be created l10n::pocketmine_permission_command_weather()

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I forgot to change the permission to the correct word

@KnosTx KnosTx marked this pull request as draft October 28, 2024 07:29
@ShockedPlot7560
Copy link
Member

Why not using the world's gamerule? It's not a plugin, you don't add as many config files as there are systems.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants