Fixed CoreProtect API ParseResult backwards compatibility
This commit is contained in:
parent
898bcf2465
commit
8f8a263278
3 changed files with 14 additions and 3 deletions
|
|
@ -20,7 +20,6 @@ import org.bukkit.entity.Player;
|
||||||
import net.coreprotect.api.BlockAPI;
|
import net.coreprotect.api.BlockAPI;
|
||||||
import net.coreprotect.api.QueueLookup;
|
import net.coreprotect.api.QueueLookup;
|
||||||
import net.coreprotect.api.SessionLookup;
|
import net.coreprotect.api.SessionLookup;
|
||||||
import net.coreprotect.api.result.ParseResult;
|
|
||||||
import net.coreprotect.config.Config;
|
import net.coreprotect.config.Config;
|
||||||
import net.coreprotect.consumer.Queue;
|
import net.coreprotect.consumer.Queue;
|
||||||
import net.coreprotect.database.Database;
|
import net.coreprotect.database.Database;
|
||||||
|
|
@ -44,6 +43,19 @@ public class CoreProtectAPI extends Queue {
|
||||||
*/
|
*/
|
||||||
private static final int API_VERSION = 10;
|
private static final int API_VERSION = 10;
|
||||||
|
|
||||||
|
public static class ParseResult extends net.coreprotect.api.result.ParseResult {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Creates a new ParseResult from string array data.
|
||||||
|
*
|
||||||
|
* @param data
|
||||||
|
* The string array data to parse
|
||||||
|
*/
|
||||||
|
public ParseResult(String[] data) {
|
||||||
|
super(data);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Converts a list of objects to a map for internal processing
|
* Converts a list of objects to a map for internal processing
|
||||||
*
|
*
|
||||||
|
|
|
||||||
|
|
@ -136,7 +136,7 @@ public class ConfigHandler extends Queue {
|
||||||
public static ConcurrentHashMap<String, String> language = new ConcurrentHashMap<>();
|
public static ConcurrentHashMap<String, String> language = new ConcurrentHashMap<>();
|
||||||
public static List<String> databaseTables = new ArrayList<>();
|
public static List<String> databaseTables = new ArrayList<>();
|
||||||
|
|
||||||
private static void checkPlayers(Connection connection) {
|
public static void checkPlayers(Connection connection) {
|
||||||
ConfigHandler.playerIdCache.clear();
|
ConfigHandler.playerIdCache.clear();
|
||||||
ConfigHandler.playerIdCacheReversed.clear();
|
ConfigHandler.playerIdCacheReversed.clear();
|
||||||
for (Player player : Bukkit.getServer().getOnlinePlayers()) {
|
for (Player player : Bukkit.getServer().getOnlinePlayers()) {
|
||||||
|
|
|
||||||
|
|
@ -10,7 +10,6 @@ import org.bukkit.entity.Fox;
|
||||||
import org.bukkit.entity.Ravager;
|
import org.bukkit.entity.Ravager;
|
||||||
import org.bukkit.entity.Silverfish;
|
import org.bukkit.entity.Silverfish;
|
||||||
import org.bukkit.entity.Turtle;
|
import org.bukkit.entity.Turtle;
|
||||||
import org.bukkit.entity.WindCharge;
|
|
||||||
import org.bukkit.entity.Wither;
|
import org.bukkit.entity.Wither;
|
||||||
import org.bukkit.event.EventHandler;
|
import org.bukkit.event.EventHandler;
|
||||||
import org.bukkit.event.EventPriority;
|
import org.bukkit.event.EventPriority;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue