Fix setDescription on home and warp description updating the name causing cascading issues; made description field no longer final.

This commit is contained in:
William278 committed 2021-04-14 13:32:07 +01:00
1 parent a15c8cf2ab
commit 478288a832
2 files changed
+4 -4

No files matched your search

@@ -16,7 +16,7 @@ import java.util.UUID;
public class Home extends TeleportationPoint { public class Home extends TeleportationPoint {
private String name; private String name;
private final String description; private String description;
private boolean isPublic; private boolean isPublic;
private UUID ownerUUID; private UUID ownerUUID;
@@ -140,7 +140,7 @@ public class Home extends TeleportationPoint {
* @param description the new Home description * @param description the new Home description
*/ */
public void setDescription(String description) { public void setDescription(String description) {
this.name = description; this.description = description;
} }
// Returns the maximum number of set homes a player can make // Returns the maximum number of set homes a player can make
@@ -14,7 +14,7 @@ import org.bukkit.permissions.PermissionAttachmentInfo;
public class Warp extends TeleportationPoint { public class Warp extends TeleportationPoint {
private String name; private String name;
private final String description; private String description;
/** /**
* An object representing an in-game warp * An object representing an in-game warp
@@ -69,7 +69,7 @@ public class Warp extends TeleportationPoint {
* @param description the new Warp description * @param description the new Warp description
*/ */
public void setDescription(String description) { public void setDescription(String description) {
this.name = description; this.description = description;
} }
// Returns if the player has permission to access the warp // Returns if the player has permission to access the warp