Add configuration option for the "#EasterEgg" regarding milk buckets and animals.

Requested by @prplz
This commit is contained in:
vemacs 2015-12-01 17:41:56 -07:00
parent 569c848764
commit 1a701e69ca
4 changed files with 11 additions and 1 deletions

View file

@ -38,7 +38,8 @@ public class EssentialsEntityListener implements Listener {
onPlayerVsPlayerDamage(event, (Player) eDefend, attacker);
} else if (eDefend instanceof Ageable) {
final ItemStack hand = attacker.getBase().getItemInHand();
if (hand != null && hand.getType() == Material.MILK_BUCKET) {
if (ess.getSettings().isMilkBucketEasterEggEnabled()
&& hand != null && hand.getType() == Material.MILK_BUCKET) {
((Ageable) eDefend).setBaby();
hand.setType(Material.BUCKET);
attacker.getBase().setItemInHand(hand);

View file

@ -233,4 +233,6 @@ public interface ISettings extends IConf {
BigDecimal getMinimumPayAmount();
long getLastMessageReplyRecipientTimeout();
boolean isMilkBucketEasterEggEnabled();
}

View file

@ -1129,4 +1129,8 @@ public class Settings implements net.ess3.api.ISettings {
@Override public long getLastMessageReplyRecipientTimeout() {
return config.getLong("last-message-reply-recipient-timeout", 180);
}
@Override public boolean isMilkBucketEasterEggEnabled() {
return config.getBoolean("milk-bucket-easter-egg", true);
}
}

View file

@ -460,6 +460,9 @@ max-tempban-time: -1
# If false, /r goes to the last person that messaged you.
last-message-reply-recipient: true
# Toggles whether or not right clicking mobs with a milk bucket turns them into a baby.
milk-bucket-easter-egg: true
############################################################
# +------------------------------------------------------+ #
# | EssentialsHome | #