Dylan K. Taylor
a70bd115f1
Moved console-specific stuff to its own namespace
...
this stuff has different functionality than everything else in the
command namespace (specifically console handling), so it doesn't belong
in here.
I know that this will probably break some plugins, but I don't care,
because plugins shouldn't have been abusing ConsoleCommandSender in the
first place.
2021-06-26 19:24:46 +01:00
Dylan K. Taylor
bf7d69b69e
Stop hardcoding permission names everywhere
...
using strings for permission names is nearly as shitty, but this is at least cross-referencable and statically analysable.
2021-06-26 19:14:51 +01:00
Dylan K. Taylor
981b0285d1
Isolate config casting nastiness in one place
...
this doesn't solve the underlying problem, but it does reduce the amount of noise made by PHPStan about it, as well as avoiding code litter.
2021-06-19 19:14:02 +01:00
Dylan K. Taylor
2bc0f9f7a2
TimingsCommand: do not enable timings if they are already enabled
...
this causes timings to be reset, which is potentially undesirable (loss of already-collected timing data).
closes #4194
2021-04-27 22:39:13 +01:00
Dylan K. Taylor
b844c4266d
Added World::Y_MIN
...
preparation for Y axis expansion in 1.17
2021-03-17 23:19:49 +00:00
Dylan K. Taylor
b3c6c11b20
BulkCurlTask now accepts a closure callback for onCompletion
...
this requires much less boilerplate code than an anonymous class.
2021-03-16 23:56:14 +00:00
Dylan K. Taylor
c5693598aa
BulkCurlTask constructor now accepts BulkCurlTaskOperation[] instead of shaped arrays
2020-12-20 22:18:03 +00:00
Dylan K. Taylor
5282ae3298
TimingsHandler::printTimings() now returns a list of strings instead of requiring a resource
2020-12-09 22:32:32 +00:00
Ifera
c4b47c6c06
Implemented /clear command ( #3854 )
...
closes #3854
2020-12-06 15:26:12 +00:00
Dylan K. Taylor
5e44d5f75e
Do not load playerdata from disk just to op/deop/whitelist/dewhitelist
...
this is an impressively dumb idea.
the playerdata is not used here in any capacity so it doesn't make sense to load it, especially considering that it takes a significant amount of time.
2020-11-27 18:12:45 +00:00
Dylan K. Taylor
870d237260
BlockFactory::get() second parameter is now mandatory
2020-11-18 00:50:01 +00:00
Dylan K. Taylor
7469f28f24
Server: rename getPlayer() to getPlayerByPrefix()
...
closes #3910
the existing naming was misleading, and many plugin devs assumed that it returns an exact match. However, this is not guaranteed, and it's possible for two different players to match the same prefix.
- There is no defined behaviour for what happens when multiple players can equally match a prefix (e.g. 'fr' could match 'fred' or 'frog' equally, because the name lengths are the same)
- A prefix might match a different player at a different time (e.g. 'fr' could match 'freddie' before 'fred' joins, after which it will match 'fred' instead)
With these flaws in mind, it's better to break compatibility on this to make the intent more clear, and to make plugin developers reassess their usages of this method. In most non-command use cases, they should likely be using getPlayerExact() instead.
2020-11-14 15:49:41 +00:00
Dylan K. Taylor
2e1239f77a
EnchantCommand no longer accepts numeric enchantment IDs
2020-10-24 17:33:17 +01:00
Muqsit Rayyan
3b632a8deb
Handle InvalidArgumentException thrown by VanillaEnchantments::fromString ( #3878 )
2020-10-24 06:43:14 +01:00
Dylan K. Taylor
a01c086481
Introduced VanillaEnchantments registry
2020-10-23 20:48:19 +01:00
Dylan K. Taylor
44e446b621
Merge remote-tracking branch 'origin/stable' into master
...
# Conflicts:
# build/php
# composer.lock
# phpstan.neon.dist
# resources/vanilla
# src/pocketmine/Server.php
# src/pocketmine/VersionInfo.php
# src/pocketmine/entity/Entity.php
# src/pocketmine/lang/locale
# src/utils/Timezone.php
# tests/phpstan/bootstrap.php
# tests/phpstan/configs/custom-leveldb.neon
2020-10-13 17:51:49 +01:00
Dylan K. Taylor
46c57e4e24
TimingsCommand: fixed crash on result handling
...
since AsyncTask->getResult() returns mixed, phpstan has no idea what is being returned here, so it doesn't report any errors.
2020-10-11 11:35:03 +01:00
Dylan K. Taylor
75e3a0aa0f
Merge branch 'stable' into master
...
# Conflicts:
# composer.lock
# resources/vanilla
# src/command/defaults/StatusCommand.php
# src/pocketmine/entity/Entity.php
# src/pocketmine/level/format/SubChunk.php
2020-09-26 13:27:08 +01:00
Dylan K. Taylor
bc52a38922
Improved network bandwidth data collection
2020-07-21 19:21:27 +01:00
Dylan K. Taylor
977f9ec497
Merge branch 'stable'
...
# Conflicts:
# composer.lock
# resources/vanilla
# src/VersionInfo.php
# src/pocketmine/block/Podzol.php
2020-07-21 11:57:24 +01:00
Dylan K. Taylor
991abe8864
Merge commit 'fb6491dde'
...
# Conflicts:
# resources/vanilla
2020-07-04 22:25:56 +01:00
Dylan K. Taylor
5cf74fc16b
Merge commit '3b961d0e5'
...
# Conflicts:
# resources/vanilla
2020-07-04 22:25:23 +01:00
Dylan K. Taylor
76cf3b7aa5
Merge commit 'a60fc4cc2'
...
# Conflicts:
# resources/vanilla
2020-07-04 22:24:33 +01:00
Dylan K. Taylor
373783d99b
Merge commit 'b747899fd'
...
# Conflicts:
# resources/vanilla
2020-07-04 22:23:26 +01:00
Dylan K. Taylor
670ad9eb9d
Position: rename getWorldNonNull() to getWorld(), remove original getWorld()
2020-06-29 21:19:46 +01:00
Dylan K. Taylor
52fd1a8c1d
CommandSender: export getLanguage()
...
this currently serves as a proxy to the server main language, but it can be used by third party implementations to choose a non-Server language.
2020-06-22 20:05:23 +01:00
Dylan K. Taylor
1f90aa07aa
Merge branch 'stable'
...
# Conflicts:
# resources/vanilla
# src/command/defaults/TeleportCommand.php
# src/pocketmine/event/entity/EntityDespawnEvent.php
# src/pocketmine/event/entity/EntityInventoryChangeEvent.php
# src/pocketmine/event/entity/EntityLevelChangeEvent.php
# src/pocketmine/event/entity/EntitySpawnEvent.php
# tests/phpstan/configs/actual-problems.neon
2020-06-21 00:30:45 +01:00
Dylan K. Taylor
5a8633f6c0
Merge commit '409c8c170'
...
# Conflicts:
# resources/vanilla
2020-06-13 11:57:58 +01:00
Dylan K. Taylor
da3ba1e2b2
Merge commit 'a27b29897'
...
# Conflicts:
# resources/vanilla
2020-06-13 11:28:03 +01:00
Dylan K. Taylor
b2f182b196
Merge commit 'd234d3e45'
...
# Conflicts:
# resources/vanilla
# src/pocketmine/command/defaults/ParticleCommand.php
2020-06-03 12:55:46 +01:00
Dylan K. Taylor
fe649d8d70
Extract ServerConfigGroup from Server
...
this API isn't very nice, but it's pretty much the same as the original, and at least this can be _kinda_ unit-tested...
2020-05-24 15:48:03 +01:00
Dylan K. Taylor
14dd7f306b
Merge commit '45c89d084'
...
# Conflicts:
# resources/vanilla
# src/command/defaults/TimeCommand.php
2020-05-23 11:14:12 +01:00
Dylan K. Taylor
81dff6d4c5
Merge branch 'next-minor'
2020-05-19 21:32:44 +01:00
Dylan K. Taylor
232ff838db
Merge commit '22b5de09b476a8c1638adfaba56b210c1eb1faf0'
...
# Conflicts:
# resources/vanilla
# src/pocketmine/level/particle/InstantEnchantParticle.php
# src/world/sound/ExplodeSound.php
2020-05-18 20:30:00 +01:00
Dylan K. Taylor
86db3af896
remove utils\Color, use new pocketmine/color class
...
we're so close to separating protocol from core !!!
2020-05-14 20:38:08 +01:00
Dylan K. Taylor
11ef9fb0c0
Item-from-string parsing no longer depends on ItemIds
...
after this is done I'm banning the constant() function.
2020-05-13 00:18:49 +01:00
Dylan K. Taylor
5a94af40e2
Convert ItemFactory to singleton
2020-04-24 00:18:31 +01:00
Dylan K. Taylor
13d784cd0c
Convert BlockFactory to singleton
2020-04-23 23:45:13 +01:00
Muqsit
5a33dbd4c6
Player: drop isAdmin from kick(), closes #3275
2020-04-19 18:27:37 +01:00
Dylan K. Taylor
86e051b7bf
Merge commit 'a2543ff80d2906bccda1a4e2fdbd9d8e7d147fb3'
2020-04-18 17:33:05 +01:00
Dylan K. Taylor
7b3c2a3703
Merge commit '3907a2b6ba58fa49022e3e7c8256731dfa2e0d00'
2020-03-14 13:32:35 +00:00
Dylan K. Taylor
fb1126797a
Merge branch 'stable'
2020-02-07 18:13:55 +00:00
Dylan K. Taylor
cb16f5c142
Merge commit '260ac47588c76a2e6814cfba46773a990fb8c5da'
...
# Conflicts:
# resources/vanilla
# src/Server.php
# src/lang/Language.php
# src/network/mcpe/protocol/AddItemActorPacket.php
# src/network/mcpe/protocol/AddPlayerPacket.php
# src/network/mcpe/protocol/SetActorDataPacket.php
# src/network/mcpe/serializer/NetworkBinaryStream.php
# src/permission/Permission.php
# src/pocketmine/block/Leaves.php
# src/pocketmine/entity/DataPropertyManager.php
# src/pocketmine/entity/Entity.php
# src/pocketmine/item/Banner.php
# src/pocketmine/item/Item.php
# src/pocketmine/level/format/io/LevelProvider.php
# src/pocketmine/level/format/io/LevelProviderManager.php
# src/pocketmine/network/mcpe/protocol/AddActorPacket.php
# src/pocketmine/network/mcpe/protocol/LoginPacket.php
# src/pocketmine/tile/Banner.php
# src/scheduler/BulkCurlTask.php
# src/updater/AutoUpdater.php
# src/utils/Config.php
# src/utils/Utils.php
# src/world/generator/Flat.php
# src/world/generator/Generator.php
2020-01-31 21:07:34 +00:00
Dylan K. Taylor
dedf81a9af
Merge commit 'e61c3e8bf697e5c5c6cddb4843b24279faaf25cb'
2020-01-31 19:12:32 +00:00
Dylan K. Taylor
25ead18369
Merge commit '7ce6c8aa13bd1e8eb5aa3fe267a0116ab43e9313'
2020-01-31 18:55:49 +00:00
Dylan K. Taylor
055b13a6cf
strip extra blank lines (php-cs-fixer)
2020-01-22 15:14:10 +00:00
Dylan K. Taylor
67bcc1c0fb
phpdoc armageddon for master, pass 1
2020-01-22 11:55:03 +00:00
Dylan K. Taylor
d3d7709ead
Merge branch 'next-minor'
2019-12-03 11:55:45 +00:00
Dylan K. Taylor
6d24760174
Merge branch 'stable'
2019-10-20 21:25:39 +01:00
Dylan K. Taylor
262dbc0346
ParticleCommand: fixup for 6e9d2e1c8af7d9debc6ed14f98e4f54d29753625
2019-09-23 11:54:17 +01:00