Skip to content

Commit

Permalink
[CI skip] Merge pull request #108 from qwertyuioplkjhgfd/master
Browse files Browse the repository at this point in the history
ci skipping because ive got a few more bugfixes to do in the same update
  • Loading branch information
Seggan authored Jan 9, 2022
2 parents 4ca253d + 24226f3 commit 8026602
Showing 1 changed file with 8 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,8 @@
import io.github.thebusybiscuit.slimefun4.api.recipes.RecipeType;
import io.github.thebusybiscuit.slimefun4.core.handlers.BlockPlaceHandler;
import io.github.thebusybiscuit.slimefun4.core.handlers.BlockUseHandler;
import io.github.thebusybiscuit.slimefun4.implementation.Slimefun;
import io.github.thebusybiscuit.slimefun4.libraries.dough.protection.Interaction;
import io.github.thebusybiscuit.slimefun4.libraries.paperlib.PaperLib;
import io.github.thebusybiscuit.slimefun4.utils.ChatUtils;
import me.mrCookieSlime.Slimefun.api.BlockStorage;
Expand Down Expand Up @@ -235,6 +237,12 @@ public void run() {
destBlock = to.getBlockAt(x, to.getMaxHeight() - 4, z);
}

if (!Slimefun.getProtectionManager().hasPermission(p, destBlock, Interaction.PLACE_BLOCK)) {
p.sendMessage(ChatColor.RED + "Launch was not successful! You do not have permission to land there!");
BlockStorage.addBlockInfo(rocket, "isLaunching", "false");
return;
}

destBlock.setType(Material.CHEST);
BlockState state = PaperLib.getBlockState(destBlock, false).getState();
if (state instanceof Chest chest) {
Expand Down

1 comment on commit 8026602

@KillerSword
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

did you forget #107
fix it plz;(

Please sign in to comment.