Advertisement
Guest User

Untitled

a guest
Jun 21st, 2014
230
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Scala 1.41 KB | None | 0 0
  1.   override def initModule(): Unit = {
  2.     super.initModule()
  3.  
  4.     getConfiguration.setPropertyIfNew("path.definition", 0.3D)
  5.     getConfiguration.setPropertyIfNew("path.length", 1500)
  6.     getConfiguration.setPropertyIfNew("path.colour", 0x9A5DD4)
  7.     getConfiguration.setPropertyIfNew("path.width", 1.3F)
  8.     getConfiguration.setPropertyIfNew("path.resume", false)
  9.  
  10.     command = Command(
  11.       Array("bc", "bread"),
  12.       ToggleFlag(Array("@if_none"), this),
  13.       ConfigurationFlag(Array("d", "def"), getConfiguration, "path.definition", ConfigurationFlag.Transforms.DOUBLE),
  14.       ConfigurationFlag(Array("l", "length"), getConfiguration, "path.length", ConfigurationFlag.Transforms.IntBetween(0, Integer.MAX_VALUE / 3)),
  15.       ConfigurationFlag(Array("c", "colour"), getConfiguration, "path.colour", ConfigurationFlag.Transforms.INT),
  16.       ConfigurationFlag(Array("w", "width"), getConfiguration, "path.width", ConfigurationFlag.Transforms.FLOAT),
  17.       ConfigurationFlag(Array("r", "resume"), getConfiguration, "path.resume", ConfigurationFlag.Transforms.BOOLEAN),
  18.       Flag(
  19.         Array("cl", "clear"), { args => lineBuffer.clear(); tellPlayer("Line buffer cleared") },
  20.         null, "Clear the line buffer"
  21.       ),
  22.       Flag(
  23.         Array("p", "pause"), { args => isPaused = !isPaused; tellPlayer("Pathing " + (if (isPaused) "paused" else "un-paused")) },
  24.         null, "Pause pathing"
  25.       )
  26.     )
  27.   }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement