Skip to content

Commit 1144295

Browse files
committed
Update to 0.9.7, fix minor fake entity api issues
1 parent df61520 commit 1144295

File tree

2 files changed

+5
-4
lines changed

2 files changed

+5
-4
lines changed

api/src/main/java/eu/darkbot/api/game/entities/FakeEntity.java

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -76,8 +76,8 @@ default FakeEntity.FakeMine mine(Mine.Type type) {
7676
FakeEntity.FakeNpc npc(NpcInfo npcInfo);
7777
FakeEntity.FakeNpc npc(String npcName);
7878

79-
FakeEntity.FakeNpc box(BoxInfo box);
80-
FakeEntity.FakeNpc box(String boxName);
79+
FakeEntity.FakeBox box(BoxInfo box);
80+
FakeEntity.FakeBox box(String boxName);
8181

8282
abstract class Impl implements Builder {
8383
private Long keepAlive;
@@ -109,11 +109,12 @@ public Builder removeOnSelect(boolean removeOnSelect) {
109109
return this;
110110
}
111111

112-
protected void apply(FakeEntity entity) {
112+
protected <T extends FakeEntity> T apply(T entity) {
113113
if (keepAlive != null) entity.setTimeout(keepAlive);
114114
if (location != null) entity.setLocation(location);
115115
if (removeDistance != null) entity.setRemoveDistance(removeDistance);
116116
entity.setRemoveOnSelect(removeOnSelect);
117+
return entity;
117118
}
118119
}
119120
}

build.gradle.kts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ dependencies {
2121
api(project(":darkbot-shared"))
2222
}
2323

24-
val apiVersion = "0.9.6"
24+
val apiVersion = "0.9.7"
2525

2626
allprojects {
2727
group = "eu.darkbot"

0 commit comments

Comments
 (0)