Skip to content

Commit b731462

Browse files
committed
Pick createEmptyInstance method from the origin repo
1 parent 01a846a commit b731462

1 file changed

Lines changed: 9 additions & 0 deletions

File tree

  • src/main/java/net/minestom/testing

src/main/java/net/minestom/testing/Env.java

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -149,6 +149,15 @@ default boolean tickWhile(@NotNull BooleanSupplier condition, @Nullable Duration
149149
return instance;
150150
}
151151

152+
/**
153+
* Creates a new {@link Instance} which is empty and can be used in the test environment.
154+
*
155+
* @return the created instance
156+
*/
157+
default @NotNull Instance createEmptyInstance() {
158+
return process().instance().createInstanceContainer();
159+
}
160+
152161
/**
153162
* Destroys the given {@link Instance} from the test environment.
154163
* Note: This method does not remove players from the instance.

0 commit comments

Comments
 (0)