11 Commits

Author SHA1 Message Date
Dylan K. Taylor
38d6284671
Use PHP-CS-Fixer to enforce file header presence 2022-06-04 17:34:49 +01:00
Dylan K. Taylor
7bc3dcdefd
Modernize private property declarations in src/player 2022-05-17 21:36:51 +01:00
Dylan K. Taylor
373880e582
Replace disallowed operators in src/player/ 2022-01-20 19:16:00 +00:00
Dylan K. Taylor
614891f8a2 OfflinePlayer no longer depends on Server
it also doesn't provide stuff like isOnline() (you had to have a Server reference to get an OfflinePlayer anyway, just ask the Server if the player is online ...) and getPlayer().
2020-11-28 21:29:41 +00:00
Dylan K. Taylor
c102477f91 OfflinePlayer: remove more useless junk
to obtain an OfflinePlayer instance you had to have a server instance to start with, which means getServer() is pointless, and also that isOp() and setOp() (which can be removed thanks to the fact that OfflinePlayer is not a Permissible) can be done by just asking the server.
2020-11-28 21:16:04 +00:00
Dylan K. Taylor
8cf589eedd Strip some junk out of IPlayer
these methods have better pathways through Server directly.
Also, setBanned() does not allow customising the reason for banning or the duration, nor does isBanned() account for IP bans because the code is so old ... better to force dependence on a central code path to avoid these inconsistencies.
I want to do the same thing for OP, but that's a separate problem due to its effects on the permission system.
2020-11-28 15:36:46 +00:00
Dylan K. Taylor
279abb871d Remove all usages of CompoundTag->hasTag()
in pretty much every case, these usages really wanted to read the tag's contents anyway, which can be combined with a getTag() and instanceof call for more concise and static analysis friendly code.
In the few cases where the tag contents wasn't needed, it still wanted to check the type, which, again, can be done in a more static analysis friendly way by just using getTag() and instanceof.
2020-07-10 21:01:43 +01:00
Dylan K. Taylor
67bcc1c0fb phpdoc armageddon for master, pass 1 2020-01-22 11:55:03 +00:00
Dylan K. Taylor
3ee6887792 populate remaining missing return types, using native returns where possible
this is done separately to stable so that stable changes can be integrated easily using an empty merge.
2020-01-19 10:26:35 +00:00
Dylan K. Taylor
1866de269b OfflinePlayer: fix reading wrong NBT type in getFirstPlayed(), close #3112
This bug was introduced by 65927e69651652917c928990fb8643cfa33f0096.
2019-09-04 07:59:28 +01:00
Dylan K. Taylor
5499ac620c Removed pocketmine subdirectory, map PSR-4 style 2019-07-30 19:14:57 +01:00