File tree Expand file tree Collapse file tree
java/fr/fluffevent/fluffyteams Expand file tree Collapse file tree Original file line number Diff line number Diff line change 55
66 <groupId >fr.fluffevent.fluffyteams</groupId >
77 <artifactId >FluffyTeams</artifactId >
8- <version >0.1.0 -SNAPSHOT</version >
8+ <version >0.1.1 -SNAPSHOT</version >
99
1010 <repositories >
1111 <repository >
Original file line number Diff line number Diff line change @@ -40,6 +40,13 @@ public class Config {
4040 */
4141 public static boolean overrideBedRespawnLocation = false ;
4242
43+ /**
44+ * Whether to override the player's anchor respawn location with team spawn.
45+ * If true, players will always respawn at their team spawn instead of their
46+ * anchors.
47+ */
48+ public static boolean overrideAnchorRespawnLocation = false ;
49+
4350 /**
4451 * Loads configuration values from config.yml.
4552 * Creates the default configuration file if it doesn't exist.
@@ -56,5 +63,6 @@ public static void readConfig(JavaPlugin plugin) {
5663 databasePassword = config .getString ("database-password" );
5764 serverName = config .getString ("server-name" );
5865 overrideBedRespawnLocation = config .getBoolean ("override-bed-respawn-location" , false );
66+ overrideAnchorRespawnLocation = config .getBoolean ("override-anchor-respawn-location" , false );
5967 }
6068}
Original file line number Diff line number Diff line change @@ -352,6 +352,7 @@ public boolean removeOfflineMember(String username) {
352352 // If couldn't get UUID from Mojang, try with Bukkit's offline player (for
353353 // players who have connected before)
354354 if (playerUUID == null ) {
355+ @ SuppressWarnings ("deprecation" )
355356 OfflinePlayer offlinePlayer = Bukkit .getOfflinePlayer (username );
356357 if (offlinePlayer .hasPlayedBefore ()) {
357358 playerUUID = offlinePlayer .getUniqueId ();
Original file line number Diff line number Diff line change @@ -23,7 +23,11 @@ public PlayerRespawnListener() {
2323 public void onPlayerRespawn (PlayerRespawnEvent event ) {
2424 Player player = event .getPlayer ();
2525
26- if (player .getBedLocation () != null && !Config .overrideBedRespawnLocation ) {
26+ if (event .isBedSpawn () && !Config .overrideBedRespawnLocation ) {
27+ return ;
28+ }
29+
30+ if (event .isAnchorSpawn () && !Config .overrideAnchorRespawnLocation ) {
2731 return ;
2832 }
2933
Original file line number Diff line number Diff line change @@ -5,3 +5,4 @@ database-password: "password"
55
66server-name : " default"
77override-bed-respawn-location : false
8+ override-anchor-respawn-location : false
Original file line number Diff line number Diff line change 11name : FluffyTeams
22main : fr.fluffevent.fluffyteams.FluffyTeams
3- version : 0.1.0 -SNAPSHOT
3+ version : 0.1.1 -SNAPSHOT
44api-version : 1.21
55author : FluffEvent
66authors : [lululombard]
You can’t perform that action at this time.
0 commit comments