Gates can not be created on existing gates
This commit is contained in:
@ -556,6 +556,7 @@ public class Portal {
|
||||
Block idParent = id.getParent();
|
||||
if (idParent == null) return null;
|
||||
if (Gate.getGatesByControlBlock(idParent).length == 0) return null;
|
||||
if (Portal.getByBlock(idParent) != null) return null;
|
||||
|
||||
Blox parent = new Blox(player.getWorld(), idParent.getX(), idParent.getY(), idParent.getZ());
|
||||
Blox topleft = null;
|
||||
@ -650,6 +651,12 @@ public class Portal {
|
||||
return null;
|
||||
}
|
||||
|
||||
// Bleh, gotta check to make sure none of this gate belongs to another gate. Boo slow.
|
||||
for (RelativeBlockVector v : gate.getBorder()) {
|
||||
Blox b = topleft.modRelative(v.getRight(), v.getDepth(), v.getDistance(), modX, 1, modZ);
|
||||
if (Portal.getByBlock(b.getBlock()) != null) return null;
|
||||
}
|
||||
|
||||
if (iConomyHandler.useiConomy() && !Stargate.hasPerm(player, "stargate.free.create", player.isOp())) {
|
||||
if (!iConomyHandler.chargePlayer(player.getName(), null, gate.getCreateCost())) {
|
||||
if (!iConomyHandler.inFundMsg.isEmpty()) {
|
||||
|
@ -1,6 +1,6 @@
|
||||
name: Stargate
|
||||
main: net.TheDgtl.Stargate.Stargate
|
||||
version: 0.4.1
|
||||
version: 0.4.2
|
||||
description: Stargate mod for Bukkit
|
||||
author: Drakia
|
||||
website: http://www.thedgtl.net
|
||||
|
Reference in New Issue
Block a user