mirror of
https://github.com/sekwah41/Advanced-Portals.git
synced 2024-11-22 02:25:49 +01:00
Updating block placer
This commit is contained in:
parent
6f6b2ca440
commit
fb6700c667
@ -115,13 +115,13 @@ public class CoreListeners {
|
||||
*/
|
||||
public boolean playerInteractWithBlock(PlayerContainer player, String materialName, String itemName,
|
||||
PortalLocation blockLoc, boolean leftClick) {
|
||||
if((player.isOp() || player.hasPermission("advancedportals.createportal")) &&
|
||||
if(itemName != null && (player.isOp() || player.hasPermission("advancedportals.createportal")) &&
|
||||
materialName.equalsIgnoreCase(this.portalsCore.getConfig().getSelectorMaterial())
|
||||
&& (!this.portalsCore.getConfig().getUseOnlySpecialAxe() || itemName.equals("\u00A7ePortal Region Selector"))) {
|
||||
AdvancedPortalsCore.getPortalManager().playerSelectorActivate(player, blockLoc, leftClick);
|
||||
return false;
|
||||
}
|
||||
else if(leftClick && itemName.equals("\u00A75Portal Block Placer") && player.hasPermission("advancedportals.build")) {
|
||||
else if(itemName != null && leftClick && itemName.equals("\u00A75Portal Block Placer") && player.hasPermission("advancedportals.build")) {
|
||||
WorldContainer world = player.getWorld();
|
||||
if(world.getBlockData(blockLoc) == 1) {
|
||||
world.setBlockData(blockLoc, (byte) 2);
|
||||
|
Loading…
Reference in New Issue
Block a user