Skip to content
Browse files

Added [time] optional parameter to the create command.

  • Loading branch information...
1 parent d968aa6 commit a5a2d5832fc6ef405504ea4ed167edc11c802f3c @sorklin committed
Showing with 11 additions and 2 deletions.
  1. +1 −1 pom.xml
  2. +9 −0 src/main/java/sorklin/magictorches/commands/CreateCmd.java
  3. +1 −1 src/main/resources/plugin.yml
View
2 pom.xml
@@ -4,7 +4,7 @@
<groupId>sorklin</groupId>
<artifactId>MagicTorches</artifactId>
- <version>1.0</version>
+ <version>1.01</version>
<packaging>jar</packaging>
<name>MagicTorches</name>
View
9 src/main/java/sorklin/magictorches/commands/CreateCmd.java
@@ -87,6 +87,15 @@ public boolean execute() throws MissingOrIncorrectParametersException, Insuffici
} else {
throw new MissingOrIncorrectParametersException();
}
+
+ //Try to parse a time number.
+ if(args.length > 3){
+ try {
+ te.setTimeOut(Double.parseDouble(args[3]));
+ } catch (NumberFormatException nfe) {
+ //Don't worry about this, just ignore it.
+ }
+ }
Messaging.send(player, msg);
}
//This will overwrite an existing creator (which we're okay with).
View
2 src/main/resources/plugin.yml
@@ -1,6 +1,6 @@
name: MagicTorches
main: sorklin.magictorches.MagicTorches
-version: 1.0
+version: 1.01
author: Sorklin
softdepend: [Multiverse, Multiverse-Core, MyWorlds, Vault]
description: MagicTorches creates linked array of wireless torches.

0 comments on commit a5a2d58

Please sign in to comment.
Something went wrong with that request. Please try again.