mirror of
https://github.com/IntellectualSites/PlotSquared.git
synced 2025-07-26 00:55:28 +02:00
Lazy initialization
This commit is contained in:
@@ -41,7 +41,7 @@ public class InboxOwner extends CommentInbox {
|
||||
if (plot == null || plot.owner == null) {
|
||||
return false;
|
||||
}
|
||||
ArrayList<PlotComment> comments = plot.settings.getComments(toString());
|
||||
ArrayList<PlotComment> comments = plot.getSettings().getComments(toString());
|
||||
if (comments != null) {
|
||||
whenDone.value = comments;
|
||||
TaskManager.runTask(whenDone);
|
||||
@@ -53,7 +53,7 @@ public class InboxOwner extends CommentInbox {
|
||||
whenDone.value = value;
|
||||
if (value != null) {
|
||||
for (PlotComment comment : (ArrayList<PlotComment>) value) {
|
||||
plot.settings.addComment(comment);
|
||||
plot.getSettings().addComment(comment);
|
||||
}
|
||||
}
|
||||
TaskManager.runTask(whenDone);
|
||||
@@ -67,7 +67,7 @@ public class InboxOwner extends CommentInbox {
|
||||
if (plot == null || plot.owner == null) {
|
||||
return false;
|
||||
}
|
||||
plot.settings.addComment(comment);
|
||||
plot.getSettings().addComment(comment);
|
||||
DBFunc.setComment(plot, comment);
|
||||
return true;
|
||||
}
|
||||
|
@@ -41,7 +41,7 @@ public class InboxPublic extends CommentInbox {
|
||||
if (plot == null || plot.owner == null) {
|
||||
return false;
|
||||
}
|
||||
ArrayList<PlotComment> comments = plot.settings.getComments(toString());
|
||||
ArrayList<PlotComment> comments = plot.getSettings().getComments(toString());
|
||||
if (comments != null) {
|
||||
whenDone.value = comments;
|
||||
TaskManager.runTask(whenDone);
|
||||
@@ -53,7 +53,7 @@ public class InboxPublic extends CommentInbox {
|
||||
whenDone.value = value;
|
||||
if (value != null) {
|
||||
for (PlotComment comment : (ArrayList<PlotComment>) value) {
|
||||
plot.settings.addComment(comment);
|
||||
plot.getSettings().addComment(comment);
|
||||
}
|
||||
}
|
||||
TaskManager.runTask(whenDone);
|
||||
@@ -67,7 +67,7 @@ public class InboxPublic extends CommentInbox {
|
||||
if (plot == null || plot.owner == null) {
|
||||
return false;
|
||||
}
|
||||
plot.settings.addComment(comment);
|
||||
plot.getSettings().addComment(comment);
|
||||
DBFunc.setComment(plot, comment);
|
||||
return true;
|
||||
}
|
||||
|
Reference in New Issue
Block a user