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
|
||||
=============
|
||||
[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]
|
||||
- Carts with no player can now go through gates.
|
||||
- You can set gates to send their cost to their owner.
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user