Commit Graph

15271 Commits

Author SHA1 Message Date
dependabot[bot]
6f0aa360d1 Bump build/php from 19222cf to 8138c6a (#5039)
Bumps [build/php](https://github.com/pmmp/php-build-scripts) from `19222cf` to `8138c6a`.
- [Release notes](https://github.com/pmmp/php-build-scripts/releases)
- [Commits](19222cfb28...8138c6a4a4)

---
updated-dependencies:
- dependency-name: build/php
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-05-16 17:20:24 +01:00
Dylan K. Taylor
2f2ffe0aa4 fix phpstan 2022-05-13 21:03:49 +01:00
Dylan K. Taylor
4430f6c5fd Updated upgrade schemas 2022-05-13 20:51:23 +01:00
Dylan K. Taylor
a75bc5d537 Mojang cannot be relied on ... 2022-05-13 20:50:38 +01:00
Dylan K. Taylor
7c3b78b0a0 ItemFactory: fix missing registration for dead coral fans
closes #5032

this is evidently not an ideal solution, and something more dynamic would be preferred so that we don't have to manually register an item for every permutation.
2022-05-13 13:53:28 +01:00
Dylan K. Taylor
643556a366 Broaden scope of testing for item serializer/deserializer
this change will cause failing tests; it has found a problem with coral fans of which I was previously unaware
2022-05-13 13:35:58 +01:00
Dylan K. Taylor
1a598bdfd8 RuntimeBlockMapping: make constructor more useful
this allows providing more customisable data sources.
2022-05-12 21:20:28 +01:00
Dylan K. Taylor
e27f80fd85 Remove unused code 2022-05-12 21:06:33 +01:00
Dylan K. Taylor
d922f003f6 Fixed consistency check 2022-05-12 20:39:03 +01:00
Dylan K. Taylor
d17032dd8c Test all known blockstates, not just the ones found in VanillaBlocks
VanillaBlocks isn't guaranteed to be a complete record. For example, I've considered moving chemistry blocks to a separate EducationBlocks registry.
In such a case, the blocks are still expected to serialize correctly, but they won't be in VanillaBlocks.
2022-05-12 16:45:44 +01:00
Dylan K. Taylor
4c03aabe0f I'm going to kill myself... 2022-05-12 16:44:21 +01:00
Dylan K. Taylor
3ae9341c52 [BC break] doors don't have a powered flag in Bedrock 2022-05-12 16:43:44 +01:00
Dylan K. Taylor
d10d660a4d fix PHPStan 2022-05-12 16:37:50 +01:00
Dylan K. Taylor
107b0e1728 CS again, kill me 2022-05-12 16:35:12 +01:00
Dylan K. Taylor
7769857f6a Added unit test to verify all VanillaBlocks serialize and deserialize correctly 2022-05-12 16:34:24 +01:00
Dylan K. Taylor
cb97f37d13 First look at modern-spec serializer/deserializer for items
this is not yet used by anything
2022-05-12 16:26:38 +01:00
Dylan K. Taylor
6c92e73b46 Switch to modernized BedrockData 2022-05-12 15:30:35 +01:00
Dylan K. Taylor
c1a01e91bf Merge branch 'next-major' into modern-world-support 2022-05-11 20:46:32 +01:00
Dylan K. Taylor
12e4724b19 Merge remote-tracking branch 'origin/stable' into next-minor 2022-05-11 20:45:16 +01:00
Dylan T
52e74296de Stop the server if any plugin failed to load or enable (#4951)
closes #3080 

If plugins fail to load for some reason, it's highly likely that some critical functionality of the server is compromised. For example:
- if an NPC plugin fails to load, all custom entities added by that plugin will be deleted from worlds
- if a world protection plugin fails, players will be able to grief your otherwise immutable lobby map
- if a worldgen plugin fails, worlds using custom generators won't load
- if a permission plugin fails, players might have access to commands and features they aren't supposed to have
- the list goes on...

This change makes the server commit graceful suicide if any plugin fails to load for error-related reasons, including (but not limited to):
- Incompatible API version
- Missing dependencies
- Invalid plugin.yml
- Invalid main class

Plugins prevented from loading by `plugin_list.yml` are not considered errors and **are not** included in this change. If a plugin is disallowed from loading due to the `plugin_list`, the server will continue to run as if the plugin was not present.
2022-05-11 20:43:38 +01:00
Dylan K. Taylor
3b7e274c34 Server: localize 'forcing server shutdown' message 2022-05-11 14:54:29 +01:00
Dylan K. Taylor
db6abfb227 Stop the server if generators specified for new worlds are not valid
I thought I did this already in eff856d8e5, but it looks like my brain slipped a gear.

Without this change, it's possible to crash the server by specifying an invalid generator for the default world if it doesn't yet exist.
2022-05-11 14:35:20 +01:00
Dylan T
2adaca2521 README: remove unnecessary things
[ci skip]
2022-05-11 13:53:52 +01:00
Dylan T
b6f39035f8 README: fix logo URLs
[ci skip]
2022-05-11 13:52:00 +01:00
XenialDan
cfd550451f Added dark mode variant of the logo (#5014)
Since the text is barely visible on dark mode (black on black), i added an inverted version that only shows with dark mode using the [picture](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/picture) tag.
The tag is supported in all browsers except IE since ~2015
I added an exception block for old IE versions, new versions dropped support for `[if IE]` though
2022-05-11 13:44:20 +01:00
Dylan K. Taylor
60d3bddfbc Merge branch 'next-major' into modern-world-support 2022-05-11 13:14:42 +01:00
Dylan K. Taylor
9ff1bf6deb Merge remote-tracking branch 'origin/stable' into next-minor 2022-05-11 13:12:45 +01:00
Dylan K. Taylor
212c94ce98 PluginManager: Log an error message when a plugin disables itself during enabling 2022-05-11 13:07:45 +01:00
dependabot[bot]
77530b0c24 Bump build/php from 0b5760b to 19222cf (#5027)
Bumps [build/php](https://github.com/pmmp/php-build-scripts) from `0b5760b` to `19222cf`.
- [Release notes](https://github.com/pmmp/php-build-scripts/releases)
- [Commits](0b5760bb3b...19222cfb28)

---
updated-dependencies:
- dependency-name: build/php
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-05-11 12:55:36 +01:00
Dylan K. Taylor
3e1246acff FormattedCommandAlias: Invoke commands directly with pre-parsed arguments
this resolves a range of issues with quoted arguments when using placeholders, as well as improving performance (no redundant combine -> re-parse needed).
2022-05-10 16:03:09 +01:00
Dylan K. Taylor
4c29f98292 "Fix CS" are going to be my final words ... 2022-05-10 15:39:44 +01:00
Dylan K. Taylor
5cc0d92eff Fixed PHPStan errors 2022-05-10 15:38:26 +01:00
Dylan K. Taylor
b875b68fc7 Fix PHPStan error in CommandStringHelperTest 2022-05-10 15:24:14 +01:00
Dylan K. Taylor
a5ebbf8adb Fix CS again 2022-05-10 15:23:55 +01:00
Dylan K. Taylor
217385efb9 CommandStringHelper::parse() returns a non-empty list of strings 2022-05-10 15:22:46 +01:00
Dylan K. Taylor
f70c36baf9 SimpleCommandMap: parse config-defined commands according to the same rules as manually typed commands 2022-05-10 15:21:39 +01:00
Dylan K. Taylor
eda4ae9181 Added unit tests for CommandStringHelper 2022-05-10 15:11:29 +01:00
Dylan K. Taylor
d2e421c424 CommandStringHelper: fixed backslashes not being removed from escaped quotes
this time, without breaking eval commands ... stripslashes likes to strip ALL backslashes, whether they are actually escaping something or not, which is super annoying.
2022-05-10 15:09:57 +01:00
Dylan K. Taylor
6da53536ca Merge branch 'next-minor' of github.com:pmmp/PocketMine-MP into next-minor 2022-05-10 14:30:21 +01:00
Duo Incure
1da6aa40f8 Leaves: drop sticks with a 2% chance (#5019)
as per vanilla
2022-05-10 14:17:18 +01:00
Dylan K. Taylor
a913736235 fix CS 2022-05-10 14:13:01 +01:00
Dylan K. Taylor
124edeacaf fix build 2022-05-10 14:11:46 +01:00
Dylan K. Taylor
a216f4d089 Utils: improve representation of int, float and null in stack trace parameters 2022-05-10 14:07:07 +01:00
Dylan K. Taylor
17b0e0be84 Utils: use match to clean up stringifyValueForTrace() 2022-05-10 14:04:52 +01:00
Dylan K. Taylor
81d8aed2e2 Utils: account for named variadic arguments in printableTrace() 2022-05-10 13:59:42 +01:00
Nick
69418084bc Boat: fixed max stack size to match vanilla (#5018) 2022-05-10 13:16:04 +01:00
Dylan K. Taylor
593a4b65ea World: fixed crash when using unloadChunk() during ChunkPopulateEvent, ChunkLoadEvent or when using ChunkListeners
I sure hope there isn't any other cases where this edge case can appear ...

closes #5022
2022-05-10 13:09:26 +01:00
Dylan K. Taylor
869d340f10 Regenerate PHPStan baselines 2022-05-10 12:38:20 +01:00
Dylan K. Taylor
5d64d4a1e3 Updated phpstan-strict-rules 2022-05-10 12:34:27 +01:00
dependabot[bot]
cc3c5bdb8d Bump phpstan/phpstan from 1.6.7 to 1.6.8 (#5025)
Bumps [phpstan/phpstan](https://github.com/phpstan/phpstan) from 1.6.7 to 1.6.8.
- [Release notes](https://github.com/phpstan/phpstan/releases)
- [Changelog](https://github.com/phpstan/phpstan/blob/1.7.x/CHANGELOG.md)
- [Commits](https://github.com/phpstan/phpstan/compare/1.6.7...1.6.8)

---
updated-dependencies:
- dependency-name: phpstan/phpstan
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-05-10 12:32:22 +01:00