mirror of
https://github.com/EssentialsX/Essentials.git
synced 2024-12-23 01:27:40 +01:00
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:
parent
b566b4a0c6
commit
0e3f48ee54
@ -14,7 +14,7 @@ public class Commanddisposal extends EssentialsCommand {
|
|||||||
@Override
|
@Override
|
||||||
protected void run(Server server, User user, String commandLabel, String[] args) throws Exception {
|
protected void run(Server server, User user, String commandLabel, String[] args) throws Exception {
|
||||||
user.sendMessage(tl("openingDisposal"));
|
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")));
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -34,6 +34,10 @@ public class Commandfireball extends EssentialsCommand {
|
|||||||
type = ThrownExpBottle.class;
|
type = ThrownExpBottle.class;
|
||||||
} else if (args[0].equalsIgnoreCase("large")) {
|
} else if (args[0].equalsIgnoreCase("large")) {
|
||||||
type = LargeFireball.class;
|
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);
|
final Vector direction = user.getBase().getEyeLocation().getDirection().multiply(speed);
|
||||||
@ -45,7 +49,7 @@ public class Commandfireball extends EssentialsCommand {
|
|||||||
@Override
|
@Override
|
||||||
protected List<String> getTabCompleteOptions(final Server server, final User user, final String commandLabel, final String[] args) {
|
protected List<String> getTabCompleteOptions(final Server server, final User user, final String commandLabel, final String[] args) {
|
||||||
if (args.length == 1) {
|
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 {
|
} else {
|
||||||
return Collections.emptyList();
|
return Collections.emptyList();
|
||||||
}
|
}
|
||||||
|
@ -3,6 +3,8 @@ package com.earth2me.essentials.signs;
|
|||||||
import com.earth2me.essentials.User;
|
import com.earth2me.essentials.User;
|
||||||
import net.ess3.api.IEssentials;
|
import net.ess3.api.IEssentials;
|
||||||
|
|
||||||
|
import static com.earth2me.essentials.I18n.tl;
|
||||||
|
|
||||||
|
|
||||||
public class SignDisposal extends EssentialsSign {
|
public class SignDisposal extends EssentialsSign {
|
||||||
public SignDisposal() {
|
public SignDisposal() {
|
||||||
@ -11,7 +13,7 @@ public class SignDisposal extends EssentialsSign {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected boolean onSignInteract(final ISign sign, final User player, final String username, final IEssentials ess) {
|
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;
|
return true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -97,6 +97,7 @@ destinationNotSet=Destination not set\!
|
|||||||
disabled=disabled
|
disabled=disabled
|
||||||
disabledToSpawnMob=\u00a74Spawning this mob was disabled in the config file.
|
disabledToSpawnMob=\u00a74Spawning this mob was disabled in the config file.
|
||||||
disableUnlimited=\u00a76Disabled unlimited placing of\u00a7c {0} \u00a76for\u00a7c {1}\u00a76.
|
disableUnlimited=\u00a76Disabled unlimited placing of\u00a7c {0} \u00a76for\u00a7c {1}\u00a76.
|
||||||
|
disposal=Disposal
|
||||||
distance=\u00a76Distance\: {0}
|
distance=\u00a76Distance\: {0}
|
||||||
dontMoveMessage=\u00a76Teleportation will commence in\u00a7c {0}\u00a76. Don''t move.
|
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)
|
downloadingGeoIp=Downloading GeoIP database... this might take a while (country\: 1.7 MB, city\: 30MB)
|
||||||
|
@ -59,7 +59,7 @@ commands:
|
|||||||
aliases: [bcw,ebcw,bcastw,ebcastw,ebroadcastworld,shoutworld,eshoutworld]
|
aliases: [bcw,ebcw,bcastw,ebcastw,ebroadcastworld,shoutworld,eshoutworld]
|
||||||
bigtree:
|
bigtree:
|
||||||
description: Spawn a big tree where you are looking.
|
description: Spawn a big tree where you are looking.
|
||||||
usage: /<command> <tree|redwood|jungle>
|
usage: /<command> <tree|redwood|jungle|darkoak>
|
||||||
aliases: [ebigtree,largetree,elargetree]
|
aliases: [ebigtree,largetree,elargetree]
|
||||||
burn:
|
burn:
|
||||||
description: Set a player on fire.
|
description: Set a player on fire.
|
||||||
|
Loading…
Reference in New Issue
Block a user