0

I'm writing a plugin for Bukkit, but when Bukkit loads the .jar, the plugin checks for /clojure directory for core_init (It should check /roleplay instead).

Bukkit is a server-management software written for minecraft

I've searched over the internet and found out some info, but not sure how I can implement them or are there any alternatives.

Unable to find Clojure

https://github.com/jonnay/Watership-Down (talks about the problem in README)

Here is how I extended Bukkit's JavaPlugin.

src/roleplay/core.clj

(ns roleplay.core
  (:import org.bukkit.Bukkit)

  (:gen-class
    :name com.mc_rp.roleplay.Roleplay
    :extends org.bukkit.plugin.java.JavaPlugin
    )
  )

Here is project options for leiningen. project.clj

(defproject roleplay "0.1.0-SNAPSHOT"
  :description "FIXME: write description"
  :url "http://example.com/FIXME"
  :license {:name "EPL-2.0 OR GPL-2.0-or-later WITH Classpath-exception-2.0"
            :url "https://www.eclipse.org/legal/epl-2.0/"}
  :repositories {
                 "papermc" "https://papermc.io/repo/repository/maven-public/"
                 }
  :dependencies [
                 [org.clojure/clojure "1.10.0"]
                 ]
  :profiles {
            :provided {
                       :dependencies [
                                      [com.destroystokyo.paper/paper-api "1.14.4-R0.1-SNAPSHOT"]
                                      ]
                       }
            }
  :repl-options {:init-ns roleplay.core}
  :aot [:all]
  )
Belial
  • 294
  • 4
  • 11
  • How are you compiling your project? It seems to me that `lein uberjar` should be enough to output a large Jar file that bundles your plugin and its dependencies (Clojure itself). The output you link looks like the Jar file does not contain the Clojure classes it will require to start your plugin at runtime. – Denis Fuenzalida Aug 23 '19 at 06:57
  • I'm creating a fat jar with uberjar as you mentioned. Here is the project structure. It looks nominal to me. https://imgur.com/a/iYyKML1 – Belial Aug 23 '19 at 09:17
  • Looks good to me too. Can you update your question to include the stacktrace that you see? It sounds to me that if you see sometihng like "*java.io.FileNotFoundException: Could not locate clojure/core__init.class or clojure/core.clj on classpath*" it could be another problem. Maybe Clojure's own Jar needs to go somewhere else instead (don't know if minecraft plugins require anything specific) – Denis Fuenzalida Aug 24 '19 at 06:53

0 Answers0