Post any ideas / suggestions for the game servers here.
  • User avatar
  • User avatar
  • User avatar
  • User avatar

Do you support this idea?

Yes
30
77%
No
9
23%
#186277
I know it's probably completely different coding but a local Aussie server uses essentials and a few others I'm unsure about, MCMMO etc.
But their plugins include mobs being protected by precious stones that cover a set radius rendering any mob within private. So I'm guessing it could be similar in coding theory.

No hiding mobs in nuclear bunkers there ;)

Oh, also named horses are protected anywhere there if it makes a difference.
#186278
Rokkrwolf312 wrote:I'm rather curious how this could even be possibly implemented as it has never been done before/probably can't be done as far as I am aware.
Not being a programmer, I'm not sure about that either, Rokkr. But Intelli does a lot of things with coding that make me go "whaaat?...how?...that's so cool!" so I have faith that if anyone can do it, he can. Also, it seems like it might be possible due to the fact that coreprotect can log who killed a mob and roll it back.
#186281
Firstly, I need to mention that if this goes through, something needs to be done about wolves since they're potential attackers and weapons in pvp. That is, they need to be damageable at least with pvp on.

https://github.com/Bukkit/Bukkit-JavaDo ... Event.java
https://github.com/Bukkit/Bukkit-JavaDo ... Event.java
https://github.com/Bukkit/Bukkit-JavaDo ... lable.java
https://github.com/Bukkit/Bukkit-JavaDo ... ntity.java
https://github.com/Bukkit/Bukkit-JavaDo ... ntity.java
https://github.com/Bukkit/Bukkit-JavaDo ... ation.java
https://github.com/Bukkit/Bukkit-JavaDo ... Event.java
https://github.com/Bukkit/Bukkit-JavaDo ... Event.java
https://github.com/Bukkit/Bukkit-JavaDo ... Event.java

Do some entity handling hoodoo with PlayerInteractEntityEvent. Get the entity the player is interacting with. If it is a passive mob and the passive mob is in a private plot that the player does not have permissions in, cancel the event.

For stuff like snowballs, eggs, fishing hooks, and arrows (all projectiles), I kinda doubt these count as PlayerInteractEntityEvent. So you need to handle DamageByEntityEvent and its parent, EntityDamageEvent. Luckily, these keep track of who launched the projectile. If the damaged entity is a passive mob and this passive mob is in a private plot that the projectile's shooter does not have permissions in, cancel the event.

If you want, you could also try assigning the plot owner to the shooter of a projectile released from a dispenser since projectiles shot from these are born without a shooter. Use ProjectileLaunchEvent. Reason for doing this is to stop people from using dispensers and arrows to circumvent animal protection.

The reason this is not yet implemented is likely not due to the impossibility or difficulty.
#186283
eah2119 wrote: WONDERFULLY GEEKY STUFF
:D

also:
eah2119 wrote: Firstly, I need to mention that if this goes through, something needs to be done about wolves since they're potential attackers and weapons in pvp. That is, they need to be damageable at least with pvp on.
Yes, should be strictly passive mobs.

Excerpted from: http://minecraft.gamepedia.com/Mobs#Passive_mobs :

Passive mobs
Passive mobs will not attack the player under any circumstances. This category includes most of the "farm animals" present in the game, which can be bred for food and/or other resources. Also included are bats and squid, both of which have special spawning conditions and cannot be bred. Ocelots are technically passive, in that they will not attack the player, but they are actually coded as hostile mobs.
#186284
The reason I mentioned wolves is because they're grouped with the rest of the animals (sheep, horses, ocelots, etc) in the code. Can't simply check whether it's in the animal group. Need to check whether it's a wolf as well. Also, I forgot to mention villagers. They're not in the animals group, but should still be protected.
long long title how many chars? lets see 123 ok more? yes 60

We have created lots of YouTube videos just so you can achieve [...]

Another post test yes yes yes or no, maybe ni? :-/

The best flat phpBB theme around. Period. Fine craftmanship and [...]

Do you need a super MOD? Well here it is. chew on this

All you need is right here. Content tag, SEO, listing, Pizza and spaghetti [...]

Lasagna on me this time ok? I got plenty of cash

this should be fantastic. but what about links,images, bbcodes etc etc? [...]