mirror of
https://github.com/EssentialsX/Essentials.git
synced 2024-12-25 18:48:24 +01:00
Add configuration option for the "#EasterEgg" regarding milk buckets and animals.
Requested by @prplz
This commit is contained in:
parent
569c848764
commit
1a701e69ca
@ -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);
|
||||
|
@ -233,4 +233,6 @@ public interface ISettings extends IConf {
|
||||
BigDecimal getMinimumPayAmount();
|
||||
|
||||
long getLastMessageReplyRecipientTimeout();
|
||||
|
||||
boolean isMilkBucketEasterEggEnabled();
|
||||
}
|
||||
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
@ -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 | #
|
||||
|
Loading…
Reference in New Issue
Block a user