Jump to content

How to Hook Mod into Bukkit Plugin


Gigi10012

Recommended Posts

Hello,

I created Bukkit Plugin with public method and i want to use it in my mod.

I have created Mod but i dont know how to use My Bukkit Plugin Methods in my mod.

Example Method:

public void message()
{
    Bukkit.broadcastMessage(ChatColor.RED + "TEST");
}

How to use hook my mod into my plugin and execute method?

Link to comment
Share on other sites

Its not question about Bukkit (its not question about: how to make bukkit plugin.)

On forge server i have my plugin. My plugin has public method. So My Question is 'how to use my plugin to execute that method in my forge mod'?

More Info:

Server is using mcpc-plus-1.5.2-R1.1-forge738-B637.jar

Link to comment
Share on other sites

1 it relates directly to bukkit so yes it bukkit related

2 the description of the board CLEARLY states this board is not a java classroom. when your question is clearly related to java basics. you call bukkit method like you would for ANY other method, the fact that its bukkit, forge, modloader or another 3rd party software doesnt change anything, java is java

 

hint, how to call System.out.println(String)

System.out.println(String);

how to debug 101:http://www.minecraftforge.net/wiki/Debug_101

-hydroflame, author of the forge revolution-

Link to comment
Share on other sites

1. My Question is About using public method from plugin in my Mod

2. MCPC creates folder Mods - for mods and Plugins - for plugins. If i have mod in Mods Folder how to use plugin that is in plugins folder. I just wrote this code for example

public void message()
{
    Bukkit.broadcastMessage(ChatColor.RED + "TEST");
}

I tried Adding my plugin to Build Path (External Jars) but when I started server and used test block to execute method client crashed!. So What I have to do in my mod to use that Plugin ?

(To Re-Compile Mod i added my plugin jar file in lib folder)

Link to comment
Share on other sites

1. My Question is About using public method from plugin in my Mod

2. MCPC creates folder Mods - for mods and Plugins - for plugins. If i have mod in Mods Folder how to use plugin that is in plugins folder. I just wrote this code for example

public void message()
{
    Bukkit.broadcastMessage(ChatColor.RED + "TEST");
}

I tried Adding my plugin to Build Path (External Jars) but when I started server and used test block to execute method client crashed!. So What I have to do in my mod to use that Plugin ?

(To Re-Compile Mod i added my plugin jar file in lib folder)

 

The plugin is a bukkit plugin in the folder it's expected to be in?

I guess this is some functionallity of MCPC then?

As I can't say there are any forge methods for importing bukkit plugins that I know of :P

 

So I would guess it would be easier and more likely that you get an answer from the MCPC guys since we here are rather clueless to how that system works :P

If you guys dont get it.. then well ya.. try harder...

Link to comment
Share on other sites

1. My Question is About using public method from plugin in my Mod

 

If it's a public method which is loaded and available in the code, then make an import statment at the top of the file importing the package of the file where the method exitsts, then in the code use the class name and then . and then the method name and fill inn the parameters. Aka. basic java on how to call a specific function inside any kind of API, 3rd party or other code :P

If you guys dont get it.. then well ya.. try harder...

Link to comment
Share on other sites

Plugin is in plugins folder and my mod is in Mods Folder. Mod Crashes Client when tries to execute plugin method because it cant find Plugin. When i was trying to re-compile mod it was giving errors. so to re-compile i added plugin to libs folder.

If it's a public method which is loaded and available in the code, then make an import statment at the top of the file importing the package of the file where the method exitsts, then in the code use the class name and then . and then the method name and fill inn the parameters. Aka. basic java on how to call a specific function inside any kind of API, 3rd party or other code 

Read My Post. I said that i tried importing it

Link to comment
Share on other sites

Plugin is in plugins folder and my mod is in Mods Folder. Mod Crashes Client when tries to execute plugin method because it cant find Plugin. When i was trying to re-compile mod it was giving errors. so to re-compile i added plugin to libs folder.

 

Forge does NOT have a plugins folder..

Which was kinda the point above the java basic one and the point of several people above that again.

There are no forge plugins, we have no idea what you are talking about!

If you guys dont get it.. then well ya.. try harder...

Link to comment
Share on other sites

You know what is mcpc-plus? mcpc-plus is for forge servers. its like bukkit but on it you can install forge mods. it has plugins and mods folder.

(I HAVE ALREADY WROTE THAT BUT NO ONE IS READING!)

I saw you wrote that, and my reply is still the same! you should contact the guys who creates MCPC+! They would know about their own code and what to do!

 

It's NOT as far as I know (and judging by other's replies as far as they know) made by the forge modding team. When searching I can't say I find a clear page to whom ever made MCPC :P

So I have no idea what exactly it is although I have heard about it before.

 

My point is that while MCPC-plus is made for forge server it's not made BY forge nor supported on these boards. There's seemingly few if any here who are familiar with the inner workings of MCPC+ if you understand what I mean? We would like to help you but the system you are asking us to help you with is maybe made to be used WITH forge but it's not something we are familiar with. Do you understand that difference?

If you guys dont get it.. then well ya.. try harder...

Link to comment
Share on other sites

You know what is mcpc-plus? mcpc-plus is for forge servers. its like bukkit but on it you can install forge mods. it has plugins and mods folder.

(I HAVE ALREADY WROTE THAT BUT NO ONE IS READING!)

So, what is wrong, you can't include all sources to your project ?

Basically, you would have mcpc-plus sources, your plugin sources and your new mod sources.

Why use a compiled "plugin" as an external library ?

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Announcements



×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.