40 Commits

Author SHA1 Message Date
Lulu13022002
9e873f50d3
Fix inconsistencies between offline/online spawn position getter (#11960) 2025-04-29 14:57:36 +02:00
Nassim Jahnke
f00727c57e
1.21.5
Co-authored-by: Bjarne Koll <git@lynxplay.dev>
Co-authored-by: Jake Potrebic <jake.m.potrebic@gmail.com>
Co-authored-by: Lulu13022002 <41980282+Lulu13022002@users.noreply.github.com>
Co-authored-by: MiniDigger | Martin <admin@minidigger.dev>
Co-authored-by: Nassim Jahnke <nassim@njahnke.dev>
Co-authored-by: Noah van der Aa <ndvdaa@gmail.com>
Co-authored-by: Owen1212055 <23108066+Owen1212055@users.noreply.github.com>
Co-authored-by: Shane Freeder <theboyetronic@gmail.com>
Co-authored-by: Spottedleaf <Spottedleaf@users.noreply.github.com>
Co-authored-by: Tamion <70228790+notTamion@users.noreply.github.com>
Co-authored-by: Warrior <50800980+Warriorrrr@users.noreply.github.com>
2025-04-12 17:27:00 +02:00
Jason Penilla
61312fdb59
Switch to jspecify annotations for Player (#12042)
Fixes compilation issues for plugins from recent API addition with double-annotated parameter (JetBrains annotations are type-use and parameter, so nonnull array of nonnull elements ends up with duplicates)
2025-02-08 20:57:35 +01:00
Lulu13022002
6dfba7e0c7 Add Offline PDC API 2022-07-09 17:17:04 +02:00
Aeltumn
71fdafca71 Add OfflinePlayer#isConnected
This adds an alternative to OfflinePlayer#isOnline that returns true only if the same instance of the player is still online. This is generally more useful than isOnline as it allows you to determine if you have an instance of a Player that still exists. If a player relogs an old Player instance becomes unlinked leading to e.g. messages sent to the old player no longer arriving despite isOnline returning true. Checking against isConnected is more useful there to discard invalid instances.
2023-08-24 13:05:07 +02:00
Jake Potrebic
1ce71b513e Fix BanList API 2023-07-04 11:27:18 -07:00
Zach Brown
9b814929a7 Add APIs to replace OfflinePlayer#getLastPlayed
Currently OfflinePlayer#getLastPlayed could more accurately be described
as "OfflinePlayer#getLastTimeTheirDataWasSaved".

The API doc says it should return the last time the server "witnessed"
the player, whilst also saying it should return the last time they
logged in. The current implementation does neither.

Given this interesting contradiction in the API documentation and the
current defacto implementation, I've elected to deprecate (with no
intent to remove) and replace it with two new methods, clearly named and
documented as to their purpose.
2019-01-02 00:31:12 -06:00
Aikar
92482f8e92 Add Ban Methods to Player Objects
Allows a more logical API for banning players.

player.banPlayer("Breaking the rules");
2018-04-28 10:28:50 -04:00
Aikar
4447307899 Player.setPlayerProfile API
This can be useful for changing name or skins after a player has logged in.
2018-03-18 12:28:55 -04:00
Bukkit/Spigot
0023e5549a #1082: Add "since" to Deprecation annotations
By: DerFrZocker <derrieple@gmail.com>
2024-11-25 07:52:33 +11:00
Bukkit/Spigot
f11f3d9479 #966: Introduce getRespawnLocation as a replacement for getBedSpawnLocation
By: Nothixal <nothixal@gmail.com>
2024-01-22 20:27:07 +11:00
Bukkit/Spigot
a70e6187b4 #956: Add method to get an offline player's location
By: Nothixal <nothixal@gmail.com>
2024-01-15 20:30:38 +11:00
Bukkit/Spigot
4e61eca624 #882: Add modern time API methods to ban API
By: Yannick Lamprecht <yannicklamprecht@live.de>
2023-07-15 10:43:28 +10:00
Bukkit/Spigot
ba835793ed SPIGOT-6455, SPIGOT-7030, #750: Improve ban API
By: Doc <nachito94@msn.com>
2023-07-01 13:55:59 +10:00
Bukkit/Spigot
dcd02753e8 #279: Minor edits to various Javadocs
By: ShanerX <shanerx@shanerx.org>
2023-04-16 09:54:51 +10:00
Bukkit/Spigot
a0619b4d67 SPIGOT-7047: Add Player#getLastDeathLocation
By: Doc <nachito94@msn.com>
2022-06-10 09:56:47 +10:00
Bukkit/Spigot
7c667b37d9 #719: Add Player Profile API
Slight changes may occur as this API is stabilized.

This PR is based on work previously done by DerFrZocker in #663.

By: blablubbabc <lukas@wirsindwir.de>
2022-02-03 09:25:35 +11:00
Bukkit/Spigot
ef82c63b5f #484: Allow statistics to be accessed for offline players
By: SydMontague <sydmontague@phoenix-staffel.de>
2020-04-05 15:58:39 +10:00
Bukkit/Spigot
82854b7bd7 Add Override annotations where appropriate
By: md_5 <git@md-5.net>
2019-04-28 11:37:52 +10:00
Bukkit/Spigot
e9ae9842f0 Apply and enforce import ordering rules
By: md_5 <git@md-5.net>
2019-04-23 14:33:57 +10:00
Bukkit/Spigot
416c865476 SPIGOT-2540: Add nullability annotations to entire Bukkit API
By: Darkyenus <darkyenus@gmail.com>
2019-03-13 17:42:57 +11:00
Bukkit/Spigot
66cea125d6 Minor cosmetic cleanups to imports etc
Please see https://hub.spigotmc.org/stash/projects/SPIGOT/repos/bukkit/pull-requests/389/overview

By: Parker Hawke <hawkeboyz2@hotmail.com>
2018-10-27 14:55:52 -04:00
Bukkit/Spigot
32f414ff58 Remove some more long deprecated methods (3+ years)
By: md_5 <git@md-5.net>
2017-05-14 12:00:00 +10:00
Bukkit/Spigot
07c1670354 Update Bukkit for Minecraft 1.7.8
By: Travis Watkins <amaranth@ubuntu.com>
2014-04-10 20:06:14 -05:00
Bukkit/Spigot
43e2fb9739 Add API for dealing with player UUIDs. Adds BUKKIT-5071, BUKKIT-5501
By: Travis Watkins <amaranth@ubuntu.com>
2014-03-28 21:12:42 -05:00
Bukkit/Spigot
a742349b87 Pulling all pending Bukkit-JavaDoc changes
By: Wesley Wolfe <weswolf@aol.com>
2014-03-24 13:20:52 -05:00
Bukkit/Spigot
4d3aba0a11 Add banning API and resolve associated command issues. Adds BUKKIT-3535.
Fixes BUKKIT-5371 and BUKKIT-4285

Prior to this commit, ban reasons were not supported by banning commands.
Additionally, the player(s) affected by the ban-ip command would not have
been removed from the server via a kick.

The Bukkit API lacked support for modifying various attributes associated
with bans, such as the reason and expiration date. This caused various plugins
to use external or other means to store a ban reason, making the built-in
banning system on the server partially useless.

Now the ban commands will accept reasons for the bans as well as kick the
player from the server once banned. That means that if an IP is banned
that all players using that IP will be removed from the server.

The API provided now supports editing the ban reason, creation date,
expiration date and source. The ban list has also been created to
provide this information more easily. Editing the data requires an
implementing plugin to manually save the information with the provided
method in BanEntry or BanList once changes have been made.

The addition of this API has deprecated the use of OfflinePlayer#setBanned()
as it has been replaced by BanList#addBan().

By: mbax <matt@phozop.net>
2014-02-03 22:16:14 -07:00
Bukkit/Spigot
bb50f1a774 Pulling all pending Bukkit-JavaDoc changes
A special thanks goes to @aerouk for almost all of the changes found here.

By: Wesley Wolfe <weswolf@aol.com>
2013-12-15 01:07:43 -05:00
Bukkit/Spigot
67439804f4 Pulling all pending Bukkit-JavaDoc changes
By: Wesley Wolfe <weswolf@aol.com>
2013-09-10 21:02:53 -05:00
Bukkit/Spigot
761a84cb1b Pulling all pending Bukkit-JavaDoc changes
By: Edmond Poon <sagaciouszzzz@gmail.com>
2013-04-02 00:11:22 -04:00
Bukkit/Spigot
03af91781c Javadoc updates
Fixes BUKKIT-1653, Fixes BUKKIT-1383 and Fixes BUKKIT-1644

By: feildmaster <admin@feildmaster.com>
2012-06-03 05:40:54 -05:00
Bukkit/Spigot
0251111b0d Add Player.setBedSpawnLocation(Location). Thanks md_5
By: Erik Broes <erikbroes@grum.nl>
2012-01-17 22:39:37 +01:00
Bukkit/Spigot
aaab1cba23 Generic cleanup of warnings, whitespace and style.
By: Erik Broes <erikbroes@grum.nl>
2011-12-25 16:02:30 +01:00
Bukkit/Spigot
f6bfce4fa1 Added OfflinePlayer + Player .getLastPlayed, .getFirstPlayed, .hasPlayedBefore
By: Nathan Adams <dinnerbone@dinnerbone.com>
2011-12-12 17:38:27 +00:00
Bukkit/Spigot
71d1bb3e2d Added OfflinePlayer.getPlayer() for getting the online Player object
By: Nathan Adams <dinnerbone@dinnerbone.com>
2011-10-11 14:51:28 +01:00
Bukkit/Spigot
6c7412d365 Added new Configuration classes
By: Dinnerbone <dinnerbone@dinnerbone.com>
2011-09-19 20:36:44 +01:00
Bukkit/Spigot
44188b546a Made OfflinePlayer > AnimalTamer. Thanks to robinjam
By: Dinnerbone <dinnerbone@dinnerbone.com>
2011-09-20 19:04:45 +01:00
Bukkit/Spigot
715dcf90c8 Moved all vanilla commands into Bukkit
By: Dinnerbone <dinnerbone@dinnerbone.com>
2011-09-03 04:37:23 +01:00
Bukkit/Spigot
93040c71de Added new methods to Server, Player and OfflinePlayer for banning and unbanning
By: Dinnerbone <dinnerbone@dinnerbone.com>
2011-09-03 02:13:37 +01:00
Bukkit/Spigot
73b3f6def2 ... Actually push the OfflinePlayer interface!
By: Dinnerbone <dinnerbone@dinnerbone.com>
2011-09-03 00:48:41 +01:00