Random tweaks for permissions

This commit is contained in:
Steven Scott
2012-05-11 16:24:29 -07:00
parent b3e84ae958
commit b9ba01031e
3 changed files with 16 additions and 4 deletions

View File

@ -137,8 +137,8 @@ public class Portal {
}
if (this.random && !this.isAlwaysOn()) {
this.random = false;
Stargate.debug("Portal", "Can not create a random gate that is not always on");
this.alwaysOn = true;
Stargate.debug("Portal", "Gate marked as random, set to always-on");
}
if (verified) {
@ -883,9 +883,10 @@ public class Portal {
if (backwards && !Stargate.canOption(player, "backwards")) backwards = false;
if (show && !Stargate.canOption(player, "show")) show = false;
if (noNetwork && !Stargate.canOption(player, "nonetwork")) noNetwork = false;
if (random && !Stargate.canOption(player, "random")) random = false;
// Can not create a non-fixed always-on gate.
if (alwaysOn && destName.length() == 0 && !random) {
if (alwaysOn && destName.length() == 0) {
alwaysOn = false;
}
@ -894,6 +895,12 @@ public class Portal {
show = false;
}
// Random gates are always on and can't be shown
if (random) {
alwaysOn = true;
show = false;
}
// Moved the layout check so as to avoid invalid messages when not making a gate
int modX = 0;
int modZ = 0;

View File

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