How to know the start of this event? For example... World generation -> call physics each block placed BreakEvent/Place Event -> physics... and so on... How to know which of them is the first event calling phyisics? If is not possible, what event in world generation is the one placing blocks/calling physics, and how to fix removing physics on world creation? (I've to create my world generator? i hope not xD) Sorry for bad english =) up please =( EDIT by Moderator: merged posts, please use the edit button instead of double posting.
https://github.com/Bukkit/CraftBukkit/blob/master/src/main/java/net/minecraft/server/World.java#L501 tells us that you can set suppressPhysics to true to suppress all physics. This would look something like this: Code:java World world = getSomeWorld();net.minecraft.server.World notchWorld = ((CraftWorld)world).getHandle();boolean oldState = notchWorld.suppressPhysics;notchWorld.suppressPhysics = true;//Do stuff here...notchWorld.suppressPhysics = oldState; But without knowing what exactly you want to do I think nobody is able to really help you.
Cause you are leaving the bukkit API. CraftWorld is a CraftBukkit, net.minecraft.server.World is a notch class. To fix this kick the bukkit.jar out of your build path and put the craftbukkit.jar in instead. Then you should be able to import and use this classes.
uhm? i used to place craftbukkit 1.2.5 R2.0.jar in java build path..... there is other thing to use instead of this one?
Faelsel: There is craftbukkit and bukkit. Bukkit is the API you normally use to develop plugins while craftbukkit is the server software implementing the API. So remove the API from your build path and add in the server software which contains all the classes you need (notch code + craftbukkit changes + bukkit API). After that import CraftWorld like any other class.
But i am already using it as import... How to import server software so? this is the JAR the batch file use as executable for server...
That should be enough. When you click CraftWorld it doesn't give you the option to import it? It should be import org.bukkit.craftbukkit.CraftWorld; I use it in this code, maybe you can check for differences : https://github.com/ZachBora/CloneMe...dcretornica/cloneme/ScheduledBlockChange.java
I have a conflict with CraftBukkit+ in RideThaDragon, but only cause of the return of getServer().getVersion(). I use this to check if the CB version is new enough to enable some advance stuff, but my version parsing code fails with CraftBukkit+: int bv = Integer.parseInt(s.getVersion().split("-b")[1].substring(0, 4)); As you see I'm not leaving the bukkit API in here, so that's not related to linking against CraftBukkit. All cb/notch code I'm calling are working as they should (tested it by removing this check). But you will have problems with the spout server if you leave the bukkit API, I think...
I had to import manually it... Eclipse doesnt know that part of the JAR, so i had to write the import org.bukkit.craftbukkit and so on..... I tried to add this code on "onEnable()" putting the world as "Bukkit.getWorld(MY_WORLD_NAME);" after adding that code in the onEnable. PhysicsPlugin at Java:27 is exactly the code i added...(look on the top of this post)
The world isn't loaded when your plugin is enabled. There's a plugin.yml thing to make your plugin load after world load. Put: load: POSTWORLD by default it's STARTUP Reference: http://wiki.bukkit.org/Plugin.yml
solved... or better: using POSTWORLD the problem persists, but i changed the position of the code... so i set the stop of physics only after "WorldGeneration()" so the "CraftWorld" is obviously already done all time. Thank you guys, its time to give you some "Likes"