Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

fix error on exit with clojure.lang.ArityException: Wrong number of a…

…rgs (0) passed to: core$disable-permission-system

based off of ddeaguiar@74746a5
  • Loading branch information...
commit a35c616e9f16c60ba9e62853ba80060fc3c40f98 1 parent 92b805d
@rogerallen rogerallen authored
Showing with 7 additions and 10 deletions.
  1. +7 −10 src/cljminecraft/core.clj
View
17 src/cljminecraft/core.clj
@@ -31,12 +31,12 @@
[]
(cond
(nil? @repl-handle) {:msg "you tried to stop REPL when it was not running"}
- :else
+ :else
(try
- (do
+ (do
(stop-server @repl-handle)
{:msg "REPL stopped"})
- (finally
+ (finally
(reset! repl-handle nil)))))
(defn start-repl-if-needed [plugin]
@@ -92,11 +92,11 @@
(plr/permission-attach-all! plugin))
(defn disable-permission-system
- [plugin]
+ []
(plr/permission-detach-all!))
;; cljminecraft specific setup
-(defn start
+(defn start
"onEnable cljminecraft"
[plugin]
(reset! clj-plugin plugin)
@@ -114,7 +114,7 @@
(stop-repl)
(disable-permission-system))
-(defn on-enable
+(defn on-enable
"to enable self or any child plugins"
[plugin]
(cfg/config-defaults plugin)
@@ -122,7 +122,7 @@
resolved (resolve (symbol (str (.getName plugin) ".core/start")))]
(if (not resolved)
(log/warn "plugin %s didn't have a start function" plugin-name)
- (do
+ (do
;the following line is for debugging purposes only, to be removed:
(log/info "second Repl options: %s %s %s" (cfg/get-string plugin "repl.host") (cfg/get-int plugin "repl.port") (cfg/get-boolean plugin "repl.enabled"))
(log/info "calling child `start` for %s" plugin-name)
@@ -141,6 +141,3 @@
;the following line is for debugging purposes only, to be removed:
(log/info "third Repl options: %s %s %s" (cfg/get-string plugin "repl.host") (cfg/get-int plugin "repl.port") (cfg/get-boolean plugin "repl.enabled"))
)
-
-
-
Please sign in to comment.
Something went wrong with that request. Please try again.