31
JavaOp Board / Re: Plugin Packages
« on: February 25, 2010, 02:07:29 pm »Excellent! If you'd like, feel free to post a guide on the GoogleCode wiki.PM'd
I've quit using Eclipse. It's pretty bulky for my needs.
This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.
Excellent! If you'd like, feel free to post a guide on the GoogleCode wiki.PM'd
I've quit using Eclipse. It's pretty bulky for my needs.
[TIME] WARNING: Error processing event: java.lang.NullPointerException
and events are no longer received from that shaman! If I make the bot leave the clan channel and come back, it does not see the shaman in the channel.java.lang.NullPointerException
at com.javaop.users.Statstring.getClient(Statstring.java:33)
at com.javaop.SwingGui.JavaOpPanel.userFlags(Unknown Source)
at com.javaop.pluginmanagers.PluginRegistration.userFlags(PluginRegistration.java:538)
at com.javaop.bot.BotCore.userFlags(BotCore.java:487)
at com.javaop.BnetEventProcess.PluginMain.processEvent(PluginMain.java:249)
at com.javaop.BnetEventProcess.PluginMain.access$1(PluginMain.java:220)
at com.javaop.BnetEventProcess.PluginMain$Callback.run(PluginMain.java:208)
at java.util.TimerThread.mainLoop(Timer.java:534)
at java.util.TimerThread.run(Timer.java:484)
I cannot get my custom plugin to work even after the namespace "com.javaop.*" changes I made to the packages :<
I took a look at the commands plugin and discovered it is not protocol-specific; sorry I used it as an example in my previous post.
Open up build.xml. Under the clean section, addCode: [Select]<delete dir="YourPluginsName/bin"/
Under build, addCode: [Select]<mkdir dir="YourPluginsName/bin"/>
<javac srcdir="YourPluginsName/src" destdir="YourPluginsName/bin"
classpath="javaop2/bin"/>
Under jar, addCode: [Select]<jar destfile="${pluginpath}/YourPluginsName.jar" basedir="YourPluginsName/bin">
<manifest><attribute name="Main-Class" value="com.javaop.YourPluginsName.YourPluginsEntryPoint"/></manifest>
</jar>
..replacing the obvious. That should get your plugin to build with the rest of the bot just by typing ant.
I think you'll enjoy the plugin restructuring in 2.1.3.
If I understand how it works correctly, there's not a lot of overhead except for having to do four times the work when the bot first starts. This adds maybe a few milliseconds to the loading process, really nothing to lose sleep over. Once loaded, they're all added to the bot's memory in the same way they would be if they're in one jar (albeit, perhaps in a different place) and should function at the same speed.
Currently I don't think you can expose more than one plugin per jar, so it'd be difficult to implement the idea without a major rewriting of the plugin loading process, unless they were all combined into one plugin with all their functionality.
I think that commands should definitely stay separate, because eventually (read: in year 2035), I'd like to add IRC to JavaOp, which would need to interact with the commands just as much as Bnet would. Also, Battle.net 2.0 would have it's own login plugin.
Open up a console and use the svn command to check out, then type ant in the root directory. I bet it has something to do with me changing to not using Eclipse project files anymore.
Oh, I know what's going on..
I think you're going to have to go through each project and add javaop2 as a dependency..
Try rm -rf ~/workspace. Of course, that'll hose any other projects you have in there too so be careful.I imported it into a new workspace and nothing changed
I just did svn commit and svn update, and I can confirm rev55 is working. It would appear that you still had some residue from prior to the namespace switch.
Odd, you're right. I don't know why I was getting password errors.. probably running unfixed code while my fiance was yelling at me to come to bed. Ahh, late night programming.
So now all I have to do is change the namespace of every single class, fix the 300 bugs that makes, and then 2.1.3 should be ready to ship.
Loading Alpha
Activating plugin: Simple event processor
Activating plugin: Commands
Activating plugin: Swing Gui
Exception in Metacity for theme "Nodoka": Variable "mini_icon_width" not defined
Activating plugin: Channel list plugin
Activating plugin: Battle.net Login Plugin
Activating plugin: _Default
Error: client icon not found:
Error: client icon not found:
Error: client icon not found:
Error: client icon not found:
Error: client icon not found:
Error: client icon not found:
String username = pubFuncs.getLocalSetting("Battle.net Logon Plugin", "username");
String password = pubFuncs.getLocalSetting("Battle.net Logon Plugin", "password").toLowerCase();
To: String username = pubFuncs.getLocalSetting("Battle.net Login Plugin", "username");
String password = pubFuncs.getLocalSetting("Battle.net Login Plugin", "password").toLowerCase();