summaryrefslogtreecommitdiff
path: root/misc.py
diff options
context:
space:
mode:
authorDico200 <dico.karssiens@gmail.com>2015-05-14 02:16:33 +0200
committerDico200 <dico.karssiens@gmail.com>2015-05-14 02:16:33 +0200
commit59816b58e2906318a79ecdf4a6d6b4b75f3aa6e8 (patch)
treeb3dc3f458495ac6e5d017544b3f2e314c0ffca67 /misc.py
parent0ef318d6b95c3f602c4409e6849bea8e29ac9367 (diff)
Almost complete redo of blockplacemods, small fixes
I've redone most of blockplacemods its code. It is now MUCH easier to expand in the future and I think the code is more elegant and stuff. It all works the same as before, except the command is now /toggle <setting> I've merged the setting for /autotakewater and /autofillcauldron into one setting named cauldron.
Diffstat (limited to 'misc.py')
-rw-r--r--misc.py17
1 files changed, 8 insertions, 9 deletions
diff --git a/misc.py b/misc.py
index 125cc82..b90f55f 100644
--- a/misc.py
+++ b/misc.py
@@ -73,7 +73,12 @@ def on_flow(event):
if block.getWorld().getName() == "Creative" and rs_material_broken_by_flow(str(block.getType())):
event.setCancelled(True)
-
+def rs_material_broken_by_flow(material):
+ if material in ("REDSTONE", "LEVER", "TRIPWIRE"):
+ return True
+ parts = material.split("_")
+ length = len(parts)
+ return length > 1 and (parts[0] == "DIODE" or parts[1] in ("TORCH", "WIRE", "BUTTON", "HOOK") or (length == 3 and parts[1] == "COMPARATOR"))
@@ -113,10 +118,10 @@ def on_me_command(sender, command, label, args):
@hook.command("pluginversions")
def on_pluginversions_command(sender, command, label, args):
- ""
+ """
/pluginversions
print all plugins + versions; useful when updating plugins
- ""
+ """
try:
plugin_header(sender, "Plugin versions")
plugins = [pl.getDescription() for pl in list(ArrayList(java_array_to_list(server.getPluginManager().getPlugins())))]
@@ -205,9 +210,3 @@ def on_modules_command(sender, command, label, args):
plugin_header(sender, "Modules")
msg(sender, ", ".join([(("&a" if mod in shared["modules"] else "&c") + mod) for mod in shared["load_modules"]]))
-def rs_material_broken_by_flow(material):
- if material in ("REDSTONE", "LEVER", "TRIPWIRE"):
- return True
- parts = material.split("_")
- length = len(parts)
- return length > 1 and (parts[0] == "DIODE" or parts[1] in ("TORCH", "WIRE", "BUTTON", "HOOK") or (length == 3 and parts[1] == "COMPARATOR"))