Update to BentoBox 1.14 API
Shorter table names for SQL DBs. Async db saving.
This commit is contained in:
parent
2329e2c61e
commit
4ca3455d5b
4
pom.xml
4
pom.xml
|
@ -58,13 +58,13 @@
|
||||||
<powermock.version>2.0.2</powermock.version>
|
<powermock.version>2.0.2</powermock.version>
|
||||||
<!-- More visible way how to change dependency versions -->
|
<!-- More visible way how to change dependency versions -->
|
||||||
<spigot.version>1.15.2-R0.1-SNAPSHOT</spigot.version>
|
<spigot.version>1.15.2-R0.1-SNAPSHOT</spigot.version>
|
||||||
<bentobox.version>1.13.1</bentobox.version>
|
<bentobox.version>1.14.0-SNAPSHOT</bentobox.version>
|
||||||
<!-- Revision variable removes warning about dynamic version -->
|
<!-- Revision variable removes warning about dynamic version -->
|
||||||
<revision>${build.version}-SNAPSHOT</revision>
|
<revision>${build.version}-SNAPSHOT</revision>
|
||||||
<!-- Do not change unless you want different name for local builds. -->
|
<!-- Do not change unless you want different name for local builds. -->
|
||||||
<build.number>-LOCAL</build.number>
|
<build.number>-LOCAL</build.number>
|
||||||
<!-- This allows to change between versions. -->
|
<!-- This allows to change between versions. -->
|
||||||
<build.version>1.13.0</build.version>
|
<build.version>1.14.0</build.version>
|
||||||
</properties>
|
</properties>
|
||||||
|
|
||||||
<!-- Profiles will allow to automatically change build version. -->
|
<!-- Profiles will allow to automatically change build version. -->
|
||||||
|
|
|
@ -7,11 +7,13 @@ import java.util.UUID;
|
||||||
import com.google.gson.annotations.Expose;
|
import com.google.gson.annotations.Expose;
|
||||||
|
|
||||||
import world.bentobox.bentobox.database.objects.DataObject;
|
import world.bentobox.bentobox.database.objects.DataObject;
|
||||||
|
import world.bentobox.bentobox.database.objects.Table;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @author tastybento
|
* @author tastybento
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
@Table(name = "EntityLimits")
|
||||||
public class EntityLimitsDO implements DataObject {
|
public class EntityLimitsDO implements DataObject {
|
||||||
|
|
||||||
@Expose
|
@Expose
|
||||||
|
|
|
@ -9,11 +9,13 @@ import org.bukkit.entity.EntityType;
|
||||||
import com.google.gson.annotations.Expose;
|
import com.google.gson.annotations.Expose;
|
||||||
|
|
||||||
import world.bentobox.bentobox.database.objects.DataObject;
|
import world.bentobox.bentobox.database.objects.DataObject;
|
||||||
|
import world.bentobox.bentobox.database.objects.Table;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @author tastybento
|
* @author tastybento
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
@Table(name = "IslandBlockCount")
|
||||||
public class IslandBlockCount implements DataObject {
|
public class IslandBlockCount implements DataObject {
|
||||||
|
|
||||||
@Expose
|
@Expose
|
||||||
|
@ -175,7 +177,7 @@ public class IslandBlockCount implements DataObject {
|
||||||
public void setEntityLimits(Map<EntityType, Integer> entityLimits) {
|
public void setEntityLimits(Map<EntityType, Integer> entityLimits) {
|
||||||
this.entityLimits = entityLimits;
|
this.entityLimits = entityLimits;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Set an island-specific entity type limit
|
* Set an island-specific entity type limit
|
||||||
* @param t - entity type
|
* @param t - entity type
|
||||||
|
@ -184,7 +186,7 @@ public class IslandBlockCount implements DataObject {
|
||||||
public void setEntityLimit(EntityType t, int limit) {
|
public void setEntityLimit(EntityType t, int limit) {
|
||||||
entityLimits.put(t, limit);
|
entityLimits.put(t, limit);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Get the limit for an entity type
|
* Get the limit for an entity type
|
||||||
* @param t - entity type
|
* @param t - entity type
|
||||||
|
@ -193,12 +195,12 @@ public class IslandBlockCount implements DataObject {
|
||||||
public int getEntityLimit(EntityType t) {
|
public int getEntityLimit(EntityType t) {
|
||||||
return entityLimits.getOrDefault(t, -1);
|
return entityLimits.getOrDefault(t, -1);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Clear all island-specific entity type limits
|
* Clear all island-specific entity type limits
|
||||||
*/
|
*/
|
||||||
public void clearEntityLimits() {
|
public void clearEntityLimits() {
|
||||||
entityLimits.clear();
|
entityLimits.clear();
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
name: Limits
|
name: Limits
|
||||||
main: world.bentobox.limits.Limits
|
main: world.bentobox.limits.Limits
|
||||||
version: ${version}${build.number}
|
version: ${version}${build.number}
|
||||||
api-version: 1.13
|
api-version: 1.14
|
||||||
|
|
||||||
authors: tastybento
|
authors: tastybento
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue