mirror of
https://github.com/EssentialsX/Essentials.git
synced 2025-02-17 12:30:13 +08:00
Make old /createkit toggleable in config.
This commit is contained in:
parent
e0d69d05eb
commit
6cbb8c846b
@ -265,4 +265,6 @@ public interface ISettings extends IConf {
|
||||
NumberFormat getCurrencyFormat();
|
||||
|
||||
List<EssentialsSign> getUnprotectedSignNames();
|
||||
|
||||
boolean isPastebinCreateKit();
|
||||
}
|
||||
|
@ -1354,4 +1354,9 @@ public class Settings implements net.ess3.api.ISettings {
|
||||
}
|
||||
return newSigns;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isPastebinCreateKit() {
|
||||
return config.getBoolean("pastebin-createkit", true);
|
||||
}
|
||||
}
|
||||
|
@ -70,15 +70,21 @@ public class Commandcreatekit extends EssentialsCommand {
|
||||
list.add(serialized);
|
||||
}
|
||||
}
|
||||
ConfigurationSection config = new MemoryConfiguration();
|
||||
config.set("kits." + kitname + ".delay", delay);
|
||||
config.set("kits." + kitname + ".items", list);
|
||||
// Some users might want to directly write to config knowing the consequences. *shrug*
|
||||
if (!ess.getSettings().isPastebinCreateKit()) {
|
||||
ess.getSettings().addKit(kitname, list, delay);
|
||||
user.sendMessage(tl("createdKit", kitname, list.size(), delay));
|
||||
} else {
|
||||
ConfigurationSection config = new MemoryConfiguration();
|
||||
config.set("kits." + kitname + ".delay", delay);
|
||||
config.set("kits." + kitname + ".items", list);
|
||||
|
||||
final Yaml yaml = new Yaml(yamlConstructor, yamlRepresenter, yamlOptions);
|
||||
String fileContents = "# Copy the kit code below into the kits section in your config.yml file\n";
|
||||
fileContents += yaml.dump(config.getValues(false));
|
||||
final Yaml yaml = new Yaml(yamlConstructor, yamlRepresenter, yamlOptions);
|
||||
String fileContents = "# Copy the kit code below into the kits section in your config.yml file\n";
|
||||
fileContents += yaml.dump(config.getValues(false));
|
||||
|
||||
gist(user.getSource(), kitname, delay, fileContents);
|
||||
gist(user.getSource(), kitname, delay, fileContents);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -515,6 +515,13 @@ command-cooldown-persistence: true
|
||||
# NPC balances can include features like factions from FactionsUUID plugin.
|
||||
npcs-in-balance-ranking: false
|
||||
|
||||
# Determines the functionality of the /createkit command.
|
||||
# If this is true, /createkit will give the user a link with the kit code.
|
||||
# If this is false, /createkit will add the kit to this config file directly.
|
||||
#
|
||||
# WARNING: If this is false, the config comments WILL be removed and it won't look the same as it does now.
|
||||
pastebin-createkit: true
|
||||
|
||||
############################################################
|
||||
# +------------------------------------------------------+ #
|
||||
# | EssentialsHome | #
|
||||
|
@ -564,6 +564,7 @@ whoisTempBanned=\u00a76 - Ban expires:\u00a7r {0}
|
||||
playerTempBanned=\u00a76Player \u00a7c{0}\u00a76 temporarily banned \u00a7c{1}\u00a76 for \u00a7c{2}\u00a76: \u00a7c{3}\u00a76.
|
||||
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
|
||||
kitContains=\u00a76Kit \u00a7c{0} \u00a76contains:
|
||||
kitItem=\u00a76- \u00a7f{0}
|
||||
|
@ -560,6 +560,7 @@ whoisTempBanned=\u00a76 - Ban expires:\u00a7r {0}
|
||||
playerTempBanned=\u00a76Player \u00a7c{0}\u00a76 temporarily banned \u00a7c{1}\u00a76 for \u00a7c{2}\u00a76: \u00a7c{3}\u00a76.
|
||||
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
|
||||
kitContains=\u00a76Kit \u00a7c{0} \u00a76contains:
|
||||
kitItem=\u00a76- \u00a7f{0}
|
||||
|
@ -560,6 +560,7 @@ whoisTempBanned=\u00a76 - Ban expires:\u00a7r {0}
|
||||
playerTempBanned=\u00a76Player \u00a7c{0}\u00a76 temporarily banned \u00a7c{1}\u00a76 for \u00a7c{2}\u00a76: \u00a7c{3}\u00a76.
|
||||
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
|
||||
kitContains=\u00a76Kit \u00a7c{0} \u00a76contains:
|
||||
kitItem=\u00a76- \u00a7f{0}
|
||||
|
@ -563,6 +563,7 @@ whoisTempBanned=\u00a76 - Verbannung endet:\u00a7r {0}
|
||||
playerTempBanned=\u00a76Spieler \u00a7c{0}\u00a76 verbannte \u00a7c{1}\u00a76 f\u00fcr \u00a7c{2} \u00a76wegen: \u00a7c{3}\u00a76.
|
||||
mailFormat=\u00a76[\u00a7r{0}\u00a76] \u00a7r{1}
|
||||
cantGamemode=\u00a74Du hast keine Permission, um zum Spielmodus {0} zu wechseln.
|
||||
createdKit=\u00a76Created kit \u00a7c{0} \u00a76with \u00a7c{1} \u00a76entries and delay \u00a7c{2}
|
||||
spectator=Zuschauer
|
||||
kitContains=\u00a76Ausr\u00fcstung \u00a7c{0} \u00a76enth\u00e4lt:
|
||||
kitItem=\u00a76- \u00a7f{0}
|
||||
|
@ -560,6 +560,7 @@ whoisTempBanned=\u00a76 - Ban expires:\u00a7r {0}
|
||||
playerTempBanned=\u00a76Player \u00a7c{0}\u00a76 temporarily banned \u00a7c{1}\u00a76 for \u00a7c{2}\u00a76: \u00a7c{3}\u00a76.
|
||||
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
|
||||
kitContains=\u00a76Kit \u00a7c{0} \u00a76contains:
|
||||
kitItem=\u00a76- \u00a7f{0}
|
||||
|
@ -560,6 +560,7 @@ whoisTempBanned=\u00a76 - Ban expires:\u00a7r {0}
|
||||
playerTempBanned=\u00a76Player \u00a7c{0}\u00a76 temporarily banned \u00a7c{1}\u00a76 for \u00a7c{2}\u00a76: \u00a7c{3}\u00a76.
|
||||
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
|
||||
kitContains=\u00a76Kit \u00a7c{0} \u00a76contains:
|
||||
kitItem=\u00a76- \u00a7f{0}
|
||||
|
@ -560,6 +560,7 @@ whoisTempBanned=\u00a76 - Ban expires:\u00a7r {0}
|
||||
playerTempBanned=\u00a76Player \u00a7c{0}\u00a76 temporarily banned \u00a7c{1}\u00a76 for \u00a7c{2}\u00a76: \u00a7c{3}\u00a76.
|
||||
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
|
||||
kitContains=\u00a76Kit \u00a7c{0} \u00a76contains:
|
||||
kitItem=\u00a76- \u00a7f{0}
|
||||
|
@ -560,6 +560,7 @@ whoisTempBanned=\u00a76 - Ban expires:\u00a7r {0}
|
||||
playerTempBanned=\u00a76Player \u00a7c{0}\u00a76 temporarily banned \u00a7c{1}\u00a76 for \u00a7c{2}\u00a76: \u00a7c{3}\u00a76.
|
||||
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
|
||||
kitContains=\u00a76Kit \u00a7c{0} \u00a76contains:
|
||||
kitItem=\u00a76- \u00a7f{0}
|
||||
|
@ -560,6 +560,7 @@ whoisTempBanned=\u00a76 - Expiration du ban:\u00a7r {0}
|
||||
playerTempBanned=\u00a7c{0}\u00a76 a banni temporairement \u00a7c{1}\u00a76 pour \u00a7c{2}\u00a76: \u00a7c{3}\u00a76.
|
||||
mailFormat=\u00a76[\u00a7r{0}\u00a76] \u00a7r{1}
|
||||
cantGamemode=\u00a74Vous n''avez pas la permission de changer de gamemode {0}
|
||||
createdKit=\u00a76Created kit \u00a7c{0} \u00a76with \u00a7c{1} \u00a76entries and delay \u00a7c{2}
|
||||
spectator=spectateur
|
||||
kitContains=\u00a76Kit \u00a7c{0} \u00a76contient:
|
||||
kitItem=\u00a76- \u00a7f{0}
|
||||
|
@ -560,6 +560,7 @@ whoisTempBanned=\u00a76 - Ban expires:\u00a7r {0}
|
||||
playerTempBanned=\u00a76Player \u00a7c{0}\u00a76 temporarily banned \u00a7c{1}\u00a76 for \u00a7c{2}\u00a76: \u00a7c{3}\u00a76.
|
||||
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
|
||||
kitContains=\u00a76Kit \u00a7c{0} \u00a76contains:
|
||||
kitItem=\u00a76- \u00a7f{0}
|
||||
|
@ -560,6 +560,7 @@ whoisTempBanned=\u00a76 - Ban expires:\u00a7r {0}
|
||||
playerTempBanned=\u00a76Player \u00a7c{0}\u00a76 temporarily banned \u00a7c{1}\u00a76 for \u00a7c{2}\u00a76: \u00a7c{3}\u00a76.
|
||||
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
|
||||
kitContains=\u00a76Kit \u00a7c{0} \u00a76contains:
|
||||
kitItem=\u00a76- \u00a7f{0}
|
||||
|
@ -560,6 +560,7 @@ whoisTempBanned=\u00a76 - Ban expires:\u00a7r {0}
|
||||
playerTempBanned=\u00a76Player \u00a7c{0}\u00a76 temporarily banned \u00a7c{1}\u00a76 for \u00a7c{2}\u00a76: \u00a7c{3}\u00a76.
|
||||
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
|
||||
kitContains=\u00a76Kit \u00a7c{0} \u00a76contains:
|
||||
kitItem=\u00a76- \u00a7f{0}
|
||||
|
@ -560,6 +560,7 @@ whoisTempBanned=\u00a76 - Ban expires:\u00a7r {0}
|
||||
playerTempBanned=\u00a76Player \u00a7c{0}\u00a76 temporarily banned \u00a7c{1}\u00a76 for \u00a7c{2}\u00a76: \u00a7c{3}\u00a76.
|
||||
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
|
||||
kitContains=\u00a76Kit \u00a7c{0} \u00a76contains:
|
||||
kitItem=\u00a76- \u00a7f{0}
|
||||
|
@ -560,6 +560,7 @@ whoisTempBanned=\u00a76 - Ban expires:\u00a7r {0}
|
||||
playerTempBanned=\u00a76Player \u00a7c{0}\u00a76 temporarily banned \u00a7c{1}\u00a76 for \u00a7c{2}\u00a76: \u00a7c{3}\u00a76.
|
||||
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
|
||||
kitContains=\u00a76Kit \u00a7c{0} \u00a76contains:
|
||||
kitItem=\u00a76- \u00a7f{0}
|
||||
|
@ -560,6 +560,7 @@ whoisTempBanned=\u00a76 - Ban expires:\u00a7r {0}
|
||||
playerTempBanned=\u00a76Player \u00a7c{0}\u00a76 temporarily banned \u00a7c{1}\u00a76 for \u00a7c{2}\u00a76: \u00a7c{3}\u00a76.
|
||||
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
|
||||
kitContains=\u00a76Kit \u00a7c{0} \u00a76contains:
|
||||
kitItem=\u00a76- \u00a7f{0}
|
||||
|
@ -557,6 +557,7 @@ whoisTempBanned=\u00A76 - Banido:\u00A7r {0}
|
||||
playerTempBanned=\u00A76Jogador \u00A7c{0}\u00A76 baniu temporariamente \u00A7c{1}\u00A76 por \u00A7c{2}\u00A76: \u00A7c{3}\u00A76.
|
||||
mailFormat=\u00A76[\u00A7r{0}\u00A76] \u00A7r{1}
|
||||
cantGamemode=\u00A74N\u00E3o tens permiss\u00E3o para mudar para o gamemode {0}
|
||||
createdKit=\u00a76Created kit \u00a7c{0} \u00a76with \u00a7c{1} \u00a76entries and delay \u00a7c{2}
|
||||
spectator=espetador
|
||||
kitContains=\u00A76Kit \u00A7c{0} \u00A76cont\u00E9m:
|
||||
kitItems=\u00A76- \u00A7f{0}
|
||||
|
@ -557,6 +557,7 @@ whoisTempBanned=\u00A76 - Banido:\u00A7r {0}
|
||||
playerTempBanned=\u00A76Jogador \u00A7c{0}\u00A76 baniu temporariamente \u00A7c{1}\u00A76 por \u00A7c{2}\u00A76: \u00A7c{3}\u00A76.
|
||||
mailFormat=\u00A76[\u00A7r{0}\u00A76] \u00A7r{1}
|
||||
cantGamemode=\u00A74Voc\u00EA n\u00E3o tem permiss\u00E3o para mudar para o gamemode {0}
|
||||
createdKit=\u00a76Created kit \u00a7c{0} \u00a76with \u00a7c{1} \u00a76entries and delay \u00a7c{2}
|
||||
spectator=espetador
|
||||
kitContains=\u00A76Kit \u00A7c{0} \u00A76cont\u00E9m:
|
||||
kitItem=\u00A76- \u00A7f{0}
|
||||
|
@ -560,6 +560,7 @@ whoisTempBanned=\u00a76 - Ban expires:\u00a7r {0}
|
||||
playerTempBanned=\u00a76Player \u00a7c{0}\u00a76 temporarily banned \u00a7c{1}\u00a76 for \u00a7c{2}\u00a76: \u00a7c{3}\u00a76.
|
||||
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
|
||||
kitContains=\u00a76Kit \u00a7c{0} \u00a76contains:
|
||||
kitItem=\u00a76- \u00a7f{0}
|
||||
|
@ -560,6 +560,7 @@ whoisTempBanned=\u00a76 - Ban expires:\u00a7r {0}
|
||||
playerTempBanned=\u00a76Player \u00a7c{0}\u00a76 temporarily banned \u00a7c{1}\u00a76 for \u00a7c{2}\u00a76: \u00a7c{3}\u00a76.
|
||||
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
|
||||
kitContains=\u00a76Kit \u00a7c{0} \u00a76contains:
|
||||
kitItem=\u00a76- \u00a7f{0}
|
||||
|
@ -560,6 +560,7 @@ whoisTempBanned=\u00a76 - Ban expires:\u00a7r {0}
|
||||
playerTempBanned=\u00a76Player \u00a7c{0}\u00a76 temporarily banned \u00a7c{1}\u00a76 for \u00a7c{2}\u00a76: \u00a7c{3}\u00a76.
|
||||
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
|
||||
kitContains=\u00a76Kit \u00a7c{0} \u00a76contains:
|
||||
kitItem=\u00a76- \u00a7f{0}
|
||||
|
@ -560,6 +560,7 @@ whoisTempBanned=\u00a76 - Ban expires:\u00a7r {0}
|
||||
playerTempBanned=\u00a76Player \u00a7c{0}\u00a76 temporarily banned \u00a7c{1}\u00a76 for \u00a7c{2}\u00a76: \u00a7c{3}\u00a76.
|
||||
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
|
||||
kitContains=\u00a76Kit \u00a7c{0} \u00a76contains:
|
||||
kitItem=\u00a76- \u00a7f{0}
|
||||
|
@ -560,6 +560,7 @@ whoisTempBanned=\u00a76 - Ban expires:\u00a7r {0}
|
||||
playerTempBanned=\u00a76Player \u00a7c{0}\u00a76 temporarily banned \u00a7c{1}\u00a76 for \u00a7c{2}\u00a76: \u00a7c{3}\u00a76.
|
||||
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
|
||||
kitContains=\u00a76Kit \u00a7c{0} \u00a76contains:
|
||||
kitItem=\u00a76- \u00a7f{0}
|
||||
|
@ -560,6 +560,7 @@ whoisTempBanned=\u00a76 - Ban expires:\u00a7r {0}
|
||||
playerTempBanned=\u00a76Player \u00a7c{0}\u00a76 temporarily banned \u00a7c{1}\u00a76 for \u00a7c{2}\u00a76: \u00a7c{3}\u00a76.
|
||||
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
|
||||
kitContains=\u00a76Kit \u00a7c{0} \u00a76contains:
|
||||
kitItem=\u00a76- \u00a7f{0}
|
||||
|
@ -560,6 +560,7 @@ whoisTempBanned=\u00a76 - Ban expires:\u00a7r {0}
|
||||
playerTempBanned=\u00a76Player \u00a7c{0}\u00a76 temporarily banned \u00a7c{1}\u00a76 for \u00a7c{2}\u00a76: \u00a7c{3}\u00a76.
|
||||
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
|
||||
kitContains=\u00a76Kit \u00a7c{0} \u00a76contains:
|
||||
kitItem=\u00a76- \u00a7f{0}
|
||||
|
Loading…
Reference in New Issue
Block a user