mirror of
https://github.com/PlayPro/CoreProtect.git
synced 2025-02-18 02:02:29 +01:00
Added primary thread error when running a rollback via API (implements #456)
This commit is contained in:
parent
4bf4f4eb92
commit
da227afe33
@ -546,6 +546,9 @@ public class CoreProtectAPI extends Queue {
|
||||
boolean verbose = false;
|
||||
result = Rollback.performRollbackRestore(statement, null, uuids, restrictUsers, null, restrictBlocks, excludeBlocks, excludeUsers, actionList, location, argRadius, startTime, endTime, restrictWorld, false, verbose, action, 0);
|
||||
}
|
||||
else {
|
||||
Chat.console(Phrase.build(Phrase.PRIMARY_THREAD_ERROR));
|
||||
}
|
||||
}
|
||||
|
||||
statement.close();
|
||||
|
@ -176,6 +176,7 @@ public class Language {
|
||||
phrases.put(Phrase.PREVIEW_CANCELLING, "Cancelling preview...");
|
||||
phrases.put(Phrase.PREVIEW_IN_GAME, "You can only preview rollbacks in-game.");
|
||||
phrases.put(Phrase.PREVIEW_TRANSACTION, "You can't preview {container|inventory} transactions.");
|
||||
phrases.put(Phrase.PRIMARY_THREAD_ERROR, "That API method can't be used on the primary thread.");
|
||||
phrases.put(Phrase.PURGE_ABORTED, "Purge failed. Database may be corrupt.");
|
||||
phrases.put(Phrase.PURGE_ERROR, "Unable to process {0} data!");
|
||||
phrases.put(Phrase.PURGE_FAILED, "Purge failed. Please try again later.");
|
||||
|
@ -159,6 +159,7 @@ public enum Phrase {
|
||||
PREVIEW_CANCELLING,
|
||||
PREVIEW_IN_GAME,
|
||||
PREVIEW_TRANSACTION,
|
||||
PRIMARY_THREAD_ERROR,
|
||||
PURGE_ABORTED,
|
||||
PURGE_ERROR,
|
||||
PURGE_FAILED,
|
||||
|
Loading…
Reference in New Issue
Block a user