[Version 0.7.5.1]

- Don't create button on failed creation
This commit is contained in:
Steven Scott 2012-02-02 22:52:33 -08:00
parent b4e4b50d60
commit 425d5a988d
3 changed files with 11 additions and 9 deletions

2
README
View File

@ -201,6 +201,8 @@ createConflict=Gate conflicts with existing gate
============= =============
Changes Changes
============= =============
[Version 0.7.5.1]
- Don't create button on failed creation
[Version 0.7.5.0] [Version 0.7.5.0]
- Refactored creation code a bit - Refactored creation code a bit
- Added StargateCreateEvent, see Stargate-API for usage. - Added StargateCreateEvent, see Stargate-API for usage.

View File

@ -936,14 +936,6 @@ public class Portal {
cost = cEvent.getCost(); cost = cEvent.getCost();
// No button on an always-open gate.
if (!alwaysOn) {
button = topleft.modRelative(buttonVector.getRight(), buttonVector.getDepth(), buttonVector.getDistance() + 1, modX, 1, modZ);
button.setType(Material.STONE_BUTTON.getId());
button.setData(facing);
portal.setButton(button);
}
// Name & Network can be changed in the event, so do these checks here. // Name & Network can be changed in the event, so do these checks here.
if (portal.getName().length() < 1 || portal.getName().length() > 11) { if (portal.getName().length() < 1 || portal.getName().length() > 11) {
Stargate.debug("createPortal", "Name length error"); Stargate.debug("createPortal", "Name length error");
@ -977,6 +969,14 @@ public class Portal {
Stargate.sendMessage(player, deductMsg, false); Stargate.sendMessage(player, deductMsg, false);
} }
// No button on an always-open gate.
if (!alwaysOn) {
button = topleft.modRelative(buttonVector.getRight(), buttonVector.getDepth(), buttonVector.getDistance() + 1, modX, 1, modZ);
button.setType(Material.STONE_BUTTON.getId());
button.setData(facing);
portal.setButton(button);
}
portal.register(); portal.register();
portal.drawSign(); portal.drawSign();
// Open always on gate // Open always on gate

View File

@ -1,6 +1,6 @@
name: Stargate name: Stargate
main: net.TheDgtl.Stargate.Stargate main: net.TheDgtl.Stargate.Stargate
version: 0.7.5.0 version: 0.7.5.1
description: Stargate mod for Bukkit description: Stargate mod for Bukkit
author: Drakia author: Drakia
website: http://www.thedgtl.net website: http://www.thedgtl.net