enebo / Purugin

Ruby Minecraft Plugin support on top of bukkit
238 stars 32 forks source link

sponge port #52

Closed bluej100 closed 8 years ago

bluej100 commented 10 years ago

Do you plan to port this to https://github.com/SpongePowered/SpongeAPI when available ?

enebo commented 10 years ago

Possibly, but I am examining MinecraftForge right now.

bluej100 commented 10 years ago

Cool. Thanks. (Sponge will be based on Forge, so I believe Forge mods will all work on Sponge servers.)

nelsonwittwer commented 9 years ago

The Prag Prog book ported their content to CanaryMod. I played around in Canary this weekend and it had a very similar feel to Bukkit. Might not be another bad option to consider.

enebo commented 9 years ago

@nelsonwittwer yeah thanks for pointing this out. I guess even Sponge has worked around the Bukkit death-spiral problem. I made minimal work on being able to load JRuby using forge because forge has the oh so tantalizing client side modding but I found the API to be much less obvious than Bukkit. Simple things like sending a message is different between single and multiplayer. So I will try something closer to Bukkit in nature.

ryantheleach commented 9 years ago

Canary is kind of gross, and sponge isn't ready for end users. and bukkit still lives on tentatively as spigot.

SpongeAPI should be a good fit once it gets closer to a release, but if you are any good at API design you may want to make a proposal.

enebo commented 9 years ago

@ryantheleach thanks for the input and I did actually mean spigot. I got the two mixed up in my head :) Sponge design I have not been following, but perhaps I should...

thejonanshow commented 9 years ago

I got this mostly working on Spigot, I had to go and remove the async blocks from the examples. I can get the turtle-chicken to draw a pyramid but it doesn't move at all while it's drawing and then suddenly the pyramid pops into existence. Surprise TNT pyramid!

I love the idea of hacking on Minecraft with Ruby, it would be a great way to get kids into code without having to climb Java mountain. If you ever pick this up again I volunteer to help out.

enebo commented 9 years ago

@1337807 yeah weirdly I did about a month ago but did not figure out where their maven repo was. I also have this single fix for module dependency resolution (examples locs_plus + teleport have a dep):

diff --git a/src/main/resources/purugin/plugin.rb b/src/main/resources/purugin/plugin.rb
index 264dda5..02e636d 100644
--- a/src/main/resources/purugin/plugin.rb
+++ b/src/main/resources/purugin/plugin.rb
@@ -222,7 +222,7 @@ module Purugin

         # Make convenience method for plugin 
         # TODO: Resolve what happens if plugin conflicts w/ existing method)
-        self.class.send(:define_method, name.to_s) { plugin }
+        self.class.send(:define_method, name.to_s) { plugin_manager[name.to_s] }
         process_includes plugin, options[:include] if options[:include]
         process_services plugin, options[:services] if options[:services]
       end
@@ -269,4 +269,4 @@ module Purugin
       @configuration
     end
   end
-end
\ No newline at end of file
+end
enebo commented 9 years ago

@1337807 any changes to source and I will merge. I am really hoping to get mvn pom.xml fixes :)

enebo commented 8 years ago

No plans on sponge support any time soon since this is not running on spigot. So I will close this.