This site works best with JavaScript enabled. Please enable JavaScript to get the best experience from this site.
the idea is: When player use his cannon, plugin check his Faction (from Factions plugin) and also check targeted area.
So, if tartgeted area belong to "enemy" faction explosion will break blocks.
If targeted area belongs to Wildreness (no faction) explosion also will break blocks.
For all other situations, explosion will not damage any blocks.
For me it is difficult to allow the explosion event in these areas. The only way would be bypassing the area protection of factions. Which is a bad idea. A better solution would be if factions (or factions+ +) directly supports such stuff. However the bukkit explosion event has no player entry, therefore you can't say which player caused the explosion. Further not all cannonballs are fired by players (e.g. firing a cannon with redstone).
Maybe you can tweak this with factions. Since the cannons explosion has enitity==null you might have success if you allow 'magical explosions' in these areas. Don't know if factions support such stuff.
@DerPavlov: Go
ATM explosions for all my factions regions are alowed, but problem is every player from every faction can attack other factions plots with cannons, no matter what relation those 2 factions have.
So, what we really need is to forbid certain explosions, according to factions relations.
Factions API: http://www.massivecraft.com/factions-developer?utm_source=Factions&utm_medium=DocsDeveloper&utm_campaign=BukkitDev
Getting a faction by location: Location location = new Location(Bukkit.getWorld("derp"), 1337, 1337, 1337); Faction faction = BoardColls.get().getFactionAt(PS.valueOf(location));
Getting a Faction using a Bukkit Player: Player player = Bukkit.getPlayerExact("Cayorion"); UPlayer uplayer = UPlayer.get(player); Faction faction = uplayer.getFaction();
There is no way to determine which player cause explosions, but we can determine which player activate the cannon, at least if cannon was activated by button.
I have even better idea: can we just track which cannon cause an explosion? So, we just check this cannon owners faction, and thats it.
@ValeraSTK: Go Tracking the owner of the cannon would be possible. Probably we need something like a friendlist, so only guys in the same faction can use the cannon.
The problem if I start implementing one API, I will also need towny, Worldguard or whatever. Did factions finally release their 7.x version, because it would be more difficult to support 6.x and 7.x. I will see if it can be implemented easily.
Hi! any progress on this?
@ValeraSTK: Go It would be possible, but I didn't had time to implement it now.
sad to hear that. Any chance that you will have time in future? At least for basic feature, without "friends list", just check for explosions.
@ValeraSTK: Go Sure, but it make take me a while. I have already implemented the owner for the projectile, the only thing missing is the impact event with factions.
sorry, if I bother you.
Can I decently ask, if there any progress?
Only reason, why Im so annoying, is because this feature extremely important for me.
@ValeraSTK: Go I have to finish first a different project because I am behind the timeline. Next week would be the earliest possible timepoint for me to implement it.
To post a comment, please login or register a new account.