mirror of
https://github.com/EssentialsX/Essentials.git
synced 2025-02-13 19:01:52 +01:00
Add /showkit to view kit contents.
This commit is contained in:
parent
5ca02e6596
commit
b7c7e4ad23
@ -47,7 +47,7 @@
|
||||
<artifactId>maven-compiler-plugin</artifactId>
|
||||
<version>2.3.2</version>
|
||||
<configuration>
|
||||
<showDeprecation>true</showDeprecation>
|
||||
<showDeprecation>false</showDeprecation>
|
||||
</configuration>
|
||||
</plugin>
|
||||
</plugins>
|
||||
|
@ -146,7 +146,12 @@ public class Kit {
|
||||
}
|
||||
}
|
||||
|
||||
@Deprecated
|
||||
public List<String> getItems(final User user) throws Exception {
|
||||
return getItems();
|
||||
}
|
||||
|
||||
public List<String> getItems() throws Exception {
|
||||
if (kit == null) {
|
||||
throw new Exception(tl("kitNotFound"));
|
||||
}
|
||||
|
@ -0,0 +1,32 @@
|
||||
package com.earth2me.essentials.commands;
|
||||
|
||||
import com.earth2me.essentials.Kit;
|
||||
import com.earth2me.essentials.User;
|
||||
import org.bukkit.Server;
|
||||
|
||||
import java.util.Locale;
|
||||
|
||||
import static com.earth2me.essentials.I18n.tl;
|
||||
|
||||
public class Commandshowkit extends EssentialsCommand {
|
||||
|
||||
public Commandshowkit() {
|
||||
super("showkit");
|
||||
}
|
||||
|
||||
@Override
|
||||
public void run(final Server server, final User user, final String commandLabel, final String[] args) throws Exception {
|
||||
if (args.length != 1) {
|
||||
throw new NotEnoughArgumentsException();
|
||||
}
|
||||
|
||||
final String[] kits = args[0].toLowerCase(Locale.ENGLISH).split(",");
|
||||
for (final String kitName : kits) {
|
||||
Kit kit = new Kit(kitName, ess);
|
||||
user.sendMessage(tl("kitContains", kitName));
|
||||
for (String s : kit.getItems()) {
|
||||
user.sendMessage(tl("kitItem", s));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
@ -558,4 +558,6 @@ mailFormat=\u00a76[\u00a7r{0}\u00a76] \u00a7r{1}
|
||||
cantGamemode=\u00a74You do not have permission to change to gamemode {0}
|
||||
createKit=\u00a74/createkit <kitname> <delay>
|
||||
createdKit=\u00a76Created kit \u00a7c{0} \u00a76with \u00a7c{1} \u00a76entries and delay \u00a7c{2}
|
||||
spectator=spectator
|
||||
spectator=spectator
|
||||
kitContains=\u00a76Kit \u00a7c{0} \u00a76contains:
|
||||
kitItem=\u00a76- \u00a7f{0}
|
@ -558,4 +558,6 @@ playerTempBanned=\u00a76Player \u00a7c{0}\u00a76 temporarily banned \u00a7c{1}\u
|
||||
mailFormat=\u00a76[\u00a7r{0}\u00a76] \u00a7r{1}
|
||||
cantGamemode=\u00a74You do not have permission to change to gamemode {0}
|
||||
createdKit=\u00a76Created kit \u00a7c{0} \u00a76with \u00a7c{1} \u00a76entries and delay \u00a7c{2}
|
||||
spectator=spectator
|
||||
spectator=spectator
|
||||
kitContains=\u00a76Kit \u00a7c{0} \u00a76contains:
|
||||
kitItem=\u00a76- \u00a7f{0}
|
@ -558,4 +558,6 @@ playerTempBanned=\u00a76Player \u00a7c{0}\u00a76 temporarily banned \u00a7c{1}\u
|
||||
mailFormat=\u00a76[\u00a7r{0}\u00a76] \u00a7r{1}
|
||||
cantGamemode=\u00a74You do not have permission to change to gamemode {0}
|
||||
createdKit=\u00a76Created kit \u00a7c{0} \u00a76with \u00a7c{1} \u00a76entries and delay \u00a7c{2}
|
||||
spectator=spectator
|
||||
spectator=spectator
|
||||
kitContains=\u00a76Kit \u00a7c{0} \u00a76contains:
|
||||
kitItem=\u00a76- \u00a7f{0}
|
@ -558,4 +558,6 @@ playerTempBanned=\u00a76Player \u00a7c{0}\u00a76 temporarily banned \u00a7c{1}\u
|
||||
mailFormat=\u00a76[\u00a7r{0}\u00a76] \u00a7r{1}
|
||||
cantGamemode=\u00a74You do not have permission to change to gamemode {0}
|
||||
createdKit=\u00a76Created kit \u00a7c{0} \u00a76with \u00a7c{1} \u00a76entries and delay \u00a7c{2}
|
||||
spectator=spectator
|
||||
spectator=spectator
|
||||
kitContains=\u00a76Kit \u00a7c{0} \u00a76contains:
|
||||
kitItem=\u00a76- \u00a7f{0}
|
@ -557,4 +557,6 @@ playerTempBanned=\u00a76Player \u00a7c{0}\u00a76 temporarily banned \u00a7c{1}\u
|
||||
mailFormat=\u00a76[\u00a7r{0}\u00a76] \u00a7r{1}
|
||||
cantGamemode=\u00a74You do not have permission to change to gamemode {0}
|
||||
createdKit=\u00a76Created kit \u00a7c{0} \u00a76with \u00a7c{1} \u00a76entries and delay \u00a7c{2}
|
||||
spectator=spectator
|
||||
spectator=spectator
|
||||
kitContains=\u00a76Kit \u00a7c{0} \u00a76contains:
|
||||
kitItem=\u00a76- \u00a7f{0}
|
@ -558,4 +558,6 @@ playerTempBanned=\u00a76Player \u00a7c{0}\u00a76 temporarily banned \u00a7c{1}\u
|
||||
mailFormat=\u00a76[\u00a7r{0}\u00a76] \u00a7r{1}
|
||||
cantGamemode=\u00a74You do not have permission to change to gamemode {0}
|
||||
createdKit=\u00a76Created kit \u00a7c{0} \u00a76with \u00a7c{1} \u00a76entries and delay \u00a7c{2}
|
||||
spectator=spectator
|
||||
spectator=spectator
|
||||
kitContains=\u00a76Kit \u00a7c{0} \u00a76contains:
|
||||
kitItem=\u00a76- \u00a7f{0}
|
@ -558,4 +558,6 @@ playerTempBanned=\u00a76Player \u00a7c{0}\u00a76 temporarily banned \u00a7c{1}\u
|
||||
mailFormat=\u00a76[\u00a7r{0}\u00a76] \u00a7r{1}
|
||||
cantGamemode=\u00a74You do not have permission to change to gamemode {0}
|
||||
createdKit=\u00a76Created kit \u00a7c{0} \u00a76with \u00a7c{1} \u00a76entries and delay \u00a7c{2}
|
||||
spectator=spectator
|
||||
spectator=spectator
|
||||
kitContains=\u00a76Kit \u00a7c{0} \u00a76contains:
|
||||
kitItem=\u00a76- \u00a7f{0}
|
@ -558,4 +558,6 @@ playerTempBanned=\u00a76Player \u00a7c{0}\u00a76 temporarily banned \u00a7c{1}\u
|
||||
mailFormat=\u00a76[\u00a7r{0}\u00a76] \u00a7r{1}
|
||||
cantGamemode=\u00a74You do not have permission to change to gamemode {0}
|
||||
createdKit=\u00a76Created kit \u00a7c{0} \u00a76with \u00a7c{1} \u00a76entries and delay \u00a7c{2}
|
||||
spectator=spectator
|
||||
spectator=spectator
|
||||
kitContains=\u00a76Kit \u00a7c{0} \u00a76contains:
|
||||
kitItem=\u00a76- \u00a7f{0}
|
@ -558,4 +558,6 @@ playerTempBanned=\u00a76Player \u00a7c{0}\u00a76 temporarily banned \u00a7c{1}\u
|
||||
mailFormat=\u00a76[\u00a7r{0}\u00a76] \u00a7r{1}
|
||||
cantGamemode=\u00a74You do not have permission to change to gamemode {0}
|
||||
createdKit=\u00a76Created kit \u00a7c{0} \u00a76with \u00a7c{1} \u00a76entries and delay \u00a7c{2}
|
||||
spectator=spectator
|
||||
spectator=spectator
|
||||
kitContains=\u00a76Kit \u00a7c{0} \u00a76contains:
|
||||
kitItem=\u00a76- \u00a7f{0}
|
@ -558,4 +558,6 @@ playerTempBanned=\u00a76Player \u00a7c{0}\u00a76 temporarily banned \u00a7c{1}\u
|
||||
mailFormat=\u00a76[\u00a7r{0}\u00a76] \u00a7r{1}
|
||||
cantGamemode=\u00a74You do not have permission to change to gamemode {0}
|
||||
createdKit=\u00a76Created kit \u00a7c{0} \u00a76with \u00a7c{1} \u00a76entries and delay \u00a7c{2}
|
||||
spectator=spectator
|
||||
spectator=spectator
|
||||
kitContains=\u00a76Kit \u00a7c{0} \u00a76contains:
|
||||
kitItem=\u00a76- \u00a7f{0}
|
@ -558,4 +558,6 @@ playerTempBanned=\u00a76Player \u00a7c{0}\u00a76 temporarily banned \u00a7c{1}\u
|
||||
mailFormat=\u00a76[\u00a7r{0}\u00a76] \u00a7r{1}
|
||||
cantGamemode=\u00a74You do not have permission to change to gamemode {0}
|
||||
createdKit=\u00a76Created kit \u00a7c{0} \u00a76with \u00a7c{1} \u00a76entries and delay \u00a7c{2}
|
||||
spectator=spectator
|
||||
spectator=spectator
|
||||
kitContains=\u00a76Kit \u00a7c{0} \u00a76contains:
|
||||
kitItem=\u00a76- \u00a7f{0}
|
@ -558,4 +558,6 @@ playerTempBanned=\u00a76Player \u00a7c{0}\u00a76 temporarily banned \u00a7c{1}\u
|
||||
mailFormat=\u00a76[\u00a7r{0}\u00a76] \u00a7r{1}
|
||||
cantGamemode=\u00a74You do not have permission to change to gamemode {0}
|
||||
createdKit=\u00a76Created kit \u00a7c{0} \u00a76with \u00a7c{1} \u00a76entries and delay \u00a7c{2}
|
||||
spectator=spectator
|
||||
spectator=spectator
|
||||
kitContains=\u00a76Kit \u00a7c{0} \u00a76contains:
|
||||
kitItem=\u00a76- \u00a7f{0}
|
@ -558,4 +558,6 @@ playerTempBanned=\u00a76Player \u00a7c{0}\u00a76 temporarily banned \u00a7c{1}\u
|
||||
mailFormat=\u00a76[\u00a7r{0}\u00a76] \u00a7r{1}
|
||||
cantGamemode=\u00a74You do not have permission to change to gamemode {0}
|
||||
createdKit=\u00a76Created kit \u00a7c{0} \u00a76with \u00a7c{1} \u00a76entries and delay \u00a7c{2}
|
||||
spectator=spectator
|
||||
spectator=spectator
|
||||
kitContains=\u00a76Kit \u00a7c{0} \u00a76contains:
|
||||
kitItem=\u00a76- \u00a7f{0}
|
@ -558,4 +558,6 @@ playerTempBanned=\u00a76Player \u00a7c{0}\u00a76 temporarily banned \u00a7c{1}\u
|
||||
mailFormat=\u00a76[\u00a7r{0}\u00a76] \u00a7r{1}
|
||||
cantGamemode=\u00a74You do not have permission to change to gamemode {0}
|
||||
createdKit=\u00a76Created kit \u00a7c{0} \u00a76with \u00a7c{1} \u00a76entries and delay \u00a7c{2}
|
||||
spectator=spectator
|
||||
spectator=spectator
|
||||
kitContains=\u00a76Kit \u00a7c{0} \u00a76contains:
|
||||
kitItem=\u00a76- \u00a7f{0}
|
@ -558,4 +558,6 @@ playerTempBanned=\u00a76Player \u00a7c{0}\u00a76 temporarily banned \u00a7c{1}\u
|
||||
mailFormat=\u00a76[\u00a7r{0}\u00a76] \u00a7r{1}
|
||||
cantGamemode=\u00a74You do not have permission to change to gamemode {0}
|
||||
createdKit=\u00a76Created kit \u00a7c{0} \u00a76with \u00a7c{1} \u00a76entries and delay \u00a7c{2}
|
||||
spectator=spectator
|
||||
spectator=spectator
|
||||
kitContains=\u00a76Kit \u00a7c{0} \u00a76contains:
|
||||
kitItem=\u00a76- \u00a7f{0}
|
@ -558,4 +558,6 @@ playerTempBanned=\u00a76Player \u00a7c{0}\u00a76 temporarily banned \u00a7c{1}\u
|
||||
mailFormat=\u00a76[\u00a7r{0}\u00a76] \u00a7r{1}
|
||||
cantGamemode=\u00a74You do not have permission to change to gamemode {0}
|
||||
createdKit=\u00a76Created kit \u00a7c{0} \u00a76with \u00a7c{1} \u00a76entries and delay \u00a7c{2}
|
||||
spectator=spectator
|
||||
spectator=spectator
|
||||
kitContains=\u00a76Kit \u00a7c{0} \u00a76contains:
|
||||
kitItem=\u00a76- \u00a7f{0}
|
@ -558,4 +558,6 @@ playerTempBanned=\u00a76Player \u00a7c{0}\u00a76 temporarily banned \u00a7c{1}\u
|
||||
mailFormat=\u00a76[\u00a7r{0}\u00a76] \u00a7r{1}
|
||||
cantGamemode=\u00a74You do not have permission to change to gamemode {0}
|
||||
createdKit=\u00a76Created kit \u00a7c{0} \u00a76with \u00a7c{1} \u00a76entries and delay \u00a7c{2}
|
||||
spectator=spectator
|
||||
spectator=spectator
|
||||
kitContains=\u00a76Kit \u00a7c{0} \u00a76contains:
|
||||
kitItem=\u00a76- \u00a7f{0}
|
@ -558,4 +558,6 @@ playerTempBanned=\u00a76Player \u00a7c{0}\u00a76 temporarily banned \u00a7c{1}\u
|
||||
mailFormat=\u00a76[\u00a7r{0}\u00a76] \u00a7r{1}
|
||||
cantGamemode=\u00a74You do not have permission to change to gamemode {0}
|
||||
createdKit=\u00a76Created kit \u00a7c{0} \u00a76with \u00a7c{1} \u00a76entries and delay \u00a7c{2}
|
||||
spectator=spectator
|
||||
spectator=spectator
|
||||
kitContains=\u00a76Kit \u00a7c{0} \u00a76contains:
|
||||
kitItem=\u00a76- \u00a7f{0}
|
@ -558,4 +558,6 @@ playerTempBanned=\u00a76Player \u00a7c{0}\u00a76 temporarily banned \u00a7c{1}\u
|
||||
mailFormat=\u00a76[\u00a7r{0}\u00a76] \u00a7r{1}
|
||||
cantGamemode=\u00a74You do not have permission to change to gamemode {0}
|
||||
createdKit=\u00a76Created kit \u00a7c{0} \u00a76with \u00a7c{1} \u00a76entries and delay \u00a7c{2}
|
||||
spectator=spectator
|
||||
spectator=spectator
|
||||
kitContains=\u00a76Kit \u00a7c{0} \u00a76contains:
|
||||
kitItem=\u00a76- \u00a7f{0}
|
@ -558,4 +558,6 @@ playerTempBanned=\u00a76Player \u00a7c{0}\u00a76 temporarily banned \u00a7c{1}\u
|
||||
mailFormat=\u00a76[\u00a7r{0}\u00a76] \u00a7r{1}
|
||||
cantGamemode=\u00a74You do not have permission to change to gamemode {0}
|
||||
createdKit=\u00a76Created kit \u00a7c{0} \u00a76with \u00a7c{1} \u00a76entries and delay \u00a7c{2}
|
||||
spectator=spectator
|
||||
spectator=spectator
|
||||
kitContains=\u00a76Kit \u00a7c{0} \u00a76contains:
|
||||
kitItem=\u00a76- \u00a7f{0}
|
@ -558,4 +558,6 @@ playerTempBanned=\u00a76Player \u00a7c{0}\u00a76 temporarily banned \u00a7c{1}\u
|
||||
mailFormat=\u00a76[\u00a7r{0}\u00a76] \u00a7r{1}
|
||||
cantGamemode=\u00a74You do not have permission to change to gamemode {0}
|
||||
createdKit=\u00a76Created kit \u00a7c{0} \u00a76with \u00a7c{1} \u00a76entries and delay \u00a7c{2}
|
||||
spectator=spectator
|
||||
spectator=spectator
|
||||
kitContains=\u00a76Kit \u00a7c{0} \u00a76contains:
|
||||
kitItem=\u00a76- \u00a7f{0}
|
@ -558,4 +558,6 @@ playerTempBanned=\u00a76Player \u00a7c{0}\u00a76 temporarily banned \u00a7c{1}\u
|
||||
mailFormat=\u00a76[\u00a7r{0}\u00a76] \u00a7r{1}
|
||||
cantGamemode=\u00a74You do not have permission to change to gamemode {0}
|
||||
createdKit=\u00a76Created kit \u00a7c{0} \u00a76with \u00a7c{1} \u00a76entries and delay \u00a7c{2}
|
||||
spectator=spectator
|
||||
spectator=spectator
|
||||
kitContains=\u00a76Kit \u00a7c{0} \u00a76contains:
|
||||
kitItem=\u00a76- \u00a7f{0}
|
@ -558,4 +558,6 @@ playerTempBanned=\u00a76Player \u00a7c{0}\u00a76 temporarily banned \u00a7c{1}\u
|
||||
mailFormat=\u00a76[\u00a7r{0}\u00a76] \u00a7r{1}
|
||||
cantGamemode=\u00a74You do not have permission to change to gamemode {0}
|
||||
createdKit=\u00a76Created kit \u00a7c{0} \u00a76with \u00a7c{1} \u00a76entries and delay \u00a7c{2}
|
||||
spectator=spectator
|
||||
spectator=spectator
|
||||
kitContains=\u00a76Kit \u00a7c{0} \u00a76contains:
|
||||
kitItem=\u00a76- \u00a7f{0}
|
@ -558,4 +558,6 @@ playerTempBanned=\u00a76Player \u00a7c{0}\u00a76 temporarily banned \u00a7c{1}\u
|
||||
mailFormat=\u00a76[\u00a7r{0}\u00a76] \u00a7r{1}
|
||||
cantGamemode=\u00a74You do not have permission to change to gamemode {0}
|
||||
createdKit=\u00a76Created kit \u00a7c{0} \u00a76with \u00a7c{1} \u00a76entries and delay \u00a7c{2}
|
||||
spectator=spectator
|
||||
spectator=spectator
|
||||
kitContains=\u00a76Kit \u00a7c{0} \u00a76contains:
|
||||
kitItem=\u00a76- \u00a7f{0}
|
@ -342,6 +342,10 @@ commands:
|
||||
description: Set the sell value of an item.
|
||||
usage: /<command> [itemname|id] <price>
|
||||
aliases: [esetworth]
|
||||
showkit:
|
||||
description: Show contents of a kit.
|
||||
usage: /<command> <kitname>
|
||||
aliases: [kitpreview,preview,kitshow]
|
||||
skull:
|
||||
description: Set the owner of a player skull
|
||||
usage: /<command> [owner]
|
||||
|
Loading…
Reference in New Issue
Block a user