Gates can not be created on existing gates
This commit is contained in:
parent
b9d9ee7c4f
commit
b54c7ce62f
7
README
7
README
@ -126,6 +126,13 @@ toowner - Whether the money from gate-use goes to the owner or nobody
|
|||||||
=============
|
=============
|
||||||
Changes
|
Changes
|
||||||
=============
|
=============
|
||||||
|
[Version 0.4.2]
|
||||||
|
- Gates can't be created on existing gate blocks
|
||||||
|
[Version 0.4.1]
|
||||||
|
- Sign option permissions
|
||||||
|
- Per-gate iconomy target
|
||||||
|
- /sg reload command
|
||||||
|
- Other misc fixes
|
||||||
[Version 0.4.0]
|
[Version 0.4.0]
|
||||||
- Carts with no player can now go through gates.
|
- Carts with no player can now go through gates.
|
||||||
- You can set gates to send their cost to their owner.
|
- You can set gates to send their cost to their owner.
|
||||||
|
@ -556,6 +556,7 @@ public class Portal {
|
|||||||
Block idParent = id.getParent();
|
Block idParent = id.getParent();
|
||||||
if (idParent == null) return null;
|
if (idParent == null) return null;
|
||||||
if (Gate.getGatesByControlBlock(idParent).length == 0) 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 parent = new Blox(player.getWorld(), idParent.getX(), idParent.getY(), idParent.getZ());
|
||||||
Blox topleft = null;
|
Blox topleft = null;
|
||||||
@ -650,6 +651,12 @@ public class Portal {
|
|||||||
return null;
|
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.useiConomy() && !Stargate.hasPerm(player, "stargate.free.create", player.isOp())) {
|
||||||
if (!iConomyHandler.chargePlayer(player.getName(), null, gate.getCreateCost())) {
|
if (!iConomyHandler.chargePlayer(player.getName(), null, gate.getCreateCost())) {
|
||||||
if (!iConomyHandler.inFundMsg.isEmpty()) {
|
if (!iConomyHandler.inFundMsg.isEmpty()) {
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
name: Stargate
|
name: Stargate
|
||||||
main: net.TheDgtl.Stargate.Stargate
|
main: net.TheDgtl.Stargate.Stargate
|
||||||
version: 0.4.1
|
version: 0.4.2
|
||||||
description: Stargate mod for Bukkit
|
description: Stargate mod for Bukkit
|
||||||
author: Drakia
|
author: Drakia
|
||||||
website: http://www.thedgtl.net
|
website: http://www.thedgtl.net
|
||||||
|
Loading…
Reference in New Issue
Block a user