Closed kpalang closed 8 years ago
You should not implement the IBlockPlacer, you need to get it from the AWE plugin.
I can't extend Interface from PasteAction class. Repo Also what is the String in performAsAsyncJob needed for?
I have no idea what you mean.
I mean that when I want to extend IFuncParamEx in PasteAction, IDE gives me an error saying "Interface nit expected here"
It looks like you need to brush up on the basics of java and object oriented programing:
https://docs.oracle.com/javase/tutorial/java/IandI/createinterface.html https://docs.oracle.com/javase/tutorial/java/IandI/usinginterface.html
Right, I've fiddled around with it for a while now and I think I've figured the code out. Atleast there are no red lines under the code :) But, now I have problems setting maven dependency. In IDE everything works as it should, but when maven starts compiling, every import related to AWE returns Failed to execute goal.
Sorry can't help you with that. If you have questions regarding AWE, and AWE API I'm more then happy to help. If it comes to java, maven and stuff you need to teach yourself how to do what you need.
Alright, I understand. But as hopefully the last thing, if there is a maven repo for AWE, could you tell me it's url? Or is github usable?
Its on the "maven artifact" branch. I never used it therefore I can't tell you the exact url. Try googling for: github maven repo.
Now I get this error, but the schematic pastes properly (Haven't noticed any problems yet)
[18:08:37] [Craft Scheduler Thread - 2/INFO]: Running s in full async mode.
[18:08:38] [Server thread/INFO]: Job [0] s - placing blocks
[18:08:42] [Craft Scheduler Thread - 2/WARN]: Exception in thread "Craft Scheduler Thread - 2"
[18:08:42] [Craft Scheduler Thread - 2/WARN]: org.apache.commons.lang.UnhandledException: Plugin AsyncWorldEdit v3.2.2 generated an exception while executing task 7
at org.bukkit.craftbukkit.v1_8_R3.scheduler.CraftAsyncTask.run(CraftAsyncTask.java:56)
at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
Caused by: java.lang.NullPointerException
at org.primesoft.asyncworldedit.blockPlacer.BlockPlacer$2.task(BlockPlacer.java:1191)
at org.primesoft.asyncworldedit.worldedit.AsyncTask.doRun(AsyncTask.java:63)
at org.primesoft.asyncworldedit.worldedit.BaseTask.run(BaseTask.java:141)
at org.bukkit.craftbukkit.v1_8_R3.scheduler.CraftTask.run(CraftTask.java:71)
at org.bukkit.craftbukkit.v1_8_R3.scheduler.CraftAsyncTask.run(CraftAsyncTask.java:53)
... 3 more
Send the actual code that caused the error.
Well it looks like the action that you provide is set to null are you 100% sure this is the code that you are using?
I am 100% sure, That null was there because it was easy to write...
Anyway, i replaced it with editSession.getBlockChangeCount()
and no errors now.
Thank you for bearing with me good sir! First part of my project is complete. I will soon be back with new simple problems :)
No problem. So what exactly caused the problem?
That return null in execute.
Now to the Premium part Non premium issue can be found here So this is basically a copy of this issue, but I'd really like a bit more explanation on how to do it. I feel like my pasting code is not async because the server freezes on every paste. Also my code is now a copy of your and rlf's. Like class declarations or variables etc. Here is my current class that should paste schematics, but I believe it is not using AWE.
Note: Mister rlf was far more advanced than I am.