mirror of
https://github.com/IntellectualSites/PlotSquared.git
synced 2024-11-24 12:16:44 +01:00
Fix some inbox issues
This commit is contained in:
parent
9b043b7444
commit
2b3ecc178a
@ -27,6 +27,7 @@ package com.plotsquared.core.command;
|
||||
|
||||
import com.google.inject.TypeLiteral;
|
||||
import com.plotsquared.core.configuration.caption.StaticCaption;
|
||||
import com.plotsquared.core.configuration.caption.Templates;
|
||||
import com.plotsquared.core.configuration.caption.TranslatableCaption;
|
||||
import com.plotsquared.core.permissions.Permission;
|
||||
import com.plotsquared.core.player.MetaDataAccess;
|
||||
@ -196,8 +197,9 @@ public class Inbox extends SubCommand {
|
||||
if (args.length != 3) {
|
||||
player.sendMessage(
|
||||
TranslatableCaption.of("commandconfig.command_syntax"),
|
||||
Template.of("value", "/plot inbox " + inbox.toString() + " delete <index>")
|
||||
Template.of("value", "/plot inbox " + inbox + " delete <index>")
|
||||
);
|
||||
return true;
|
||||
}
|
||||
final int index;
|
||||
try {
|
||||
@ -205,14 +207,14 @@ public class Inbox extends SubCommand {
|
||||
if (index < 1) {
|
||||
player.sendMessage(
|
||||
TranslatableCaption.of("comment.not_valid_inbox_index"),
|
||||
Template.of("number", index + "")
|
||||
Templates.of("number", index)
|
||||
);
|
||||
return false;
|
||||
}
|
||||
} catch (NumberFormatException ignored) {
|
||||
player.sendMessage(
|
||||
TranslatableCaption.of("commandconfig.command_syntax"),
|
||||
Template.of("value", "/plot inbox " + inbox.toString() + " delete <index>")
|
||||
Template.of("value", "/plot inbox " + inbox + " delete <index>")
|
||||
);
|
||||
return false;
|
||||
}
|
||||
@ -223,7 +225,7 @@ public class Inbox extends SubCommand {
|
||||
if (index > value.size()) {
|
||||
player.sendMessage(
|
||||
TranslatableCaption.of("comment.not_valid_inbox_index"),
|
||||
Template.of("number", index + "")
|
||||
Templates.of("number", index)
|
||||
);
|
||||
return;
|
||||
}
|
||||
|
@ -2508,8 +2508,8 @@ public class SQLManager implements AbstractDB {
|
||||
PlotComment comment =
|
||||
new PlotComment(world, id, msg, sender, inbox, timestamp);
|
||||
comments.add(comment);
|
||||
whenDone.value = comments;
|
||||
}
|
||||
whenDone.value = comments;
|
||||
}
|
||||
TaskManager.runTask(whenDone);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user