Fix silly mixup with an if statement
Use Stargates permission handling for easier debugging
This commit is contained in:
81
README
81
README
@@ -0,0 +1,81 @@
|
|||||||
|
=============
|
||||||
|
Updates
|
||||||
|
=============
|
||||||
|
Please visit http://forum.thedgtl.net for all updates and support!
|
||||||
|
|
||||||
|
=============
|
||||||
|
Description
|
||||||
|
=============
|
||||||
|
StargateCommand is an addon for Stargate that adds three very useful commands: import, export, and dial.
|
||||||
|
|
||||||
|
=============
|
||||||
|
Dependencies
|
||||||
|
=============
|
||||||
|
Stargate -- http://thedgtl.net/bukkit/
|
||||||
|
|
||||||
|
=============
|
||||||
|
Permissions
|
||||||
|
=============
|
||||||
|
stargate.command.import -- Allow the use of /sgc import (Default: Op)
|
||||||
|
stargate.command.export -- Allow the use of /sgc export (Default: Op)
|
||||||
|
stargate.command.dial -- Allow the use of /dial (Default: True)
|
||||||
|
stargate.command.dial.interactive -- Allow use of /dial <dest> (Default: True)
|
||||||
|
stargate.command.dial.direct -- Allow use of /dial <src> <dest> (Default: False)
|
||||||
|
|
||||||
|
=============
|
||||||
|
Default Permissions
|
||||||
|
=============
|
||||||
|
stargate.command.import -- Op
|
||||||
|
stargate.command.export -- Op
|
||||||
|
stargate.command.dial -- True
|
||||||
|
stargate.command.dial.interactive -- True
|
||||||
|
stargate.command.dial.direct -- False
|
||||||
|
|
||||||
|
=============
|
||||||
|
Import
|
||||||
|
=============
|
||||||
|
The "/sgc import" command allows you to import a .gate file without having to manually build it. To import a gate you simply type:
|
||||||
|
/sgc import <gatefile>
|
||||||
|
Where <gatefile> is any .gate file without ".gate" at the end. You will then be asked to select two blocks next to each other by right clicking them, this specifies the gates bottom-left location, and orientation.
|
||||||
|
You can see an example of importing a gate in this YouTube video: http://youtu.be/Y7KQ0wUUP8c
|
||||||
|
|
||||||
|
=============
|
||||||
|
Export
|
||||||
|
=============
|
||||||
|
The "/sgc export" command is slightly more complicated than importing, but will allow you to take a gate layout ingame, and export it to a .gate file without having to hand-edit the file.
|
||||||
|
The first step in building a gate for export is creating a frame out of bedrock material, everything inside of this frame will be treated as the gate, and any bedrock inside of this frame will be treated as the entrance/exit.
|
||||||
|
Once you have your bedrock frame created, make any shape with any blocks inside of the frame, here is an example export frame: Export Frame
|
||||||
|
Once you are happy with the gate, run the command:
|
||||||
|
/sgc export <gatefile>
|
||||||
|
You will then be asked to select a few blocks:
|
||||||
|
-------------------------------------------------------
|
||||||
|
The first block is where the sign will be drawn
|
||||||
|
The second block is where the button will be drawn
|
||||||
|
The third block is where the player will exit the gate
|
||||||
|
The last block is the top-left of the bedrock frame
|
||||||
|
Once you have selected these four blocks, if there were no errors, your gate will be saved to disk, and loaded into memory for instant use.
|
||||||
|
You can see an example of exporting a gate in this YouTube video: http://youtu.be/-U6IVWt43qw
|
||||||
|
|
||||||
|
============
|
||||||
|
dial
|
||||||
|
============
|
||||||
|
The "/dial" command allows players to select a destination for a Stargate without requiring them to scroll through a large list of destinations. There are two modes to the /dial command.
|
||||||
|
|
||||||
|
> Interactive
|
||||||
|
The interactive mode is invoked with the command:
|
||||||
|
/dial <destination>
|
||||||
|
This will make the next gate the player activates dial the given destination if available.
|
||||||
|
|
||||||
|
> Direct
|
||||||
|
Direct dialing is used to open a gate directly to another without requiring the player to interact with the gate, it is invoked as such:
|
||||||
|
/dial <source> <destination> <network>
|
||||||
|
If the network is not supplied, the default Stargate network will be used. If the source/destination exist on the same network, and the player has access to them, the gates will be opened with a connection to eachother.
|
||||||
|
|
||||||
|
=============
|
||||||
|
Changes
|
||||||
|
=============
|
||||||
|
[Version 0.0.2]
|
||||||
|
- Fix an issue with dialing on a specific network
|
||||||
|
- Change permission checks to use Stargate, this allows proper permission debugging
|
||||||
|
[Version 0.0.1]
|
||||||
|
- Initial Release
|
||||||
@@ -298,7 +298,7 @@ public class StargateCommand extends JavaPlugin {
|
|||||||
if (args.length == 0) return false;
|
if (args.length == 0) return false;
|
||||||
// Import
|
// Import
|
||||||
if (args[0].equalsIgnoreCase("import")) {
|
if (args[0].equalsIgnoreCase("import")) {
|
||||||
if (!player.hasPermission("stargate.command.import")) {
|
if (!Stargate.hasPerm(player, "stargate.command.import")) {
|
||||||
StargateCommand.sendMessage(player, "Permission Denied", true);
|
StargateCommand.sendMessage(player, "Permission Denied", true);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
@@ -318,7 +318,7 @@ public class StargateCommand extends JavaPlugin {
|
|||||||
players.put(player, new SGCPlayer(player, Action.IMPORT, args));
|
players.put(player, new SGCPlayer(player, Action.IMPORT, args));
|
||||||
// Export
|
// Export
|
||||||
} else if (args[0].equalsIgnoreCase("export")) {
|
} else if (args[0].equalsIgnoreCase("export")) {
|
||||||
if (!player.hasPermission("stargate.command.export")) {
|
if (!Stargate.hasPerm(player, "stargate.command.export")) {
|
||||||
StargateCommand.sendMessage(player, "Permission Denied", true);
|
StargateCommand.sendMessage(player, "Permission Denied", true);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
@@ -349,7 +349,7 @@ public class StargateCommand extends JavaPlugin {
|
|||||||
String source = null;
|
String source = null;
|
||||||
String network = null;
|
String network = null;
|
||||||
if (args.length == 1) {
|
if (args.length == 1) {
|
||||||
if (!player.hasPermission("stargate.command.dial.interactive")) {
|
if (!Stargate.hasPerm(player, "stargate.command.dial.interactive")) {
|
||||||
sendMessage(player, "Permission Denied", true);
|
sendMessage(player, "Permission Denied", true);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
@@ -357,13 +357,13 @@ public class StargateCommand extends JavaPlugin {
|
|||||||
players.put(player, new SGCPlayer(player, Action.DIAL, args));
|
players.put(player, new SGCPlayer(player, Action.DIAL, args));
|
||||||
sendMessage(player, "The next Stargate you activate will connect to " + dest + " if available", false);
|
sendMessage(player, "The next Stargate you activate will connect to " + dest + " if available", false);
|
||||||
} else if (args.length > 1) {
|
} else if (args.length > 1) {
|
||||||
if (!player.hasPermission("stargate.command.dial.direct")) {
|
if (!Stargate.hasPerm(player, "stargate.command.dial.direct")) {
|
||||||
sendMessage(player, "Permission Denied", true);
|
sendMessage(player, "Permission Denied", true);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
source = args[0];
|
source = args[0];
|
||||||
dest = args[1];
|
dest = args[1];
|
||||||
if (args.length < 2) {
|
if (args.length > 2) {
|
||||||
network = args[2];
|
network = args[2];
|
||||||
} else {
|
} else {
|
||||||
network = Stargate.getDefaultNetwork();
|
network = Stargate.getDefaultNetwork();
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
name: StargateCommand
|
name: StargateCommand
|
||||||
main: net.TheDgtl.StargateCommand.StargateCommand
|
main: net.TheDgtl.StargateCommand.StargateCommand
|
||||||
version: 0.0.1
|
version: 0.0.2
|
||||||
description: Command addon for the Stargate plugin for Bukkit
|
description: Command addon for the Stargate plugin for Bukkit
|
||||||
author: Drakia
|
author: Drakia
|
||||||
depend: [Stargate]
|
depend: [Stargate]
|
||||||
|
|||||||
Reference in New Issue
Block a user