mirror of
https://github.com/StarWishsama/Slimefun4.git
synced 2024-09-19 19:25:48 +00:00
Fixes #2162
This commit is contained in:
parent
e380f8b972
commit
2fc18aed0a
@ -49,6 +49,8 @@
|
||||
* General performance improvements for Talismans
|
||||
* General performance improvements for GPS Emergency Transmitters
|
||||
* General performance improvements for Infused Magnets
|
||||
* Ancient Altars now support for protection plugins
|
||||
* Ancient Pedestals now support for protection plugins
|
||||
|
||||
#### Fixes
|
||||
* Fixed Slimefun Armor sometimes not applying its effects
|
||||
@ -68,6 +70,7 @@
|
||||
* Fixed old GPS Emergency Transmitters not working
|
||||
* Fixed #2156
|
||||
* Fixed #2165
|
||||
* Fixed #2162
|
||||
|
||||
## Release Candidate 14 (12 Jul 2020)
|
||||
|
||||
|
@ -29,6 +29,7 @@ import org.bukkit.util.Vector;
|
||||
|
||||
import io.github.thebusybiscuit.cscorelib2.inventory.ItemUtils;
|
||||
import io.github.thebusybiscuit.cscorelib2.item.CustomItem;
|
||||
import io.github.thebusybiscuit.cscorelib2.protection.ProtectableAction;
|
||||
import io.github.thebusybiscuit.slimefun4.api.events.PlayerRightClickEvent;
|
||||
import io.github.thebusybiscuit.slimefun4.implementation.SlimefunItems;
|
||||
import io.github.thebusybiscuit.slimefun4.implementation.SlimefunPlugin;
|
||||
@ -128,6 +129,11 @@ public class AncientAltarListener implements Listener {
|
||||
return;
|
||||
}
|
||||
|
||||
if (!SlimefunPlugin.getProtectionManager().hasPermission(p, pedestal, ProtectableAction.ACCESS_INVENTORIES)) {
|
||||
SlimefunPlugin.getLocalization().sendMessage(p, "inventory.no-access", true);
|
||||
return;
|
||||
}
|
||||
|
||||
// getting the currently placed item
|
||||
Item stack = findItem(pedestal);
|
||||
|
||||
@ -157,6 +163,11 @@ public class AncientAltarListener implements Listener {
|
||||
}
|
||||
|
||||
private void useAltar(Block altar, Player p) {
|
||||
if (!SlimefunPlugin.getProtectionManager().hasPermission(p, altar, ProtectableAction.ACCESS_INVENTORIES)) {
|
||||
SlimefunPlugin.getLocalization().sendMessage(p, "inventory.no-access", true);
|
||||
return;
|
||||
}
|
||||
|
||||
ItemStack catalyst = new CustomItem(p.getInventory().getItemInMainHand(), 1);
|
||||
List<Block> pedestals = getPedestals(altar);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user