1
mirror of https://github.com/StarWishsama/Slimefun4.git synced 2024-09-20 03:35:51 +00:00

Update src/main/java/io/github/thebusybiscuit/slimefun4/utils/InfiniteBlockGenerator.java

This commit is contained in:
TheBusyBiscuit 2020-12-24 16:17:20 +01:00 committed by GitHub
parent 2199fb2cd0
commit e88682c13b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -147,6 +147,7 @@ public enum InfiniteBlockGenerator implements Predicate<Block> {
*/ */
@Nonnull @Nonnull
public BlockFormEvent callEvent(@Nonnull Block block) { public BlockFormEvent callEvent(@Nonnull Block block) {
Validate.notNull(block, "The Block cannot be null!");
BlockState state = PaperLib.getBlockState(block, false).getState(); BlockState state = PaperLib.getBlockState(block, false).getState();
BlockFormEvent event = new BlockFormEvent(block, state); BlockFormEvent event = new BlockFormEvent(block, state);
Bukkit.getPluginManager().callEvent(event); Bukkit.getPluginManager().callEvent(event);