Improve disposal, /bigtree and /fireball (#2461) @montlikadani

* Allow the Disposal inventory title to be configurable
* Add darkoak to `/bigtree`'s usage message
* Allow potions to be fired with `/fireball`

## Commits
* Update plugin.yml
* Update Commanddisposal.java
* Update messages.properties
* Update Commandfireball.java
* Update SignDisposal.java
* Fix import
* Remove colour code from disposal message
This commit is contained in:
montlikadani 2019-05-30 15:03:12 +02:00 committed by md678685
parent b566b4a0c6
commit 0e3f48ee54
5 changed files with 11 additions and 4 deletions

View File

@ -14,7 +14,7 @@ public class Commanddisposal extends EssentialsCommand {
@Override
protected void run(Server server, User user, String commandLabel, String[] args) throws Exception {
user.sendMessage(tl("openingDisposal"));
user.getBase().openInventory(ess.getServer().createInventory(user.getBase(), 36, "Disposal"));
user.getBase().openInventory(ess.getServer().createInventory(user.getBase(), 36, tl("disposal")));
}
}

View File

@ -34,6 +34,10 @@ public class Commandfireball extends EssentialsCommand {
type = ThrownExpBottle.class;
} else if (args[0].equalsIgnoreCase("large")) {
type = LargeFireball.class;
} else if (args[0].equalsIgnoreCase("splashpotion")) {
type = SplashPotion.class;
} else if (args[0].equalsIgnoreCase("lingeringpotion")) {
type = LingeringPotion.class;
}
}
final Vector direction = user.getBase().getEyeLocation().getDirection().multiply(speed);
@ -45,7 +49,7 @@ public class Commandfireball extends EssentialsCommand {
@Override
protected List<String> getTabCompleteOptions(final Server server, final User user, final String commandLabel, final String[] args) {
if (args.length == 1) {
return Lists.newArrayList("small", "arrow", "skull", "egg", "snowball", "expbottle", "large");
return Lists.newArrayList("small", "arrow", "skull", "egg", "snowball", "expbottle", "large", "splashpotion", "lingeringpotion");
} else {
return Collections.emptyList();
}

View File

@ -3,6 +3,8 @@ package com.earth2me.essentials.signs;
import com.earth2me.essentials.User;
import net.ess3.api.IEssentials;
import static com.earth2me.essentials.I18n.tl;
public class SignDisposal extends EssentialsSign {
public SignDisposal() {
@ -11,7 +13,7 @@ public class SignDisposal extends EssentialsSign {
@Override
protected boolean onSignInteract(final ISign sign, final User player, final String username, final IEssentials ess) {
player.getBase().openInventory(ess.getServer().createInventory(player.getBase(), 36, "Disposal"));
player.getBase().openInventory(ess.getServer().createInventory(player.getBase(), 36, tl("disposal")));
return true;
}
}

View File

@ -97,6 +97,7 @@ destinationNotSet=Destination not set\!
disabled=disabled
disabledToSpawnMob=\u00a74Spawning this mob was disabled in the config file.
disableUnlimited=\u00a76Disabled unlimited placing of\u00a7c {0} \u00a76for\u00a7c {1}\u00a76.
disposal=Disposal
distance=\u00a76Distance\: {0}
dontMoveMessage=\u00a76Teleportation will commence in\u00a7c {0}\u00a76. Don''t move.
downloadingGeoIp=Downloading GeoIP database... this might take a while (country\: 1.7 MB, city\: 30MB)

View File

@ -59,7 +59,7 @@ commands:
aliases: [bcw,ebcw,bcastw,ebcastw,ebroadcastworld,shoutworld,eshoutworld]
bigtree:
description: Spawn a big tree where you are looking.
usage: /<command> <tree|redwood|jungle>
usage: /<command> <tree|redwood|jungle|darkoak>
aliases: [ebigtree,largetree,elargetree]
burn:
description: Set a player on fire.