mirror of
https://github.com/BentoBoxWorld/Limits.git
synced 2025-02-20 14:21:42 +01:00
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>
|
||||
<!-- More visible way how to change dependency versions -->
|
||||
<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>${build.version}-SNAPSHOT</revision>
|
||||
<!-- Do not change unless you want different name for local builds. -->
|
||||
<build.number>-LOCAL</build.number>
|
||||
<!-- This allows to change between versions. -->
|
||||
<build.version>1.13.0</build.version>
|
||||
<build.version>1.14.0</build.version>
|
||||
</properties>
|
||||
|
||||
<!-- Profiles will allow to automatically change build version. -->
|
||||
|
@ -7,11 +7,13 @@ import java.util.UUID;
|
||||
import com.google.gson.annotations.Expose;
|
||||
|
||||
import world.bentobox.bentobox.database.objects.DataObject;
|
||||
import world.bentobox.bentobox.database.objects.Table;
|
||||
|
||||
/**
|
||||
* @author tastybento
|
||||
*
|
||||
*/
|
||||
@Table(name = "EntityLimits")
|
||||
public class EntityLimitsDO implements DataObject {
|
||||
|
||||
@Expose
|
||||
|
@ -9,11 +9,13 @@ import org.bukkit.entity.EntityType;
|
||||
import com.google.gson.annotations.Expose;
|
||||
|
||||
import world.bentobox.bentobox.database.objects.DataObject;
|
||||
import world.bentobox.bentobox.database.objects.Table;
|
||||
|
||||
/**
|
||||
* @author tastybento
|
||||
*
|
||||
*/
|
||||
@Table(name = "IslandBlockCount")
|
||||
public class IslandBlockCount implements DataObject {
|
||||
|
||||
@Expose
|
||||
@ -175,7 +177,7 @@ public class IslandBlockCount implements DataObject {
|
||||
public void setEntityLimits(Map<EntityType, Integer> entityLimits) {
|
||||
this.entityLimits = entityLimits;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Set an island-specific entity type limit
|
||||
* @param t - entity type
|
||||
@ -184,7 +186,7 @@ public class IslandBlockCount implements DataObject {
|
||||
public void setEntityLimit(EntityType t, int limit) {
|
||||
entityLimits.put(t, limit);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Get the limit for an entity type
|
||||
* @param t - entity type
|
||||
@ -193,12 +195,12 @@ public class IslandBlockCount implements DataObject {
|
||||
public int getEntityLimit(EntityType t) {
|
||||
return entityLimits.getOrDefault(t, -1);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Clear all island-specific entity type limits
|
||||
*/
|
||||
public void clearEntityLimits() {
|
||||
entityLimits.clear();
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
@ -1,7 +1,7 @@
|
||||
name: Limits
|
||||
main: world.bentobox.limits.Limits
|
||||
version: ${version}${build.number}
|
||||
api-version: 1.13
|
||||
api-version: 1.14
|
||||
|
||||
authors: tastybento
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user