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