From 40ee11f6446456fd582c609e4c52bfa1deba4597 Mon Sep 17 00:00:00 2001 From: Intelli Date: Tue, 8 Mar 2022 08:39:38 -0700 Subject: [PATCH] CoreProtect v21.0 release --- README.md | 2 +- build.gradle | 2 +- docs/api/index.md | 459 +--------------- docs/api/version/v8.md | 450 ++++++++++++++++ docs/api/version/v9.md | 501 ++++++++++++++++++ docs/commands.md | 15 +- docs/tools-integrations.md | 4 +- lang/de.yml | 8 +- lang/en.yml | 8 +- lang/es.yml | 10 +- lang/fr.yml | 8 +- lang/ja.yml | 8 +- lang/pl.yml | 8 +- lang/ru.yml | 10 +- lang/uk.yml | 8 +- lang/vi.yml | 8 +- lang/zh-cn.yml | 12 +- lang/zh-tw.yml | 14 +- mkdocs.yml | 2 +- pom.xml | 2 +- .../java/net/coreprotect/CoreProtectAPI.java | 2 +- 21 files changed, 1042 insertions(+), 499 deletions(-) create mode 100644 docs/api/version/v8.md create mode 100644 docs/api/version/v9.md diff --git a/README.md b/README.md index 3ce380df..6075de1c 100644 --- a/README.md +++ b/README.md @@ -41,7 +41,7 @@ Maven net.coreprotect coreprotect - 20.4 + 21.0 provided ``` diff --git a/build.gradle b/build.gradle index 5dd16f79..b546004f 100644 --- a/build.gradle +++ b/build.gradle @@ -7,7 +7,7 @@ plugins { } group = 'net.coreprotect' -String projectVersion = '20.4' +String projectVersion = '21.0' String projectBranch = '' version = projectVersion // `version` might be modified, we don't always want that (e.g. plugin.yml) description = 'Provides block protection for your server.' diff --git a/docs/api/index.md b/docs/api/index.md index b4d318d4..974fabdb 100644 --- a/docs/api/index.md +++ b/docs/api/index.md @@ -4,461 +4,8 @@ The CoreProtect API enables you to log your own block changes, perform lookups, | API Details | | | --- | --- | -| **API Version:** | 8 | -| **Plugin Version:** | v20.2+ | +| **API Version:** | 9 | +| **Plugin Version:** | v21.0+ | | **Maven:** | [maven.playpro.com](https://maven.playpro.com) | -*Documentation for the previous API version can be found [here](https://www.minerealm.com/community/viewtopic.php?f=32&t=16687).* - ---- - -## Upgrading from API v6 - -The changes from the previous API version are as follows: - -- The following methods have been added: -```java -parseResult(String[] result).getTimestamp() -``` - ---- - -- The following methods have been deprecated: -```java -parseResult(String[] result).getTime() -``` - ---- - -- The following methods have been removed: -```java -parseResult(String[] result).getTypeId() -``` - ---- - -## Getting Started - -Ensure you're using CoreProtect 20.2 or higher. Add it as an external jar to your plugin in your IDE. -Alternatively, if using Maven, you can add it via the repository [https://maven.playpro.com](https://maven.playpro.com) (net.coreprotect, 20.2). - -The first thing you need to do is get access to CoreProtect. You can do this by using code similar to the following: - -```java -import net.coreprotect.CoreProtect; -import net.coreprotect.CoreProtectAPI; - -private CoreProtectAPI getCoreProtect() { - Plugin plugin = getServer().getPluginManager().getPlugin("CoreProtect"); - - // Check that CoreProtect is loaded - if (plugin == null || !(plugin instanceof CoreProtect)) { - return null; - } - - // Check that the API is enabled - CoreProtectAPI CoreProtect = ((CoreProtect) plugin).getAPI(); - if (CoreProtect.isEnabled() == false) { - return null; - } - - // Check that a compatible version of the API is loaded - if (CoreProtect.APIVersion() < 7) { - return null; - } - - return CoreProtect; -} -``` - -With this code, you can then access the API with a call like the following: - -```java -CoreProtectAPI api = getCoreProtect(); -if (api != null){ // Ensure we have access to the API - api.testAPI(); // Will print out "[CoreProtect] API test successful." in the console. -} -``` - -Yay, you're now using the CoreProtect API! - ---- - -## API Overview - -### Available Methods - -```java -boolean isEnabled() - -void testAPI() - -List performLookup(int time, List restrict_users, List exclude_users, List restrict_blocks, List exclude_blocks, List action_list, int radius, Location radius_location) - -List performRollback(int time, List restrict_users, List exclude_users, List restrict_blocks, List exclude_blocks, List action_list, int radius, Location radius_location) - -List performRestore(int time, List restrict_users, List exclude_users, List restrict_blocks, List exclude_blocks, List action_list, int radius, Location radius_location) - -List blockLookup(Block block, int time) - -ParseResult parseResult(String[] result) - -boolean logChat(Player player, String message) - -boolean logCommand(Player player, String command) - -boolean logPlacement(String user, Location location, Material type, BlockData blockData) - -boolean logRemoval(String user, Location location, Material type, BlockData blockData) - -boolean logContainerTransaction(String user, Location location) - -boolean logInteraction(String user, Location location) - -boolean hasPlaced(String user, Block block, int time, int offset) - -boolean hasRemoved(String user, Block block, int time, int offset) - -void performPurge(int time) -``` - ---- - -### Available Events - -*The following events are emitted by CoreProtect.* - -#### CoreProtectPreLogEvent - -Fired when a CoreProtect logger is about to log an action. Not cancellable. - -| Property | Description | Mutable | -| --- | --- | --- | -| User | The name of the user under which this action will be logged. | Yes | - ---- - -### Method Usage - -*Detailed method information is listed below.* - -#### `isEnabled()` - -Calling this will return true if the server has the CoreProtect API enabled, and false if it does not. - ---- - -#### `testAPI()` - -Running this will print out "[CoreProtect] API Test Successful." in the server console. - ---- - -#### `performLookup(int time, List restrict_users, List exclude_users, List restrict_blocks, List exclude_blocks, List action_list, int radius, Location radius_location)` - -This will perform a lookup. - -* **time:** Specify the amount of time to search back. "5" would return results from the last 5 seconds. -* **restrict_users:** Specify any usernames to perform the lookup on. Can be set to "null" if both a radius and a location are specified. -* **exclude_users:** Specify any usernames to exclude from the lookup. Can be set to "null". -* **restrict_blocks:** Specify a list of EntityType's or Material's to restrict the search to. Can be set to "null". -* **exclude_blocks:** Specify a list of EntityType's or Material's to exclude from the search. Can be set to "null". -* **action_list:** Specify a list of action types to restrict the search to. Can be set to "null" -* **radius:** Specify a radius to restrict the search to. A location must be specified if using this. Set to "0" to disable. -* **radius_location:** Specify a location to search around. Can be set to "null" if no radius is specified, and a user is specified. - ---- - -#### `performRollback(int time, List restrict_users, List exclude_users, List restrict_blocks, List exclude_blocks, List action_list, int radius, Location radius_location)` - -This will perform a rollback. Method must be called async. - -* **time:** Specify the amount of time to rollback. "5" would return results from the last 5 seconds. -* **restrict_users:** Specify any usernames to perform the rollback on. Can be set to "null" if both a radius and a location are specified. -* **exclude_users:** Specify any usernames to exclude from the rollback. Can be set to "null". -* **restrict_blocks:** Specify a list of EntityType's or Material's to restrict the rollback to. Can be set to "null". -* **exclude_blocks:** Specify a list of EntityType's or Material's to exclude from the rollback. Can be set to "null". -* **action_list:** Specify a list of action types to restrict the rollback to. Can be set to "null" -* **radius:** Specify a radius to restrict the rollback to. A location must be specified if using this. Set to "0" to disable. -* **radius_location:** Specify a location to rollback around. Can be set to "null" if no radius is specified, and a user is specified. - ---- - -#### `performRestore(int time, List restrict_users, List exclude_users, List restrict_blocks, List exclude_blocks, List action_list, int radius, Location radius_location)` - -This will perform a restore. - -* **time:** Specify the amount of time to restore. "5" would return results from the last 5 seconds. -* **restrict_users:** Specify any usernames to perform the restore on. Can be set to "null" if both a radius and a location are specified. -* **exclude_users:** Specify any usernames to exclude from the restore. Can be set to "null". -* **restrict_blocks:** Specify a list of EntityType's or Material's to restrict the restore to. Can be set to "null". -* **exclude_blocks:** Specify a list of EntityType's or Material's to exclude from the restore. Can be set to "null". -* **action_list:** Specify a list of action types to restrict the restore to. Can be set to "null" -* **radius:** Specify a radius to restrict the restore to. A location must be specified if using this. Set to "0" to disable. -* **radius_location:** Specify a location to restore around. Can be set to "null" if no radius is specified, and a user is specified. - ---- - -#### `blockLookup(Block block, int time)` - -This will perform a full lookup on a single block. - -* **block:** The block to perform the lookup on. -* **time:** Specify the amount of time to lookup. "5" would return results from the last 5 seconds. - ---- - -#### `ParseResult parseResult(String[] result)` - -This will parse results from a lookup. You'll then be able to view the following: - -* **getX():** Get the X coordinate of the block. -* **getY():** Get the Y coordinate of the block. -* **getZ():** Get the Z coordinate of the block. -* **getType():** Get the Material of the block. -* **getBlockData():** Get the BlockData of the block. -* **getPlayer():** Get the username as a string.. -* **getTimestamp():** Get the time of the action. -* **getActionId():** Get the action ID. (0=removed, 1=placed, 2=interaction) -* **getActionString():** Get the action as a string. (Removal, Placement, Interaction) -* **isRolledBack():** If the block is currently rolled back or not. -* **worldName():** The name of the world the block is located in. - ---- - -#### `logPlacement(String user, Location location, Material type, BlockData blockData)` - -This will log a block as being placed. - -* **user:** Specify the username to log as having placed the block. -* **location:** Specify the location of the block you're logging. -* **type:** Specify the Material of the block you're logging. -* **blockData:** Specify the BlockData of the block you're logging. Can be set to "null". - ---- - -#### `logRemoval(String user, Location location, Material type, BlockData blockData)` - -This will log a block as being removed/broken, and will log the block's inventory (if applicable). - -* **user:** Specify the username to log as having removed the block. -* **location:** Specify the location of the block you're logging. -* **type:** Specify the Material of the block you're logging. -* **blockData:** Specify the BlockData of the block you're logging. Can be set to "null". - ---- - -#### `logContainerTransaction(String user, Location location)` - -This will log any transactions made to a block's inventory immediately after calling the method. - -* **user:** Specify the username to log as having added/removed the items. -* **location:** Specify the location of the block inventory you're logging. - ---- - -#### `logInteraction(String user, Location location)` - -This will log a block as having been interacted with. - -* **user:** Specify the username to log as having caused the interaction. -* **location:** Specify the location of the interaction you're logging. - ---- - -#### `hasPlaced(String user, Block block, int time, int offset)` - -This will return true if a user has already placed a block at the location within the specified time limit. - -* **user:** The username you're checking to see if they've placed a block already. -* **block:** The block you're checking. -* **time:** How far back to check. "5" would only check through the last 5 seconds of logged blocks. -* **offset:** A time offset. "2" would ignore the last 2 seconds of most recently ignored data. (0=no offset) - ---- - -#### `hasRemoved(String user, Block block, int time, int offset)` - -This will return true if a user has already removed a block at the location within the specified time limit. - -* **user:** The username you're checking to see if they've removed a block already. -* **block:** The block you're checking. -* **time:** How far back to check. "5" would only check through the last 5 seconds of logged blocks. -* **offset:** A time offset. "2" would ignore the last 2 seconds of most recently ignored data. (0=no offset) - ---- - -#### `performPurge(int time)` - -This will perform a purge on the CoreProtect database. - -* **time:** Purge any data earlier than this. "120" would purge any data older than 120 seconds (2 minutes). - ---- - - -### Examples - -- Get the last 60 seconds of block data for the user "Notch". -```java -CoreProtectAPI CoreProtect = getCoreProtect(); -if (CoreProtect!=null){ //Ensure we have access to the API - List lookup = CoreProtect.performLookup(60, Arrays.asList("Notch"), null, null, null, null, 0, null); - if (lookup!=null){ - for (String[] result : lookup){ - ParseResult parseResult = CoreProtect.parseResult(result); - int x = parseResult.getX(); - int y = parseResult.getY(); - int z = parseResult.getZ(); - //... - } - } -} -``` - ---- - -- Get the last 60 seconds of block data for the user "Notch", excluding dirt and grass blocks. -```java -CoreProtectAPI CoreProtect = getCoreProtect(); -if (CoreProtect!=null){ //Ensure we have access to the API - List exclude = Arrays.asList(Material.DIRT, Material.GRASS); - List lookup = CoreProtect.performLookup(60, Arrays.asList("Notch"), null, null, exclude, null, 0, null); - if (lookup!=null){ - for (String[] value : lookup){ - ParseResult result = CoreProtect.parseResult(value); - int x = result.getX(); - int y = result.getY(); - int z = result.getZ(); - //... - } - } -} -``` - ---- - -- Get the last 60 seconds of block data within 5 blocks of a location. -```java -CoreProtectAPI CoreProtect = getCoreProtect(); -if (CoreProtect!=null){ //Ensure we have access to the API - List lookup = CoreProtect.performLookup(60, null, null, null, null, null, 5, location); - if (lookup!=null){ - for (String[] value : lookup){ - ParseResult result = CoreProtect.parseResult(value); - int x = result.getX(); - int y = result.getY(); - int z = result.getZ(); - //... - } - } -} -``` - ---- - -- Rollbacks / restores use the same code structure as the above examples. For example: -```java -class BasicThread implements Runnable { -@Override -public void run() { - try { - CoreProtectAPI CoreProtect = getCoreProtect(); - if (CoreProtect!=null){ //Ensure we have access to the API - List lookup = CoreProtect.performRollback(60, Arrays.asList("Notch"), null, null, null, null, 0, null); - if (lookup!=null){ - for (String[] value : lookup){ - ParseResult result = CoreProtect.parseResult(value); - int x = result.getX(); - int y = result.getY(); - int z = result.getZ(); - //... - } - } - } - } - catch (Exception e){ - e.printStackTrace(); - } -} -} -Runnable runnable = new BasicThread(); -Thread thread = new Thread(runnable); -thread.start(); -``` - ---- - -- Check if the user "Notch" has already placed a block at a location within the last 60 seconds. -```java -CoreProtectAPI CoreProtect = getCoreProtect(); -if (CoreProtect!=null){ //Ensure we have access to the API - boolean hasPlaced = CoreProtect.HasPlaced("Notch", block, 60, 0); -} -``` - ---- - -- Get the last 60 seconds of block data for a specific block. -```java -CoreProtectAPI CoreProtect = getCoreProtect(); -if (CoreProtect!=null){ //Ensure we have access to the API - List lookup = CoreProtect.blockLookup(block, 60); - if (lookup!=null){ - for (String[] result : lookup){ - ParseResult parseResult = CoreProtect.parseResult(value); - int x = parseResult.getX(); - int y = parseResult.getY(); - int z = parseResult.getZ(); - //... - } - } -} -``` - ---- - -- Log the placement of a block at a location by the user "Notch". -```java -CoreProtectAPI CoreProtect = getCoreProtect(); -if (CoreProtect!=null){ //Ensure we have access to the API - boolean success = CoreProtect.logPlacement("Notch", block.getLocation(), block.getType(), block.getData()); -} -``` - ---- - -- Log adding/remove items in a chest (or some other block inventory). -```java -CoreProtectAPI CoreProtect = getCoreProtect(); -if (CoreProtect!=null){ //Ensure we have access to the API - boolean success = CoreProtect.logContainerTransaction("Notch", inventory.getLocation()); - // modify your container contents immediately after (e.g. [i]inventory.addItem(itemStack);[/i]) -} -``` - ---- - -- Perform a multi-threaded placement check to see if the user "Notch" has already placed a block at a location within the last 60 seconds. This ignores the most recent 1 second of logged data, to account for the fact that that new block data may have already been logged, depending on your code. -```java -final Block block = null; //Should be an actual block -class BasicThread implements Runnable { - @Override - public void run() { - try { - CoreProtectAPI CoreProtect = getCoreProtect(); - if (CoreProtect!=null){ //Ensure we have access to the API - boolean hasPlaced = CoreProtect.hasPlaced("Notch", block, 60, 1); - } - } - catch (Exception e){ - e.printStackTrace(); - } - } -} -Runnable runnable = new BasicThread(); -Thread thread = new Thread(runnable); -thread.start(); -``` - ---- \ No newline at end of file +*Documentation for the API version 9 can be found [here](/api/version/v9/).* \ No newline at end of file diff --git a/docs/api/version/v8.md b/docs/api/version/v8.md new file mode 100644 index 00000000..9c43f08d --- /dev/null +++ b/docs/api/version/v8.md @@ -0,0 +1,450 @@ +# API Version 8 + +The CoreProtect API enables you to log your own block changes, perform lookups, rollbacks, restores, and more. + +| API Details | | +| --- | --- | +| **API Version:** | 8 | +| **Plugin Version:** | v20.2+ | +| **Maven:** | [maven.playpro.com](https://maven.playpro.com) | + +*Documentation for the latest API version can be found [here](/api/).* + +--- + +## Upgrading from API v7 + +The changes from the previous API version are as follows: + +- The following events have been added: +```java +CoreProtectPreLogEvent +``` + +--- + +## Getting Started + +Ensure you're using CoreProtect 20.2 or higher. Add it as an external jar to your plugin in your IDE. +Alternatively, if using Maven, you can add it via the repository [https://maven.playpro.com](https://maven.playpro.com) (net.coreprotect, 20.2). + +The first thing you need to do is get access to CoreProtect. You can do this by using code similar to the following: + +```java +import net.coreprotect.CoreProtect; +import net.coreprotect.CoreProtectAPI; + +private CoreProtectAPI getCoreProtect() { + Plugin plugin = getServer().getPluginManager().getPlugin("CoreProtect"); + + // Check that CoreProtect is loaded + if (plugin == null || !(plugin instanceof CoreProtect)) { + return null; + } + + // Check that the API is enabled + CoreProtectAPI CoreProtect = ((CoreProtect) plugin).getAPI(); + if (CoreProtect.isEnabled() == false) { + return null; + } + + // Check that a compatible version of the API is loaded + if (CoreProtect.APIVersion() < 8) { + return null; + } + + return CoreProtect; +} +``` + +With this code, you can then access the API with a call like the following: + +```java +CoreProtectAPI api = getCoreProtect(); +if (api != null){ // Ensure we have access to the API + api.testAPI(); // Will print out "[CoreProtect] API test successful." in the console. +} +``` + +Yay, you're now using the CoreProtect API! + +--- + +## API Overview + +### Available Methods + +```java +boolean isEnabled() + +void testAPI() + +List performLookup(int time, List restrict_users, List exclude_users, List restrict_blocks, List exclude_blocks, List action_list, int radius, Location radius_location) + +List performRollback(int time, List restrict_users, List exclude_users, List restrict_blocks, List exclude_blocks, List action_list, int radius, Location radius_location) + +List performRestore(int time, List restrict_users, List exclude_users, List restrict_blocks, List exclude_blocks, List action_list, int radius, Location radius_location) + +List blockLookup(Block block, int time) + +ParseResult parseResult(String[] result) + +boolean logChat(Player player, String message) + +boolean logCommand(Player player, String command) + +boolean logPlacement(String user, Location location, Material type, BlockData blockData) + +boolean logRemoval(String user, Location location, Material type, BlockData blockData) + +boolean logContainerTransaction(String user, Location location) + +boolean logInteraction(String user, Location location) + +boolean hasPlaced(String user, Block block, int time, int offset) + +boolean hasRemoved(String user, Block block, int time, int offset) + +void performPurge(int time) +``` + +--- + +### Available Events + +*The following events are emitted by CoreProtect.* + +#### CoreProtectPreLogEvent + +Fired when a CoreProtect logger is about to log an action. Not cancellable. + +| Property | Description | Mutable | +| --- | --- | --- | +| User | The name of the user under which this action will be logged. | Yes | + +--- + +### Method Usage + +*Detailed method information is listed below.* + +#### `isEnabled()` + +Calling this will return true if the server has the CoreProtect API enabled, and false if it does not. + +--- + +#### `testAPI()` + +Running this will print out "[CoreProtect] API Test Successful." in the server console. + +--- + +#### `performLookup(int time, List restrict_users, List exclude_users, List restrict_blocks, List exclude_blocks, List action_list, int radius, Location radius_location)` + +This will perform a lookup. + +* **time:** Specify the amount of time to search back. "5" would return results from the last 5 seconds. +* **restrict_users:** Specify any usernames to perform the lookup on. Can be set to "null" if both a radius and a location are specified. +* **exclude_users:** Specify any usernames to exclude from the lookup. Can be set to "null". +* **restrict_blocks:** Specify a list of EntityType's or Material's to restrict the search to. Can be set to "null". +* **exclude_blocks:** Specify a list of EntityType's or Material's to exclude from the search. Can be set to "null". +* **action_list:** Specify a list of action types to restrict the search to. Can be set to "null" +* **radius:** Specify a radius to restrict the search to. A location must be specified if using this. Set to "0" to disable. +* **radius_location:** Specify a location to search around. Can be set to "null" if no radius is specified, and a user is specified. + +--- + +#### `performRollback(int time, List restrict_users, List exclude_users, List restrict_blocks, List exclude_blocks, List action_list, int radius, Location radius_location)` + +This will perform a rollback. Method must be called async. + +* **time:** Specify the amount of time to rollback. "5" would return results from the last 5 seconds. +* **restrict_users:** Specify any usernames to perform the rollback on. Can be set to "null" if both a radius and a location are specified. +* **exclude_users:** Specify any usernames to exclude from the rollback. Can be set to "null". +* **restrict_blocks:** Specify a list of EntityType's or Material's to restrict the rollback to. Can be set to "null". +* **exclude_blocks:** Specify a list of EntityType's or Material's to exclude from the rollback. Can be set to "null". +* **action_list:** Specify a list of action types to restrict the rollback to. Can be set to "null" +* **radius:** Specify a radius to restrict the rollback to. A location must be specified if using this. Set to "0" to disable. +* **radius_location:** Specify a location to rollback around. Can be set to "null" if no radius is specified, and a user is specified. + +--- + +#### `performRestore(int time, List restrict_users, List exclude_users, List restrict_blocks, List exclude_blocks, List action_list, int radius, Location radius_location)` + +This will perform a restore. + +* **time:** Specify the amount of time to restore. "5" would return results from the last 5 seconds. +* **restrict_users:** Specify any usernames to perform the restore on. Can be set to "null" if both a radius and a location are specified. +* **exclude_users:** Specify any usernames to exclude from the restore. Can be set to "null". +* **restrict_blocks:** Specify a list of EntityType's or Material's to restrict the restore to. Can be set to "null". +* **exclude_blocks:** Specify a list of EntityType's or Material's to exclude from the restore. Can be set to "null". +* **action_list:** Specify a list of action types to restrict the restore to. Can be set to "null" +* **radius:** Specify a radius to restrict the restore to. A location must be specified if using this. Set to "0" to disable. +* **radius_location:** Specify a location to restore around. Can be set to "null" if no radius is specified, and a user is specified. + +--- + +#### `blockLookup(Block block, int time)` + +This will perform a full lookup on a single block. + +* **block:** The block to perform the lookup on. +* **time:** Specify the amount of time to lookup. "5" would return results from the last 5 seconds. + +--- + +#### `ParseResult parseResult(String[] result)` + +This will parse results from a lookup. You'll then be able to view the following: + +* **getX():** Get the X coordinate of the block. +* **getY():** Get the Y coordinate of the block. +* **getZ():** Get the Z coordinate of the block. +* **getType():** Get the Material of the block. +* **getBlockData():** Get the BlockData of the block. +* **getPlayer():** Get the username as a string.. +* **getTimestamp():** Get the time of the action. +* **getActionId():** Get the action ID. (0=removed, 1=placed, 2=interaction) +* **getActionString():** Get the action as a string. (Removal, Placement, Interaction) +* **isRolledBack():** If the block is currently rolled back or not. +* **worldName():** The name of the world the block is located in. + +--- + +#### `logPlacement(String user, Location location, Material type, BlockData blockData)` + +This will log a block as being placed. + +* **user:** Specify the username to log as having placed the block. +* **location:** Specify the location of the block you're logging. +* **type:** Specify the Material of the block you're logging. +* **blockData:** Specify the BlockData of the block you're logging. Can be set to "null". + +--- + +#### `logRemoval(String user, Location location, Material type, BlockData blockData)` + +This will log a block as being removed/broken, and will log the block's inventory (if applicable). + +* **user:** Specify the username to log as having removed the block. +* **location:** Specify the location of the block you're logging. +* **type:** Specify the Material of the block you're logging. +* **blockData:** Specify the BlockData of the block you're logging. Can be set to "null". + +--- + +#### `logContainerTransaction(String user, Location location)` + +This will log any transactions made to a block's inventory immediately after calling the method. + +* **user:** Specify the username to log as having added/removed the items. +* **location:** Specify the location of the block inventory you're logging. + +--- + +#### `logInteraction(String user, Location location)` + +This will log a block as having been interacted with. + +* **user:** Specify the username to log as having caused the interaction. +* **location:** Specify the location of the interaction you're logging. + +--- + +#### `hasPlaced(String user, Block block, int time, int offset)` + +This will return true if a user has already placed a block at the location within the specified time limit. + +* **user:** The username you're checking to see if they've placed a block already. +* **block:** The block you're checking. +* **time:** How far back to check. "5" would only check through the last 5 seconds of logged blocks. +* **offset:** A time offset. "2" would ignore the last 2 seconds of most recently ignored data. (0=no offset) + +--- + +#### `hasRemoved(String user, Block block, int time, int offset)` + +This will return true if a user has already removed a block at the location within the specified time limit. + +* **user:** The username you're checking to see if they've removed a block already. +* **block:** The block you're checking. +* **time:** How far back to check. "5" would only check through the last 5 seconds of logged blocks. +* **offset:** A time offset. "2" would ignore the last 2 seconds of most recently ignored data. (0=no offset) + +--- + +#### `performPurge(int time)` + +This will perform a purge on the CoreProtect database. + +* **time:** Purge any data earlier than this. "120" would purge any data older than 120 seconds (2 minutes). + +--- + + +### Examples + +- Get the last 60 seconds of block data for the user "Notch". +```java +CoreProtectAPI CoreProtect = getCoreProtect(); +if (CoreProtect!=null){ //Ensure we have access to the API + List lookup = CoreProtect.performLookup(60, Arrays.asList("Notch"), null, null, null, null, 0, null); + if (lookup!=null){ + for (String[] result : lookup){ + ParseResult parseResult = CoreProtect.parseResult(result); + int x = parseResult.getX(); + int y = parseResult.getY(); + int z = parseResult.getZ(); + //... + } + } +} +``` + +--- + +- Get the last 60 seconds of block data for the user "Notch", excluding dirt and grass blocks. +```java +CoreProtectAPI CoreProtect = getCoreProtect(); +if (CoreProtect!=null){ //Ensure we have access to the API + List exclude = Arrays.asList(Material.DIRT, Material.GRASS); + List lookup = CoreProtect.performLookup(60, Arrays.asList("Notch"), null, null, exclude, null, 0, null); + if (lookup!=null){ + for (String[] value : lookup){ + ParseResult result = CoreProtect.parseResult(value); + int x = result.getX(); + int y = result.getY(); + int z = result.getZ(); + //... + } + } +} +``` + +--- + +- Get the last 60 seconds of block data within 5 blocks of a location. +```java +CoreProtectAPI CoreProtect = getCoreProtect(); +if (CoreProtect!=null){ //Ensure we have access to the API + List lookup = CoreProtect.performLookup(60, null, null, null, null, null, 5, location); + if (lookup!=null){ + for (String[] value : lookup){ + ParseResult result = CoreProtect.parseResult(value); + int x = result.getX(); + int y = result.getY(); + int z = result.getZ(); + //... + } + } +} +``` + +--- + +- Rollbacks / restores use the same code structure as the above examples. For example: +```java +class BasicThread implements Runnable { +@Override +public void run() { + try { + CoreProtectAPI CoreProtect = getCoreProtect(); + if (CoreProtect!=null){ //Ensure we have access to the API + List lookup = CoreProtect.performRollback(60, Arrays.asList("Notch"), null, null, null, null, 0, null); + if (lookup!=null){ + for (String[] value : lookup){ + ParseResult result = CoreProtect.parseResult(value); + int x = result.getX(); + int y = result.getY(); + int z = result.getZ(); + //... + } + } + } + } + catch (Exception e){ + e.printStackTrace(); + } +} +} +Runnable runnable = new BasicThread(); +Thread thread = new Thread(runnable); +thread.start(); +``` + +--- + +- Check if the user "Notch" has already placed a block at a location within the last 60 seconds. +```java +CoreProtectAPI CoreProtect = getCoreProtect(); +if (CoreProtect!=null){ //Ensure we have access to the API + boolean hasPlaced = CoreProtect.HasPlaced("Notch", block, 60, 0); +} +``` + +--- + +- Get the last 60 seconds of block data for a specific block. +```java +CoreProtectAPI CoreProtect = getCoreProtect(); +if (CoreProtect!=null){ //Ensure we have access to the API + List lookup = CoreProtect.blockLookup(block, 60); + if (lookup!=null){ + for (String[] result : lookup){ + ParseResult parseResult = CoreProtect.parseResult(value); + int x = parseResult.getX(); + int y = parseResult.getY(); + int z = parseResult.getZ(); + //... + } + } +} +``` + +--- + +- Log the placement of a block at a location by the user "Notch". +```java +CoreProtectAPI CoreProtect = getCoreProtect(); +if (CoreProtect!=null){ //Ensure we have access to the API + boolean success = CoreProtect.logPlacement("Notch", block.getLocation(), block.getType(), block.getData()); +} +``` + +--- + +- Log adding/remove items in a chest (or some other block inventory). +```java +CoreProtectAPI CoreProtect = getCoreProtect(); +if (CoreProtect!=null){ //Ensure we have access to the API + boolean success = CoreProtect.logContainerTransaction("Notch", inventory.getLocation()); + // modify your container contents immediately after (e.g. [i]inventory.addItem(itemStack);[/i]) +} +``` + +--- + +- Perform a multi-threaded placement check to see if the user "Notch" has already placed a block at a location within the last 60 seconds. This ignores the most recent 1 second of logged data, to account for the fact that that new block data may have already been logged, depending on your code. +```java +final Block block = null; //Should be an actual block +class BasicThread implements Runnable { + @Override + public void run() { + try { + CoreProtectAPI CoreProtect = getCoreProtect(); + if (CoreProtect!=null){ //Ensure we have access to the API + boolean hasPlaced = CoreProtect.hasPlaced("Notch", block, 60, 1); + } + } + catch (Exception e){ + e.printStackTrace(); + } + } +} +Runnable runnable = new BasicThread(); +Thread thread = new Thread(runnable); +thread.start(); +``` + +--- \ No newline at end of file diff --git a/docs/api/version/v9.md b/docs/api/version/v9.md new file mode 100644 index 00000000..37b96df0 --- /dev/null +++ b/docs/api/version/v9.md @@ -0,0 +1,501 @@ +# API Version 9 + +The CoreProtect API enables you to log your own block changes, perform lookups, rollbacks, restores, and more. + +| API Details | | +| --- | --- | +| **API Version:** | 9 | +| **Plugin Version:** | v21.0+ | +| **Maven:** | [maven.playpro.com](https://maven.playpro.com) | + +--- + +## Upgrading from API v8 + +The changes from the previous API version are as follows: + +- The following methods have been added: +```java +sessionLookup(String user, int time) + +queueLookup(Block block) +``` + +--- + +## Getting Started + +Ensure you're using CoreProtect 21.0 or higher. Add it as an external jar to your plugin in your IDE. +Alternatively, if using Maven, you can add it via the repository [https://maven.playpro.com](https://maven.playpro.com) (net.coreprotect, 21.0). + +The first thing you need to do is get access to CoreProtect. You can do this by using code similar to the following: + +```java +import net.coreprotect.CoreProtect; +import net.coreprotect.CoreProtectAPI; + +private CoreProtectAPI getCoreProtect() { + Plugin plugin = getServer().getPluginManager().getPlugin("CoreProtect"); + + // Check that CoreProtect is loaded + if (plugin == null || !(plugin instanceof CoreProtect)) { + return null; + } + + // Check that the API is enabled + CoreProtectAPI CoreProtect = ((CoreProtect) plugin).getAPI(); + if (CoreProtect.isEnabled() == false) { + return null; + } + + // Check that a compatible version of the API is loaded + if (CoreProtect.APIVersion() < 9) { + return null; + } + + return CoreProtect; +} +``` + +With this code, you can then access the API with a call like the following: + +```java +CoreProtectAPI api = getCoreProtect(); +if (api != null){ // Ensure we have access to the API + api.testAPI(); // Will print out "[CoreProtect] API test successful." in the console. +} +``` + +Yay, you're now using the CoreProtect API! + +--- + +## API Overview + +### Available Methods + +```java +boolean isEnabled() + +void testAPI() + +List performLookup(int time, List restrict_users, List exclude_users, List restrict_blocks, List exclude_blocks, List action_list, int radius, Location radius_location) + +List performRollback(int time, List restrict_users, List exclude_users, List restrict_blocks, List exclude_blocks, List action_list, int radius, Location radius_location) + +List performRestore(int time, List restrict_users, List exclude_users, List restrict_blocks, List exclude_blocks, List action_list, int radius, Location radius_location) + +List blockLookup(Block block, int time) + +List sessionLookup(String user, int time) + +ParseResult parseResult(String[] result) + +boolean logChat(Player player, String message) + +boolean logCommand(Player player, String command) + +boolean logPlacement(String user, Location location, Material type, BlockData blockData) + +boolean logRemoval(String user, Location location, Material type, BlockData blockData) + +boolean logContainerTransaction(String user, Location location) + +boolean logInteraction(String user, Location location) + +boolean hasPlaced(String user, Block block, int time, int offset) + +boolean hasRemoved(String user, Block block, int time, int offset) + +void performPurge(int time) +``` + +--- + +### Available Events + +*The following events are emitted by CoreProtect.* + +#### CoreProtectPreLogEvent + +Fired when a CoreProtect logger is about to log an action. Not cancellable. + +| Property | Description | Mutable | +| --- | --- | --- | +| User | The name of the user under which this action will be logged. | Yes | + +--- + +### Method Usage + +*Detailed method information is listed below.* + +#### `isEnabled()` + +Calling this will return true if the server has the CoreProtect API enabled, and false if it does not. + +--- + +#### `testAPI()` + +Running this will print out "[CoreProtect] API Test Successful." in the server console. + +--- + +#### `performLookup(int time, List restrict_users, List exclude_users, List restrict_blocks, List exclude_blocks, List action_list, int radius, Location radius_location)` + +This will perform a lookup. + +* **time:** Specify the amount of time to search back. "5" would return results from the last 5 seconds. +* **restrict_users:** Specify any usernames to perform the lookup on. Can be set to "null" if both a radius and a location are specified. +* **exclude_users:** Specify any usernames to exclude from the lookup. Can be set to "null". +* **restrict_blocks:** Specify a list of EntityType's or Material's to restrict the search to. Can be set to "null". +* **exclude_blocks:** Specify a list of EntityType's or Material's to exclude from the search. Can be set to "null". +* **action_list:** Specify a list of action types to restrict the search to. Can be set to "null" +* **radius:** Specify a radius to restrict the search to. A location must be specified if using this. Set to "0" to disable. +* **radius_location:** Specify a location to search around. Can be set to "null" if no radius is specified, and a user is specified. + +--- + +#### `performRollback(int time, List restrict_users, List exclude_users, List restrict_blocks, List exclude_blocks, List action_list, int radius, Location radius_location)` + +This will perform a rollback. Method must be called async. + +* **time:** Specify the amount of time to rollback. "5" would return results from the last 5 seconds. +* **restrict_users:** Specify any usernames to perform the rollback on. Can be set to "null" if both a radius and a location are specified. +* **exclude_users:** Specify any usernames to exclude from the rollback. Can be set to "null". +* **restrict_blocks:** Specify a list of EntityType's or Material's to restrict the rollback to. Can be set to "null". +* **exclude_blocks:** Specify a list of EntityType's or Material's to exclude from the rollback. Can be set to "null". +* **action_list:** Specify a list of action types to restrict the rollback to. Can be set to "null" +* **radius:** Specify a radius to restrict the rollback to. A location must be specified if using this. Set to "0" to disable. +* **radius_location:** Specify a location to rollback around. Can be set to "null" if no radius is specified, and a user is specified. + +--- + +#### `performRestore(int time, List restrict_users, List exclude_users, List restrict_blocks, List exclude_blocks, List action_list, int radius, Location radius_location)` + +This will perform a restore. + +* **time:** Specify the amount of time to restore. "5" would return results from the last 5 seconds. +* **restrict_users:** Specify any usernames to perform the restore on. Can be set to "null" if both a radius and a location are specified. +* **exclude_users:** Specify any usernames to exclude from the restore. Can be set to "null". +* **restrict_blocks:** Specify a list of EntityType's or Material's to restrict the restore to. Can be set to "null". +* **exclude_blocks:** Specify a list of EntityType's or Material's to exclude from the restore. Can be set to "null". +* **action_list:** Specify a list of action types to restrict the restore to. Can be set to "null" +* **radius:** Specify a radius to restrict the restore to. A location must be specified if using this. Set to "0" to disable. +* **radius_location:** Specify a location to restore around. Can be set to "null" if no radius is specified, and a user is specified. + +--- + +#### `blockLookup(Block block, int time)` + +This will perform a full lookup on a single block. + +* **block:** The block to perform the lookup on. +* **time:** Specify the amount of time to lookup. "5" would return results from the last 5 seconds. + +--- + +#### `queueLookup(Block block)` + +This will search the consumer queue for changes on a block not yet saved in the database. + +* **block:** The block to perform the lookup on. + +--- + +#### `sessionLookup(String user, int time)` + +This will perform a session lookup on a single player. + +* **user:** The username to perform the lookup on. +* **time:** Specify the amount of time to lookup. "5" would return results from the last 5 seconds. + +--- + +#### `ParseResult parseResult(String[] result)` + +This will parse results from a lookup. You'll then be able to view the following: + +* **getX():** Get the X coordinate of the block. +* **getY():** Get the Y coordinate of the block. +* **getZ():** Get the Z coordinate of the block. +* **getType():** Get the Material of the block. +* **getBlockData():** Get the BlockData of the block. +* **getPlayer():** Get the username as a string.. +* **getTimestamp():** Get the time of the action. +* **getActionId():** Get the action ID. (0=removed, 1=placed, 2=interaction) +* **getActionString():** Get the action as a string. (Removal, Placement, Interaction) +* **isRolledBack():** If the block is currently rolled back or not. +* **worldName():** The name of the world the block is located in. + +--- + +#### `logPlacement(String user, Location location, Material type, BlockData blockData)` + +This will log a block as being placed. + +* **user:** Specify the username to log as having placed the block. +* **location:** Specify the location of the block you're logging. +* **type:** Specify the Material of the block you're logging. +* **blockData:** Specify the BlockData of the block you're logging. Can be set to "null". + +--- + +#### `logRemoval(String user, Location location, Material type, BlockData blockData)` + +This will log a block as being removed/broken, and will log the block's inventory (if applicable). + +* **user:** Specify the username to log as having removed the block. +* **location:** Specify the location of the block you're logging. +* **type:** Specify the Material of the block you're logging. +* **blockData:** Specify the BlockData of the block you're logging. Can be set to "null". + +--- + +#### `logContainerTransaction(String user, Location location)` + +This will log any transactions made to a block's inventory immediately after calling the method. + +* **user:** Specify the username to log as having added/removed the items. +* **location:** Specify the location of the block inventory you're logging. + +--- + +#### `logInteraction(String user, Location location)` + +This will log a block as having been interacted with. + +* **user:** Specify the username to log as having caused the interaction. +* **location:** Specify the location of the interaction you're logging. + +--- + +#### `hasPlaced(String user, Block block, int time, int offset)` + +This will return true if a user has already placed a block at the location within the specified time limit. + +* **user:** The username you're checking to see if they've placed a block already. +* **block:** The block you're checking. +* **time:** How far back to check. "5" would only check through the last 5 seconds of logged blocks. +* **offset:** A time offset. "2" would ignore the last 2 seconds of most recently ignored data. (0 = no offset) + +--- + +#### `hasRemoved(String user, Block block, int time, int offset)` + +This will return true if a user has already removed a block at the location within the specified time limit. + +* **user:** The username you're checking to see if they've removed a block already. +* **block:** The block you're checking. +* **time:** How far back to check. "5" would only check through the last 5 seconds of logged blocks. +* **offset:** A time offset. "2" would ignore the last 2 seconds of most recently ignored data. (0 = no offset) + +--- + +#### `performPurge(int time)` + +This will perform a purge on the CoreProtect database. + +* **time:** Purge any data earlier than this. "120" would purge any data older than 120 seconds (2 minutes). + +--- + + +### Examples + +- Get the last 60 seconds of block data for the user "Notch". +```java +CoreProtectAPI CoreProtect = getCoreProtect(); +if (CoreProtect != null){ // Ensure we have access to the API + List lookup = CoreProtect.performLookup(60, Arrays.asList("Notch"), null, null, null, null, 0, null); + if (lookup != null){ + for (String[] result : lookup){ + ParseResult parseResult = CoreProtect.parseResult(result); + int x = parseResult.getX(); + int y = parseResult.getY(); + int z = parseResult.getZ(); + //... + } + } +} +``` + +--- + +- Get the last 60 seconds of block data for the user "Notch", excluding dirt and grass blocks. +```java +CoreProtectAPI CoreProtect = getCoreProtect(); +if (CoreProtect != null){ // Ensure we have access to the API + List exclude = Arrays.asList(Material.DIRT, Material.GRASS); + List lookup = CoreProtect.performLookup(60, Arrays.asList("Notch"), null, null, exclude, null, 0, null); + if (lookup != null){ + for (String[] value : lookup){ + ParseResult result = CoreProtect.parseResult(value); + int x = result.getX(); + int y = result.getY(); + int z = result.getZ(); + //... + } + } +} +``` + +--- + +- Get the last 60 seconds of block data within 5 blocks of a location. +```java +CoreProtectAPI CoreProtect = getCoreProtect(); +if (CoreProtect != null){ // Ensure we have access to the API + List lookup = CoreProtect.performLookup(60, null, null, null, null, null, 5, location); + if (lookup != null){ + for (String[] value : lookup){ + ParseResult result = CoreProtect.parseResult(value); + int x = result.getX(); + int y = result.getY(); + int z = result.getZ(); + //... + } + } +} +``` + +--- + +- Rollbacks / restores use the same code structure as the above examples. For example: +```java +class BasicThread implements Runnable { +@Override +public void run() { + try { + CoreProtectAPI CoreProtect = getCoreProtect(); + if (CoreProtect != null){ // Ensure we have access to the API + List lookup = CoreProtect.performRollback(60, Arrays.asList("Notch"), null, null, null, null, 0, null); + if (lookup != null){ + for (String[] value : lookup){ + ParseResult result = CoreProtect.parseResult(value); + int x = result.getX(); + int y = result.getY(); + int z = result.getZ(); + //... + } + } + } + } + catch (Exception e){ + e.printStackTrace(); + } +} +} +Runnable runnable = new BasicThread(); +Thread thread = new Thread(runnable); +thread.start(); +``` + +--- + +- Check if the user "Notch" has already placed a block at a location within the last 60 seconds. +```java +CoreProtectAPI CoreProtect = getCoreProtect(); +if (CoreProtect != null){ // Ensure we have access to the API + boolean hasPlaced = CoreProtect.hasPlaced("Notch", block, 60, 0); + + // Search queue for pending changes + if (!hasPlaced){ + List lookup = CoreProtect.queueLookup(block); + for (String[] result : lookup){ + ParseResult parseResult = CoreProtect.parseResult(value); + if (parseResult.getActionId()==1 && parseResult.getPlayer().equals("Notch")){ + hasPlaced = true; + break; + } + } + } +} +``` + +--- + +- Get the last 60 seconds of block data for a specific block. +```java +CoreProtectAPI CoreProtect = getCoreProtect(); +if (CoreProtect != null){ // Ensure we have access to the API + List lookup = CoreProtect.blockLookup(block, 60); + if (lookup != null){ + for (String[] result : lookup){ + ParseResult parseResult = CoreProtect.parseResult(value); + int x = parseResult.getX(); + int y = parseResult.getY(); + int z = parseResult.getZ(); + //... + } + } +} +``` + +--- + +- Get the last 1 day of session data for the user "Notch". +```java +CoreProtectAPI CoreProtect = getCoreProtect(); +if (CoreProtect != null){ // Ensure we have access to the API + List lookup = CoreProtect.sessionLookup("Notch", (24 * 60 * 60)); + if (lookup != null){ + for (String[] result : lookup){ + ParseResult parseResult = CoreProtect.parseResult(value); + int x = parseResult.getX(); + int y = parseResult.getY(); + int z = parseResult.getZ(); + int action = parseResult.getActionId(); // 0 = logout, 1 = login + //... + } + } +} +``` + +--- + +- Log the placement of a block at a location by the user "Notch". +```java +CoreProtectAPI CoreProtect = getCoreProtect(); +if (CoreProtect != null){ // Ensure we have access to the API + boolean success = CoreProtect.logPlacement("Notch", block.getLocation(), block.getType(), block.getData()); +} +``` + +--- + +- Log adding/remove items in a chest (or some other block inventory). +```java +CoreProtectAPI CoreProtect = getCoreProtect(); +if (CoreProtect != null){ // Ensure we have access to the API + boolean success = CoreProtect.logContainerTransaction("Notch", inventory.getLocation()); + // modify your container contents immediately after (e.g. [i]inventory.addItem(itemStack);[/i]) +} +``` + +--- + +- Perform a multi-threaded placement check to see if the user "Notch" has already placed a block at a location within the last 60 seconds. This ignores the most recent 1 second of logged data, to account for the fact that that new block data may have already been logged, depending on your code. +```java +final Block block = null; //Should be an actual block +class BasicThread implements Runnable { + @Override + public void run() { + try { + CoreProtectAPI CoreProtect = getCoreProtect(); + if (CoreProtect != null){ // Ensure we have access to the API + boolean hasPlaced = CoreProtect.hasPlaced("Notch", block, 60, 1); + } + } + catch (Exception e){ + e.printStackTrace(); + } + } +} +Runnable runnable = new BasicThread(); +Thread thread = new Thread(runnable); +thread.start(); +``` + +--- \ No newline at end of file diff --git a/docs/commands.md b/docs/commands.md index 8c13fc73..ad54d504 100644 --- a/docs/commands.md +++ b/docs/commands.md @@ -138,7 +138,8 @@ ___ * Example: `t:2w,5d,7h,2m,10s` * Example: `t:5d2h` -* Example: `t:2.50h` *(2 and a half hours)* +* Example: `t:1h-2h` *(between one to two hours)* +* Example: `t:2.50h` *(two and a half hours)* --- @@ -171,12 +172,12 @@ ___ | `a:container` | items taken from or put in chests | | `a:+container` | items put in chests | | `a:-container` | items taken from chests | -| `a:inventory` | items dropped, picked up, deposited, or withdrawn by players | -| `a:+inventory` | items picked up or withdrawn by players | -| `a:-inventory` | items dropped or deposited by players | -| `a:item` | merges `a:container` and `a:inventory` | -| `a:+item` | merges `a:+container` and `a:+inventory` | -| `a:-item` | merges `a:-container` and `a:-inventory` | +| `a:inventory` | items added or removed from player inventories | +| `a:+inventory` | items added to player inventories | +| `a:-inventory` | items removed from player inventories | +| `a:item` | items dropped, thrown, picked up, deposited, or withdrawn by players | +| `a:+item` | items picked up or withdrawn by players | +| `a:-item` | items dropped, thrown, or deposited by players | | `a:kill` | mobs/animals killed | | `a:session` | player logins/logouts | | `a:+session` | player logins | diff --git a/docs/tools-integrations.md b/docs/tools-integrations.md index ea3c9b80..c1a56684 100644 --- a/docs/tools-integrations.md +++ b/docs/tools-integrations.md @@ -14,13 +14,13 @@ Use WorldEdit selections as a radius, and log your WorldEdit changes.   * **CoreProtect-Anti-Xray** -Displays how many ores a player has destroyed in a specific time span. +Displays how many ores a player has destroyed in a specific time span. [https://dev.bukkit.org/bukkit-plugins/coreprotect-anti-xray/](https://dev.bukkit.org/bukkit-plugins/coreprotect-anti-xray/)   * **CoreProtect TNT** The CoreProtect TNT extension adds logging for TNT and creeper explosion sources. -[https://www.spigotmc.org/resources/coreprotect-tnt-log-tnt-creeper-explode-source.69609/](https://www.spigotmc.org/resources/coreprotect-tnt-log-tnt-creeper-explode-source.69609/) +[https://www.spigotmc.org/resources/coreprotect-tnt-log-tnt-creeper-explode-source.69609/](https://www.spigotmc.org/resources/coreprotect-tnt-log-tnt-creeper-explode-source.69609/)   ## Tools diff --git a/lang/de.yml b/lang/de.yml index 41d4696b..18d7f37f 100644 --- a/lang/de.yml +++ b/lang/de.yml @@ -9,8 +9,11 @@ API_TEST: "API-Test erfolgreich." CACHE_ERROR: "WARNUNG: Fehler beim Validieren {0} Zwischenspeicher." CACHE_RELOAD: "Erzwingen des Nachladens von {kartierung|welt} Caches aus der Datenbank." CHECK_CONFIG: "Bitte überprüfen Sie config.yml" +COMMAND_CONSOLE: "Bitte führen Sie den Befehl von der Konsole aus." COMMAND_NOT_FOUND: "Befehl \"{0}\" nicht gefunden." COMMAND_THROTTLED: "Bitte warten Sie einen Moment und versuchen Sie es erneut." +CONSUMER_ERROR: "Verbraucherwarteschlange wird bereits verarbeitet {angehalten|fortgesetzt}." +CONSUMER_TOGGLED: "Die Verarbeitung der Verbraucherwarteschlange wurde durchgeführt {angehalten|fortgesetzt}." CONTAINER_HEADER: "Containertransaktionen" DATABASE_BUSY: "Datenbank beschäftigt. Bitte versuchen Sie es später erneut." DATABASE_INDEX_ERROR: "Datenbankindizes können nicht validiert werden." @@ -108,12 +111,12 @@ LOOKUP_INTERACTION: "{0} {angeklickt|getötet} {1}." LOOKUP_ITEM: "{0} {abgeholt|abgeworfen} {1} {2}." LOOKUP_LOGIN: "{0} eingeloggt {rein|raus}." LOOKUP_PAGE: "Seite {0}" +LOOKUP_PROJECTILE: "{0} {geworfen|geschossen} {1} {2}." LOOKUP_ROWS_FOUND: "{0} {Reihe|Reihen} gefunden." LOOKUP_SEARCHING: "Suche nachschlagen. Warten Sie mal..." LOOKUP_STORAGE: "{0} {hinterlegt|abgehoben} {1} {2}." LOOKUP_TIME: "{0} vor" LOOKUP_USERNAME: "{0} Eingeloggt als {1}." -LOOKUP_VIEW_PAGE: "Um eine Seite anzuzeigen, geben Sie \"{0}\"." MAXIMUM_RADIUS: "Das Maximum {Nachschlagen|Rollback|Wiederherstellen} Radius ist {0}." MISSING_ACTION_USER: "Um diese Aktion zu verwenden, geben Sie bitte einen Benutzer an." MISSING_LOOKUP_TIME: "Bitte geben Sie die Zeit an, um {Nachschlagen|Rollback|Wiederherstellen}." @@ -139,8 +142,8 @@ PATCH_UPGRADING: "Datenbank-Upgrade im Gange. Warten Sie mal..." PLEASE_SELECT: "Bitte auswählen: \"{0}\" oder \"{1}\"." PREVIEW_CANCELLED: "Vorschau abgebrochen." PREVIEW_CANCELLING: "Vorschau abbrechen..." -PREVIEW_CONTAINER: "Sie können keine Containertransaktionen in der Vorschau anzeigen." PREVIEW_IN_GAME: "Sie können Rollbacks nur im Spiel in der Vorschau anzeigen." +PREVIEW_TRANSACTION: "Sie können keine Vorschau anzeigen {Behälter|Inventar} Transaktionen." PURGE_ABORTED: "Bereinigung fehlgeschlagen. Die Datenbank ist möglicherweise beschädigt." PURGE_ERROR: "Kann nicht verarbeitet werden {0} Daten!" PURGE_FAILED: "Bereinigung fehlgeschlagen. Bitte versuchen Sie es später erneut." @@ -189,6 +192,7 @@ UPDATE_HEADER: "{0} Aktualisieren" UPDATE_NOTICE: "Beachten: {0} ist nun verfügbar." UPGRADE_IN_PROGRESS: "Upgrade läuft. Bitte versuchen Sie es später erneut." USER_NOT_FOUND: "Benutzer \"{0}\" nicht gefunden." +USER_OFFLINE: "Der Benutzer \"{0}\" ist nicht online." USING_MYSQL: "Verwenden von MySQL zur Datenspeicherung." USING_SQLITE: "Verwenden von SQLite zur Datenspeicherung." VALID_DONATION_KEY: "Gültiger Spendenschlüssel." diff --git a/lang/en.yml b/lang/en.yml index 0cfeaf73..2bfb9831 100644 --- a/lang/en.yml +++ b/lang/en.yml @@ -9,8 +9,11 @@ API_TEST: "API test successful." CACHE_ERROR: "WARNING: Error while validating {0} cache." CACHE_RELOAD: "Forcing reload of {mapping|world} caches from database." CHECK_CONFIG: "Please check config.yml" +COMMAND_CONSOLE: "Please run the command from the console." COMMAND_NOT_FOUND: "Command \"{0}\" not found." COMMAND_THROTTLED: "Please wait a moment and try again." +CONSUMER_ERROR: "Consumer queue processing already {paused|resumed}." +CONSUMER_TOGGLED: "Consumer queue processing has been {paused|resumed}." CONTAINER_HEADER: "Container Transactions" DATABASE_BUSY: "Database busy. Please try again later." DATABASE_INDEX_ERROR: "Unable to validate database indexes." @@ -108,12 +111,12 @@ LOOKUP_INTERACTION: "{0} {clicked|killed} {1}." LOOKUP_ITEM: "{0} {picked up|dropped} {1} {2}." LOOKUP_LOGIN: "{0} logged {in|out}." LOOKUP_PAGE: "Page {0}" +LOOKUP_PROJECTILE: "{0} {threw|shot} {1} {2}." LOOKUP_ROWS_FOUND: "{0} {row|rows} found." LOOKUP_SEARCHING: "Lookup searching. Please wait..." LOOKUP_STORAGE: "{0} {deposited|withdrew} {1} {2}." LOOKUP_TIME: "{0} ago" LOOKUP_USERNAME: "{0} logged in as {1}." -LOOKUP_VIEW_PAGE: "To view a page, type \"{0}\"." MAXIMUM_RADIUS: "The maximum {lookup|rollback|restore} radius is {0}." MISSING_ACTION_USER: "To use that action, please specify a user." MISSING_LOOKUP_TIME: "Please specify the amount of time to {lookup|rollback|restore}." @@ -139,8 +142,8 @@ PATCH_UPGRADING: "Database upgrade in progress. Please wait..." PLEASE_SELECT: "Please select: \"{0}\" or \"{1}\"." PREVIEW_CANCELLED: "Preview cancelled." PREVIEW_CANCELLING: "Cancelling preview..." -PREVIEW_CONTAINER: "You can't preview container transactions." PREVIEW_IN_GAME: "You can only preview rollbacks in-game." +PREVIEW_TRANSACTION: "You can't preview {container|inventory} transactions." PURGE_ABORTED: "Purge failed. Database may be corrupt." PURGE_ERROR: "Unable to process {0} data!" PURGE_FAILED: "Purge failed. Please try again later." @@ -189,6 +192,7 @@ UPDATE_HEADER: "{0} Update" UPDATE_NOTICE: "Notice: {0} is now available." UPGRADE_IN_PROGRESS: "Upgrade in progress. Please try again later." USER_NOT_FOUND: "User \"{0}\" not found." +USER_OFFLINE: "The user \"{0}\" is not online." USING_MYSQL: "Using MySQL for data storage." USING_SQLITE: "Using SQLite for data storage." VALID_DONATION_KEY: "Valid donation key." diff --git a/lang/es.yml b/lang/es.yml index 0eb0432c..45e2e46d 100644 --- a/lang/es.yml +++ b/lang/es.yml @@ -9,8 +9,11 @@ API_TEST: "Prueba de API exitosa." CACHE_ERROR: "ADVERTENCIA: Error al validar {0} cache." CACHE_RELOAD: "Forzando la recarga de {mapeo|mundo} cachés de la base de datos." CHECK_CONFIG: "Por favor revise config.yml" +COMMAND_CONSOLE: "Ejecute el comando desde la consola." COMMAND_NOT_FOUND: "Comando \"{0}\" extraviado." COMMAND_THROTTLED: "Espere un momento y vuelva a intentarlo." +CONSUMER_ERROR: "Procesamiento de colas de consumidores ya {en pausa|reanudado}." +CONSUMER_TOGGLED: "El procesamiento de la cola del consumidor ha sido {en pausa|reanudado}." CONTAINER_HEADER: "Transacciones de contenedores" DATABASE_BUSY: "Base de datos ocupado. Por favor, inténtelo de nuevo más tarde." DATABASE_INDEX_ERROR: "No se pueden validar los índices de la base de datos." @@ -108,12 +111,12 @@ LOOKUP_INTERACTION: "{0} {clickeado|muerto} {1}." LOOKUP_ITEM: "{0} {recogido|caído} {1} {2}." LOOKUP_LOGIN: "{0} registrado {adentro|afuera}." LOOKUP_PAGE: "Página {0}" +LOOKUP_PROJECTILE: "{0} {tiró|disparó} {1} {2}." LOOKUP_ROWS_FOUND: "{0} {fila|filas} encontró." LOOKUP_SEARCHING: "Búsqueda de búsqueda. Espere por favor..." LOOKUP_STORAGE: "{0} {depositado|retirado} {1} {2}." LOOKUP_TIME: "{0} atrás" LOOKUP_USERNAME: "{0} Conectado como {1}." -LOOKUP_VIEW_PAGE: "Para ver una página, escriba \"{0}\"." MAXIMUM_RADIUS: "El maximo {buscar|deshacer|restaurar} el radio es {0}." MISSING_ACTION_USER: "Para utilizar esa acción, especifique un usuario." MISSING_LOOKUP_TIME: "Por favor, especifique el tiempo para {buscar|deshacer|restaurar}." @@ -139,8 +142,8 @@ PATCH_UPGRADING: "Actualización de la base de datos en curso. Espere por favor. PLEASE_SELECT: "Seleccione: \"{0}\" o \"{1}\"." PREVIEW_CANCELLED: "Vista previa cancelada." PREVIEW_CANCELLING: "Cancelando vista previa..." -PREVIEW_CONTAINER: "No puede obtener una vista previa de las transacciones de contenedor." PREVIEW_IN_GAME: "Solo puedes obtener una vista previa de las reversiones en el juego." +PREVIEW_TRANSACTION: "No puedes previsualizar {contenedor|inventario} actas." PURGE_ABORTED: "La purga falló. La base de datos puede estar dañada." PURGE_ERROR: "No se puede procesar {0} ¡datos!" PURGE_FAILED: "La purga falló. Por favor, inténtelo de nuevo más tarde." @@ -171,7 +174,7 @@ ROLLBACK_STARTED: "{Retroceder|Restaurar|Vista previa} comenzó en \"{0}\"." ROLLBACK_TIME: "Intervalo de tiempo: {0}." ROLLBACK_WORLD_ACTION: "Prohibido para {mundo|acción} \"{0}\"." SIGN_HEADER: "Firmar mensajes" -STATUS_CONSUMER: "Consumidor: {0} {artículo|artículos} en fila." +STATUS_CONSUMER: "Consumidor: {0} {artículo|artículos} en la cola." STATUS_DATABASE: "Base de datos: Usando {0}." STATUS_INTEGRATION: "{0}: Integración {habilitado|deshabilitado}." STATUS_LICENSE: "Licencia: {0}" @@ -189,6 +192,7 @@ UPDATE_HEADER: "{0} Actualizar" UPDATE_NOTICE: "Darse cuenta: {0} Ya está disponible." UPGRADE_IN_PROGRESS: "Actualización en curso. Por favor, inténtelo de nuevo más tarde." USER_NOT_FOUND: "Usuario \"{0}\" extraviado." +USER_OFFLINE: "El usuario \"{0}\" no está en línea." USING_MYSQL: "Utilizando MySQL para el almacenamiento de datos." USING_SQLITE: "Utilizando SQLite para el almacenamiento de datos." VALID_DONATION_KEY: "Clave de donación válida." diff --git a/lang/fr.yml b/lang/fr.yml index 945e9207..4298e72e 100644 --- a/lang/fr.yml +++ b/lang/fr.yml @@ -9,8 +9,11 @@ API_TEST: "Test API réussi." CACHE_ERROR: "ATTENTION: Erreur lors de la validation {0} cache." CACHE_RELOAD: "Forcer le rechargement de {cartographie|monde} cache de la base de données." CHECK_CONFIG: "Veuillez vérifier config.yml" +COMMAND_CONSOLE: "Veuillez exécuter la commande depuis la console." COMMAND_NOT_FOUND: "Commande \"{0}\" pas trouvé." COMMAND_THROTTLED: "Veuillez patienter un instant et réessayer." +CONSUMER_ERROR: "Traitement de la file d'attente des consommateurs déjà {mis en pause|repris}." +CONSUMER_TOGGLED: "Le traitement de la file d'attente des consommateurs a été {mis en pause|repris}." CONTAINER_HEADER: "Transactions de conteneurs" DATABASE_BUSY: "Base de données occupée. Veuillez réessayer plus tard." DATABASE_INDEX_ERROR: "Impossible de valider les index de la base de données." @@ -108,12 +111,12 @@ LOOKUP_INTERACTION: "{0} {cliqué|tué} {1}." LOOKUP_ITEM: "{0} {ramassé|lâché} {1} {2}." LOOKUP_LOGIN: "{0} connecté {entrée|sortie}." LOOKUP_PAGE: "Page {0}" +LOOKUP_PROJECTILE: "{0} {jeté|tiré} {1} {2}." LOOKUP_ROWS_FOUND: "{0} {ligne|lignes} trouvé." LOOKUP_SEARCHING: "Recherche de recherche. S'il vous plaît, attendez..." LOOKUP_STORAGE: "{0} {déposé|retiré} {1} {2}." LOOKUP_TIME: "{0} depuis" LOOKUP_USERNAME: "{0} connecté en tant que {1}." -LOOKUP_VIEW_PAGE: "Pour afficher une page, tapez \"{0}\"." MAXIMUM_RADIUS: "Le maximum {recherche|restauration|restauration} le rayon est {0}." MISSING_ACTION_USER: "Pour utiliser cette action, veuillez spécifier un utilisateur." MISSING_LOOKUP_TIME: "Veuillez préciser l'heure à laquelle {recherche|restauration|restauration}." @@ -139,8 +142,8 @@ PATCH_UPGRADING: "Mise à niveau de la base de données en cours. S'il vous pla PLEASE_SELECT: "Veuillez sélectionner: \"{0}\" ou alors \"{1}\"." PREVIEW_CANCELLED: "Aperçu annulé." PREVIEW_CANCELLING: "Annulation de l'aperçu..." -PREVIEW_CONTAINER: "Vous ne pouvez pas prévisualiser les transactions de conteneur." PREVIEW_IN_GAME: "Vous ne pouvez prévisualiser les rollbacks que dans le jeu." +PREVIEW_TRANSACTION: "Vous ne pouvez pas prévisualiser {conteneur|inventaire} transactions." PURGE_ABORTED: "Échec de la purge. La base de données est peut-être corrompue." PURGE_ERROR: "Impossible de traiter {0} Les données!" PURGE_FAILED: "Échec de la purge. Veuillez réessayer plus tard." @@ -189,6 +192,7 @@ UPDATE_HEADER: "{0} Mettre à jour" UPDATE_NOTICE: "Remarquer: {0} est maintenant disponible." UPGRADE_IN_PROGRESS: "Mise à niveau en cours. Veuillez réessayer plus tard." USER_NOT_FOUND: "Utilisateur \"{0}\" pas trouvé." +USER_OFFLINE: "L'utilisateur \"{0}\" n'est pas en ligne." USING_MYSQL: "Utilisant MySQL pour le stockage des données." USING_SQLITE: "Utilisant SQLite pour le stockage des données." VALID_DONATION_KEY: "Clé de don valide." diff --git a/lang/ja.yml b/lang/ja.yml index 245d20f2..bff08710 100644 --- a/lang/ja.yml +++ b/lang/ja.yml @@ -9,8 +9,11 @@ API_TEST: "APIテストが成功しました。" CACHE_ERROR: "警告:検証中にエラーが発生しました {0} キャッシュ。" CACHE_RELOAD: "のリロードを強制する {マッピング|世界} データベースからのキャッシュ。" CHECK_CONFIG: "config.ymlを確認してください" +COMMAND_CONSOLE: "コンソールからコマンドを実行してください。" COMMAND_NOT_FOUND: "指示 \"{0}\" 見つかりません。" COMMAND_THROTTLED: "しばらく待ってから、もう一度お試しください。" +CONSUMER_ERROR: "すでにコンシューマキュー処理 {一時停止|再開}。" +CONSUMER_TOGGLED: "消費者キューの処理は {一時停止|再開}。" CONTAINER_HEADER: "コンテナトランザクション" DATABASE_BUSY: "データベースがビジーです。後でもう一度やり直してください。" DATABASE_INDEX_ERROR: "データベースインデックスを検証できません。" @@ -108,12 +111,12 @@ LOOKUP_INTERACTION: "{0} {クリック|殺された} {1}。" LOOKUP_ITEM: "{0} {拾った|落とした} {1} {2}。" LOOKUP_LOGIN: "{0} ログに記録されます {in|out}。" LOOKUP_PAGE: "ページ {0}" +LOOKUP_PROJECTILE: "{0} {投げた|ショット} {1} {2}。" LOOKUP_ROWS_FOUND: "{0} {行|行} 見つかった。" LOOKUP_SEARCHING: "ルックアップ検索。お待ちください..." LOOKUP_STORAGE: "{0} {預け入れ|撤回} {1} {2}。" LOOKUP_TIME: "{0} 前に" LOOKUP_USERNAME: "{0} としてログイン {1}。" -LOOKUP_VIEW_PAGE: "ページを表示するには、「{0}\" 。" MAXIMUM_RADIUS: "最大 {ルックアップ|ロールバック|復元} 半径は {0}。" MISSING_ACTION_USER: "そのアクションを使用するには、ユーザーを指定してください。" MISSING_LOOKUP_TIME: "時間を指定してください {ルックアップ|ロールバック|復元}。" @@ -139,8 +142,8 @@ PATCH_UPGRADING: "データベースのアップグレードが進行中です PLEASE_SELECT: "選んでください: \"{0}\" また \"{1}\" 。" PREVIEW_CANCELLED: "プレビューがキャンセルされました。" PREVIEW_CANCELLING: "プレビューをキャンセルしています..." -PREVIEW_CONTAINER: "コンテナトランザクションをプレビューすることはできません。" PREVIEW_IN_GAME: "ゲーム内でのみロールバックをプレビューできます。" +PREVIEW_TRANSACTION: "プレビューできません {コンテナ|在庫} トランザクション。" PURGE_ABORTED: "パージに失敗しました。データベースが破損している可能性があります。" PURGE_ERROR: "処理できません {0} データ!" PURGE_FAILED: "パージに失敗しました。後でもう一度やり直してください。" @@ -189,6 +192,7 @@ UPDATE_HEADER: "{0} アップデート" UPDATE_NOTICE: "知らせ:{0} 現在利用できます。" UPGRADE_IN_PROGRESS: "アップグレードが進行中です。後でもう一度やり直してください。" USER_NOT_FOUND: "ユーザー \"{0}\" 見つかりません。" +USER_OFFLINE: "ユーザー \"{0}\" はオンラインではありません。" USING_MYSQL: "使用する MySQL データストレージ用。" USING_SQLITE: "使用する SQLite データストレージ用。" VALID_DONATION_KEY: "有効な寄付キー。" diff --git a/lang/pl.yml b/lang/pl.yml index 6b2c4d2e..988147ef 100644 --- a/lang/pl.yml +++ b/lang/pl.yml @@ -9,8 +9,11 @@ API_TEST: "Test interfejsu API pomyślny." CACHE_ERROR: "OSTRZEŻENIE: Błąd podczas walidacji {0} Pamięć podręczna." CACHE_RELOAD: "Wymuszanie przeładowania {mapowanie|świat} pamięci podręczne z bazy danych." CHECK_CONFIG: "Sprawdź plik config.yml" +COMMAND_CONSOLE: "Uruchom polecenie z konsoli." COMMAND_NOT_FOUND: "Komenda \"{0}\" nie znaleziono." COMMAND_THROTTLED: "Poczekaj chwilę i spróbuj ponownie." +CONSUMER_ERROR: "Przetwarzanie kolejki klientów już {wstrzymane|wznowione}." +CONSUMER_TOGGLED: "Przetwarzanie kolejki klientów zostało {wstrzymane|wznowione}." CONTAINER_HEADER: "Transakcje kontenerowe" DATABASE_BUSY: "Baza danych zajęta. Spróbuj ponownie później." DATABASE_INDEX_ERROR: "Nie można zweryfikować indeksów bazy danych." @@ -108,12 +111,12 @@ LOOKUP_INTERACTION: "{0} {kliknięty|zabity} {1}." LOOKUP_ITEM: "{0} {odebrany|upuszczony} {1} {2}." LOOKUP_LOGIN: "{0} zalogowany {w|na zewnątrz}." LOOKUP_PAGE: "Strona {0}" +LOOKUP_PROJECTILE: "{0} {rzucił|strzał} {1} {2}." LOOKUP_ROWS_FOUND: "{0} {wiersz|wiersze} znaleziony." LOOKUP_SEARCHING: "Wyszukiwanie wyszukiwania. Proszę czekać..." LOOKUP_STORAGE: "{0} {zdeponowane|wycofane} {1} {2}." LOOKUP_TIME: "{0} temu" LOOKUP_USERNAME: "{0} zalogowany jako {1}." -LOOKUP_VIEW_PAGE: "Aby wyświetlić stronę, wpisz „{0}”." MAXIMUM_RADIUS: "Maksymalny {wyszukiwanie|wycofywanie|przywracanie} promień to {0}." MISSING_ACTION_USER: "Aby skorzystać z tej akcji, określ użytkownika." MISSING_LOOKUP_TIME: "Proszę określić czas na {wyszukiwanie|przywracanie|przywracanie}." @@ -139,8 +142,8 @@ PATCH_UPGRADING: "Trwa aktualizacja bazy danych. Proszę czekać..." PLEASE_SELECT: "Proszę wybrać: \"{0}\" lub \"{1}”." PREVIEW_CANCELLED: "Podgląd anulowany." PREVIEW_CANCELLING: "Anulowanie podglądu..." -PREVIEW_CONTAINER: "Nie możesz wyświetlić podglądu transakcji kontenerowych." PREVIEW_IN_GAME: "Możesz tylko podglądać wycofania w grze." +PREVIEW_TRANSACTION: "Nie możesz wyświetlić podglądu {kontener|inwentarz} transakcje." PURGE_ABORTED: "Czyszczenie nie powiodło się. Baza danych może być uszkodzona." PURGE_ERROR: "Nie można przetworzyć {0} dane!" PURGE_FAILED: "Czyszczenie nie powiodło się. Spróbuj ponownie później." @@ -189,6 +192,7 @@ UPDATE_HEADER: "{0} Aktualizacja" UPDATE_NOTICE: "Ogłoszenie: {0} jest teraz dostępne." UPGRADE_IN_PROGRESS: "Trwa aktualizacja. Spróbuj ponownie później." USER_NOT_FOUND: "Użytkownik \"{0}\" nie znaleziono." +USER_OFFLINE: "Użytkownik \"{0}\" nie jest online." USING_MYSQL: "Za pomocą MySQL do przechowywania danych." USING_SQLITE: "Za pomocą SQLite do przechowywania danych." VALID_DONATION_KEY: "Ważny klucz darowizny." diff --git a/lang/ru.yml b/lang/ru.yml index 9eed3122..ac339d27 100644 --- a/lang/ru.yml +++ b/lang/ru.yml @@ -9,8 +9,11 @@ API_TEST: "Тест API прошёл успешно!" CACHE_ERROR: "ВНИМАНИЕ: Ошибка при проверке кеша {0}." CACHE_RELOAD: "Принудительная перезагрузка кеша {отображения|мира} из базы данных." CHECK_CONFIG: "Пожалуйста, проверьте config.yml" +COMMAND_CONSOLE: "Пожалуйста, запустите команду из консоли." COMMAND_NOT_FOUND: "Команда «{0}» не найдена." COMMAND_THROTTLED: "Подождите немного и попробуйте еще раз." +CONSUMER_ERROR: "Обработка потребительской очереди уже {приостановлено|возобновлено}." +CONSUMER_TOGGLED: "Обработка очереди потребителей была {приостановлено|возобновлено}." CONTAINER_HEADER: "Контейнерные транзакции" DATABASE_BUSY: "База данных занята. Пожалуйста, повторите попытку позже." DATABASE_INDEX_ERROR: "Невозможно проверить индексы базы данных." @@ -108,12 +111,12 @@ LOOKUP_INTERACTION: "{0} {нажал|убил} {1}." LOOKUP_ITEM: "{0} {подобрал|выкинул} {1} {2}." LOOKUP_LOGIN: "{0} {вошёл|вышел}." LOOKUP_PAGE: "Страница {0}" +LOOKUP_PROJECTILE: "{0} {бросил|выстрелил} {1} {2}." LOOKUP_ROWS_FOUND: "{0} {строка|строк} найдено." LOOKUP_SEARCHING: "Ведётся поиск. Пожалуйста подождите..." LOOKUP_STORAGE: "{0} {положил|забрал} {1} {2}." LOOKUP_TIME: "{0} назад" LOOKUP_USERNAME: "{0} зарегистрирован как {1}." -LOOKUP_VIEW_PAGE: "Чтобы просмотреть страницу, введите «{0}»." MAXIMUM_RADIUS: "Максимальный радиус для {поиска|отката|восстановления} - {0}." MISSING_ACTION_USER: "Чтобы использовать это действие, укажите пользователя." MISSING_LOOKUP_TIME: "Пожалуйста, укажите количество времени, чтобы использовать {поиск|откат|восстановление}." @@ -139,8 +142,8 @@ PATCH_UPGRADING: "Выполняется обновление базы данн PLEASE_SELECT: "Пожалуйта выберете: «{0}» или «{1}»." PREVIEW_CANCELLED: "Предварительный просмотр отменен." PREVIEW_CANCELLING: "Отмена предварительного просмотра..." -PREVIEW_CONTAINER: "Вы не можете предварительно просмотреть контейнерные транзакции." PREVIEW_IN_GAME: "Предварительный просмотр откатов доступен только в игре." +PREVIEW_TRANSACTION: "Вы не можете просмотреть {контейнер|инвентарь} транзакции." PURGE_ABORTED: "Очистка не удалась. База данных может быть повреждена." PURGE_ERROR: "Невозможно обработать данные {0}!" PURGE_FAILED: "Очистка не удалась. Пожалуйста, повторите попытку позже." @@ -189,9 +192,10 @@ UPDATE_HEADER: "{0} Обновление" UPDATE_NOTICE: "Примечание: теперь доступен {0}." UPGRADE_IN_PROGRESS: "Выполняется обновление. Пожалуйста, повторите попытку позже." USER_NOT_FOUND: "Пользователь «{0}» не найден." +USER_OFFLINE: "Пользователь \"{0}\" нет в сети." USING_MYSQL: "Для хранения данных используется MySQL." USING_SQLITE: "Для хранения данных используется SQLite." VALID_DONATION_KEY: "Действующий ключ пожертвования." VERSION_NOTICE: "Версия {0} уже доступна!" VERSION_REQUIRED: "{0} {1} или выше требуется." -WORLD_NOT_FOUND: "Мир «{0}» не найден." +WORLD_NOT_FOUND: "Мир «{0}» не найден." \ No newline at end of file diff --git a/lang/uk.yml b/lang/uk.yml index e4168996..7a95ef17 100644 --- a/lang/uk.yml +++ b/lang/uk.yml @@ -9,8 +9,11 @@ API_TEST: "Тест API успішний." CACHE_ERROR: "УВАГА: Помилка під час перевірки {0} кеш." CACHE_RELOAD: "Примусове перезавантаження {картографування|світу} кеші з бази даних." CHECK_CONFIG: "Перевірте config.yml" +COMMAND_CONSOLE: "Будь ласка, запустіть команду з консолі." COMMAND_NOT_FOUND: "Команда \"{0}\" не знайдено." COMMAND_THROTTLED: "Зачекайте хвилину і повторіть спробу." +CONSUMER_ERROR: "Вже обробка черги споживачів {призупинено|відновлено}." +CONSUMER_TOGGLED: "Обробка черги споживачів була {призупинено|відновлено}." CONTAINER_HEADER: "Контейнерні операції" DATABASE_BUSY: "База даних зайнята. Будь-ласка спробуйте пізніше." DATABASE_INDEX_ERROR: "Неможливо перевірити індекси бази даних." @@ -108,12 +111,12 @@ LOOKUP_INTERACTION: "{0} {натиснув|убитий} {1}." LOOKUP_ITEM: "{0} {взяв|скинув} {1} {2}." LOOKUP_LOGIN: "{0} зареєстрований {в|з ~ ~}." LOOKUP_PAGE: "Сторінка {0}" +LOOKUP_PROJECTILE: "{0} {кинув|постріл} {1} {2}." LOOKUP_ROWS_FOUND: "{0} {рядок|рядки} знайдено." LOOKUP_SEARCHING: "Пошук під час пошуку. Будь ласка, зачекайте..." LOOKUP_STORAGE: "{0} {здано на зберігання|вилучено} {1} {2}." LOOKUP_TIME: "{0} тому" LOOKUP_USERNAME: "{0} Ви увійшли як {1}." -LOOKUP_VIEW_PAGE: "Щоб переглянути сторінку, введіть \"{0}\"." MAXIMUM_RADIUS: "Максимум {пошук|відкат|відновлення} радіус дорівнює {0}." MISSING_ACTION_USER: "Щоб використати цю дію, вкажіть користувача." MISSING_LOOKUP_TIME: "Будь ласка, вкажіть час до {пошук|відкат|відновлення}." @@ -139,8 +142,8 @@ PATCH_UPGRADING: "Триває оновлення бази даних. Будь PLEASE_SELECT: "Виберіть будь ласка: \"{0}\" або \"{1}\"." PREVIEW_CANCELLED: "Попередній перегляд скасовано." PREVIEW_CANCELLING: "Скасування попереднього перегляду..." -PREVIEW_CONTAINER: "Ви не можете переглядати транзакційні контейнери." PREVIEW_IN_GAME: "Попередній перегляд можна лише в грі." +PREVIEW_TRANSACTION: "Ви не можете попередньо переглянути {тару|інвентар} трансакцій." PURGE_ABORTED: "Помилка очищення. Можливо, база даних пошкоджена." PURGE_ERROR: "Не вдається обробити {0} дані!" PURGE_FAILED: "Помилка очищення. Будь-ласка спробуйте пізніше." @@ -189,6 +192,7 @@ UPDATE_HEADER: "{0} Оновлення" UPDATE_NOTICE: "Примітка: {0} тепер доступний." UPGRADE_IN_PROGRESS: "Оновлення триває. Будь-ласка спробуйте пізніше." USER_NOT_FOUND: "Користувач \"{0}\" не знайдено." +USER_OFFLINE: "Користувач \"{0}\" не в мережі." USING_MYSQL: "Використання MySQL для зберігання даних." USING_SQLITE: "Використання SQLite для зберігання даних." VALID_DONATION_KEY: "Дійсний ключ пожертви." diff --git a/lang/vi.yml b/lang/vi.yml index 88eec618..cc0536b7 100644 --- a/lang/vi.yml +++ b/lang/vi.yml @@ -9,8 +9,11 @@ API_TEST: "Kiểm tra API thành công." CACHE_ERROR: "CẢNH BÁO: Lỗi khi xác thực {0} bộ nhớ đệm." CACHE_RELOAD: "Buộc tải lại {lập bản đồ|thế giới} bộ nhớ đệm từ cơ sở dữ liệu." CHECK_CONFIG: "Vui lòng kiểm tra config.yml" +COMMAND_CONSOLE: "Vui lòng chạy lệnh từ bảng điều khiển." COMMAND_NOT_FOUND: "Yêu cầu \"{0}\" không tìm thấy." COMMAND_THROTTLED: "Vui lòng đợi trong giây lát và thử lại." +CONSUMER_ERROR: "Đã xử lý hàng đợi của người tiêu dùng {bị tạm dừng|tiếp tục}." +CONSUMER_TOGGLED: "Xử lý hàng đợi của người tiêu dùng đã được {bị tạm dừng|tiếp tục}." CONTAINER_HEADER: "Giao dịch vùng chứa" DATABASE_BUSY: "Cơ sở dữ liệu bận rộn. Vui lòng thử lại sau." DATABASE_INDEX_ERROR: "Không thể xác thực các chỉ mục cơ sở dữ liệu." @@ -108,12 +111,12 @@ LOOKUP_INTERACTION: "{0} {đã nhấp vào|giết} {1}." LOOKUP_ITEM: "{0} {nhặt lên|đánh rơi} {1} {2}." LOOKUP_LOGIN: "{0} ghi nhật ký {vào|ra}." LOOKUP_PAGE: "Trang {0}" +LOOKUP_PROJECTILE: "{0} {ném|bắn} {1} {2}." LOOKUP_ROWS_FOUND: "{0} {hàng|hàng} tìm." LOOKUP_SEARCHING: "Tra cứu tìm kiếm. Vui lòng chờ..." LOOKUP_STORAGE: "{0} {ký gửi|rút tiền} {1} {2}." LOOKUP_TIME: "{0} trước kia" LOOKUP_USERNAME: "{0} đăng nhập với tư cách {1}." -LOOKUP_VIEW_PAGE: "Để xem một trang, hãy nhập \"{0}\"." MAXIMUM_RADIUS: "Giá trị lớn nhất {tra cứu|khôi phục|khôi phục} bán kính là {0}." MISSING_ACTION_USER: "Để sử dụng hành động đó, vui lòng chỉ định người dùng." MISSING_LOOKUP_TIME: "Vui lòng xác định thời gian để {tra cứu|khôi phục|khôi phục}." @@ -139,8 +142,8 @@ PATCH_UPGRADING: "Đang nâng cấp cơ sở dữ liệu. Vui lòng chờ..." PLEASE_SELECT: "Xin hãy lựa chọn: \"{0}\" hoặc \"{1}\"." PREVIEW_CANCELLED: "Đã hủy bản xem trước." PREVIEW_CANCELLING: "Đang hủy bản xem trước..." -PREVIEW_CONTAINER: "Bạn không thể xem trước các giao dịch vùng chứa." PREVIEW_IN_GAME: "Bạn chỉ có thể xem trước các lần quay lại trong trò chơi." +PREVIEW_TRANSACTION: "Bạn không thể xem trước {container|hàng tồn kho} các giao dịch." PURGE_ABORTED: "Thanh trừng không thành công. Cơ sở dữ liệu có thể bị hỏng." PURGE_ERROR: "Không thể xử lý {0} dữ liệu!" PURGE_FAILED: "Thanh trừng không thành công. Vui lòng thử lại sau." @@ -189,6 +192,7 @@ UPDATE_HEADER: "{0} Cập nhật" UPDATE_NOTICE: "Lưu ý: {0} hiện đã có sẵn." UPGRADE_IN_PROGRESS: "Đang nâng cấp. Vui lòng thử lại sau." USER_NOT_FOUND: "Người sử dụng \"{0}\" không tìm thấy." +USER_OFFLINE: "Người dùng \"{0}\" không trực tuyến." USING_MYSQL: "Sử dụng MySQL để lưu trữ dữ liệu." USING_SQLITE: "Sử dụng SQLite để lưu trữ dữ liệu." VALID_DONATION_KEY: "Chìa khóa quyên góp hợp lệ." diff --git a/lang/zh-cn.yml b/lang/zh-cn.yml index 2584e244..b41ce79f 100644 --- a/lang/zh-cn.yml +++ b/lang/zh-cn.yml @@ -10,8 +10,11 @@ API_TEST: "API 测试成功。" CACHE_ERROR: "警告: 验证缓存 {0} 时出错。" CACHE_RELOAD: "正在强制从数据库中重新加载{映射|世界}的缓存。" CHECK_CONFIG: "请检查 config.yml 文件" +COMMAND_CONSOLE: "请从控制台运行命令。" COMMAND_NOT_FOUND: "找不到命令 \"{0}\"" COMMAND_THROTTLED: "请稍等片刻,然后重试。" +CONSUMER_ERROR: "消费者队列处理已经 {暂停|继续}." +CONSUMER_TOGGLED: "消费者队列处理已 {暂停|继续}." CONTAINER_HEADER: "容器物品变更记录" DATABASE_BUSY: "数据库繁忙,请稍后重试。" DATABASE_INDEX_ERROR: "无法验证数据库索引。" @@ -39,7 +42,7 @@ HELP_EXCLUDE_2: "例子: [e:stone], [e:Notch], [e:stone,Notch]" HELP_HEADER: "{0} 帮助" HELP_INCLUDE_1: "包括方块/实体。" HELP_INCLUDE_2: "例子: [i:stone], [i:zombie], [i:stone,wood,bedrock]" -HELP_INSPECT_1: "启用检查器后,你可以: " +HELP_INSPECT_1: "启用检查器后,你可以:" HELP_INSPECT_2: "左键单击以查看方块放置记录。" HELP_INSPECT_3: "右键单击以查看相邻方块破坏记录。" HELP_INSPECT_4: "放置一个方块以查看放置位置的破坏记录。" @@ -109,12 +112,12 @@ LOOKUP_INTERACTION: "{0} {点击|击杀} {1}." LOOKUP_ITEM: "{0} {拾起|丢弃} {1} {2}." LOOKUP_LOGIN: "{0} {登入|离开}." LOOKUP_PAGE: "第 {0} 页" +LOOKUP_PROJECTILE: "{0} {扔|射} {1} {2}." LOOKUP_ROWS_FOUND: "已找到 {0}{行|行}。" LOOKUP_SEARCHING: "正在搜索,请稍等..." LOOKUP_STORAGE: "{0} {放入|取出} {1} {2}." LOOKUP_TIME: "{0} 前" LOOKUP_USERNAME: "{0} 已登入为 {1}." -LOOKUP_VIEW_PAGE: "查看指定操作记录,请输入\"{0}\"。" MAXIMUM_RADIUS: "最大{查找|回滚|恢复}半径是 {0}." MISSING_ACTION_USER: "要使用该标识符,请指定玩家名。" MISSING_LOOKUP_TIME: "请指定{查找|回滚|恢复}时间." @@ -140,8 +143,8 @@ PATCH_UPGRADING: "正在进行数据库升级,请稍等..." PLEASE_SELECT: "请选择: \"{0}\"或\"{1}\"。" PREVIEW_CANCELLED: "预览已取消。" PREVIEW_CANCELLING: "正在取消预览..." -PREVIEW_CONTAINER: "你无法预览容器的存入取出操作。" PREVIEW_IN_GAME: "你只能在游戏中预览回滚操作。" +PREVIEW_TRANSACTION: "您无法预览 {集装箱|库存} 交易。" PURGE_ABORTED: "清除失败,数据库可能已损坏。" PURGE_ERROR: "无法处理 {0} 数据!" PURGE_FAILED: "数据清除失败,请稍后再试。" @@ -190,9 +193,10 @@ UPDATE_HEADER: "{0} 更新" UPDATE_NOTICE: "注意: {0} 现在可用。" UPGRADE_IN_PROGRESS: "正在进行升级,请稍后再试。" USER_NOT_FOUND: "玩家\"{0}\"未找到。" +USER_OFFLINE: "用户 \"{0}\"不在线。" USING_MYSQL: "使用 MySQL 用于数据存储。" USING_SQLITE: "使用 SQLite 用于数据存储。" VALID_DONATION_KEY: "有效的捐赠密钥。" VERSION_NOTICE: "版本 {0} 现在可用。" VERSION_REQUIRED: "{0} 需要使用 {1} 或更高版本。" -WORLD_NOT_FOUND: "找不到世界 \"{0}\"。" +WORLD_NOT_FOUND: "找不到世界 \"{0}\"。" \ No newline at end of file diff --git a/lang/zh-tw.yml b/lang/zh-tw.yml index c81b3a54..59b20297 100644 --- a/lang/zh-tw.yml +++ b/lang/zh-tw.yml @@ -10,8 +10,11 @@ API_TEST: "API 測試成功。" CACHE_ERROR: "警告: 驗證快取 {0} 時出現錯誤。" CACHE_RELOAD: "正在強制從資料庫中重新載入{鏡像|世界}快取。" CHECK_CONFIG: "請檢查 config.yml 檔案。" +COMMAND_CONSOLE: "請從控制台運行命令。" COMMAND_NOT_FOUND: "未知的指令 \"{0}\"。" COMMAND_THROTTLED: "請稍後再試。" +CONSUMER_ERROR: "消費者隊列處理已經 {暫停|繼續}." +CONSUMER_TOGGLED: "消費者隊列處理已 {暫停|繼續}." CONTAINER_HEADER: "儲存容器變更記錄。" DATABASE_BUSY: "資料庫繁忙,請稍後再試。" DATABASE_INDEX_ERROR: "無法驗證資料庫索引。" @@ -39,7 +42,7 @@ HELP_EXCLUDE_2: "範例: [e:stone], [e:Notch], [e:stone,Notch]" HELP_HEADER: "{0} 說明" HELP_INCLUDE_1: "包括指定的方塊/實體" HELP_INCLUDE_2: "範例: [i:stone], [i:zombie], [i:stone,wood,bedrock]" -HELP_INSPECT_1: "當檢查器啟用後,你可以執行以下操作: " +HELP_INSPECT_1: "當檢查器啟用後,你可以執行以下操作:" HELP_INSPECT_2: "對你欲查詢的方塊點擊左鍵,可以查看方塊放置記錄。" HELP_INSPECT_3: "對你欲查詢的方塊點擊右鍵,可以查看相鄰方塊破壞記錄。" HELP_INSPECT_4: "對你欲查詢的位置放置方塊,可以查看放置位置破壞記錄。" @@ -109,12 +112,12 @@ LOOKUP_INTERACTION: "{0} {點擊|殺死} {1}。" LOOKUP_ITEM: "{0} {撿起|拋棄} {1} {2}。" LOOKUP_LOGIN: "{0} 已登{入|出}。" LOOKUP_PAGE: "第 {0} 頁" +LOOKUP_PROJECTILE: "{0} {扔|射} {1} {2}." LOOKUP_ROWS_FOUND: "已找到 {0} {行|行}。" LOOKUP_SEARCHING: "正在搜尋,請稍候……" LOOKUP_STORAGE: "{0} {存|取} {1} {2}。" LOOKUP_TIME: "{0} 前" LOOKUP_USERNAME: "{0} 以 {1} 的身分登入。" -LOOKUP_VIEW_PAGE: "若要查看指定頁面,請輸入 \"{0}\"。" MAXIMUM_RADIUS: "最大 {查詢|回滾|恢復} 的範圍為 {0}。" MISSING_ACTION_USER: "若要使用此操作,請指定玩家。" MISSING_LOOKUP_TIME: "請指定{查詢|回滾|恢復}的時間範圍。" @@ -140,8 +143,8 @@ PATCH_UPGRADING: "正在進行資料庫升級,請稍候……" PLEASE_SELECT: "請選擇: \"{0}\" 或是 \"{1}\"。" PREVIEW_CANCELLED: "預覽已取消。" PREVIEW_CANCELLING: "正在取消預覽……" -PREVIEW_CONTAINER: "你無法預覽容器內的物品資料。" PREVIEW_IN_GAME: "你只能在遊戲中預覽回滾。" +PREVIEW_TRANSACTION: "您無法預覽 {集裝箱|庫存} 交易。" PURGE_ABORTED: "清除失敗,你的資料可能已損毀。" PURGE_ERROR: "無法處理 {0} 條資料 !" PURGE_FAILED: "清除失敗,請稍後再試。" @@ -190,9 +193,10 @@ UPDATE_HEADER: "{0} 更新" UPDATE_NOTICE: "通知: {0} 現已推出。" UPGRADE_IN_PROGRESS: "正在進行更新,請稍後再試。" USER_NOT_FOUND: "找不到玩家 \"{0}\"。" +USER_OFFLINE: "用戶 \"{0}\"不在線。" USING_MYSQL: "使用 MySQL 進行資料儲存。" USING_SQLITE: "使用 SQLite 進行資料儲存。" VALID_DONATION_KEY: "有效的贈品金鑰" VERSION_NOTICE: "版本 {0} 現已推出。" -VERSION_REQUIRED: "{0} 需要使用 {1} 或更高版本。 " -WORLD_NOT_FOUND: "世界: \"{0}\" 不存在。" +VERSION_REQUIRED: "{0} 需要使用 {1} 或更高版本。" +WORLD_NOT_FOUND: "世界: \"{0}\" 不存在。" \ No newline at end of file diff --git a/mkdocs.yml b/mkdocs.yml index b61cbfb5..fb9d4a01 100644 --- a/mkdocs.yml +++ b/mkdocs.yml @@ -4,4 +4,4 @@ theme: readthedocs repo_url: https://github.com/PlayPro/CoreProtect docs_dir: 'docs' extra_css: - - css/extra.css \ No newline at end of file + - css/extra.css \ No newline at end of file diff --git a/pom.xml b/pom.xml index 6607a8e1..ef75c92d 100755 --- a/pom.xml +++ b/pom.xml @@ -2,7 +2,7 @@ 4.0.0 net.coreprotect CoreProtect - 20.4 + 21.0 UTF-8 diff --git a/src/main/java/net/coreprotect/CoreProtectAPI.java b/src/main/java/net/coreprotect/CoreProtectAPI.java index 52440d03..776e92fe 100755 --- a/src/main/java/net/coreprotect/CoreProtectAPI.java +++ b/src/main/java/net/coreprotect/CoreProtectAPI.java @@ -168,7 +168,7 @@ else if (value instanceof Integer) { } public int APIVersion() { - return 8; + return 9; } public List blockLookup(Block block, int time) {