diff --git a/bedwars-api/src/main/java/com/andrei1058/bedwars/api/events/player/PlayerXpGainEvent.java b/bedwars-api/src/main/java/com/andrei1058/bedwars/api/events/player/PlayerXpGainEvent.java index 20e31dc6d..bcd540ef3 100644 --- a/bedwars-api/src/main/java/com/andrei1058/bedwars/api/events/player/PlayerXpGainEvent.java +++ b/bedwars-api/src/main/java/com/andrei1058/bedwars/api/events/player/PlayerXpGainEvent.java @@ -72,7 +72,7 @@ public XpSource getXpSource() { * Lets you know why did the player received new xp. */ public enum XpSource { - PER_MINUTE, PER_TEAMMATE, GAME_WIN, OTHER + PER_MINUTE, PER_TEAMMATE, GAME_WIN, BED_DESTROYED, FINAL_KILL, REGULAR_KILL, OTHER } @Override diff --git a/bedwars-api/src/main/java/com/andrei1058/bedwars/api/language/Messages.java b/bedwars-api/src/main/java/com/andrei1058/bedwars/api/language/Messages.java index 6c9dd98e7..a9ce59d04 100644 --- a/bedwars-api/src/main/java/com/andrei1058/bedwars/api/language/Messages.java +++ b/bedwars-api/src/main/java/com/andrei1058/bedwars/api/language/Messages.java @@ -275,6 +275,9 @@ public class Messages { public static String XP_REWARD_WIN = "xp-reward-game-win"; public static String XP_REWARD_PER_TEAMMATE = "xp-reward-per-teammate"; public static String XP_REWARD_PER_MINUTE = "xp-reward-per-minute"; + public static String XP_REWARD_BED_DESTROY = "xp-reward-bed-destroyed"; + public static String XP_REWARD_REGULAR_KILL = "xp-reward-regular-kill"; + public static String XP_REWARD_FINAL_KILL = "xp-reward-final-kill"; public static String MONEY_REWARD_WIN = "money-reward-game-win"; public static String MONEY_REWARD_PER_MINUTE = "money-reward-per-teammate"; diff --git a/bedwars-plugin/src/main/java/com/andrei1058/bedwars/configuration/LevelsConfig.java b/bedwars-plugin/src/main/java/com/andrei1058/bedwars/configuration/LevelsConfig.java index 0a415ef5f..ecbfa7569 100644 --- a/bedwars-plugin/src/main/java/com/andrei1058/bedwars/configuration/LevelsConfig.java +++ b/bedwars-plugin/src/main/java/com/andrei1058/bedwars/configuration/LevelsConfig.java @@ -61,6 +61,9 @@ public static void init() { levels.getYml().addDefault("xp-rewards.per-minute", 10); levels.getYml().addDefault("xp-rewards.per-teammate", 5); levels.getYml().addDefault("xp-rewards.game-win", 100); + levels.getYml().addDefault("xp-rewards.bed-destroyed", 15); + levels.getYml().addDefault("xp-rewards.regular-kill", 10); + levels.getYml().addDefault("xp-rewards.final-kill", 15); levels.getYml().addDefault("progress-bar.symbol", "■"); levels.getYml().addDefault("progress-bar.unlocked-color", "&b"); diff --git a/bedwars-plugin/src/main/java/com/andrei1058/bedwars/language/Bangla.java b/bedwars-plugin/src/main/java/com/andrei1058/bedwars/language/Bangla.java index 45b952793..ce047243a 100644 --- a/bedwars-plugin/src/main/java/com/andrei1058/bedwars/language/Bangla.java +++ b/bedwars-plugin/src/main/java/com/andrei1058/bedwars/language/Bangla.java @@ -281,6 +281,9 @@ public Bangla() { yml.addDefault(Messages.XP_REWARD_PER_MINUTE, "{prefix}&6+{xp} BedWars Experience pelen (Play Time)."); yml.addDefault(Messages.XP_REWARD_WIN, "{prefix}&6+{xp} BedWars Experience pelen (Game Win)."); yml.addDefault(Messages.XP_REWARD_PER_TEAMMATE, "{prefix}&6+{xp} BedWars Experience pelen (Team Support)."); + yml.addDefault(Messages.XP_REWARD_BED_DESTROY, "{prefix}&6+{xp} BedWars Experience pelen (Bed Destroyed)."); + yml.addDefault(Messages.XP_REWARD_REGULAR_KILL, "{prefix}&6+{xp} BedWars Experience pelen (Regular Kill)."); + yml.addDefault(Messages.XP_REWARD_FINAL_KILL, "{prefix}&6+{xp} BedWars Experience pelen (Final Kill)."); yml.addDefault(Messages.MONEY_REWARD_PER_MINUTE, "{prefix}&6+{money} Coins pelen (Play Time)."); yml.addDefault(Messages.MONEY_REWARD_WIN, "{prefix}&6+{money} Coins pelen (Game Win)."); diff --git a/bedwars-plugin/src/main/java/com/andrei1058/bedwars/language/English.java b/bedwars-plugin/src/main/java/com/andrei1058/bedwars/language/English.java index 941ed426f..df45fe0d7 100644 --- a/bedwars-plugin/src/main/java/com/andrei1058/bedwars/language/English.java +++ b/bedwars-plugin/src/main/java/com/andrei1058/bedwars/language/English.java @@ -280,6 +280,9 @@ public English() { yml.addDefault(Messages.XP_REWARD_PER_MINUTE, "{prefix}&6+{xp} BedWars Experience Received (Play Time)."); yml.addDefault(Messages.XP_REWARD_WIN, "{prefix}&6+{xp} BedWars Experience Received (Game Win)."); yml.addDefault(Messages.XP_REWARD_PER_TEAMMATE, "{prefix}&6+{xp} BedWars Experience Received (Team Support)."); + yml.addDefault(Messages.XP_REWARD_BED_DESTROY, "{prefix}&6+{xp} BedWars Experience Received (Bed Destroyed)."); + yml.addDefault(Messages.XP_REWARD_REGULAR_KILL, "{prefix}&6+{xp} BedWars Experience Received (Regular Kill)."); + yml.addDefault(Messages.XP_REWARD_FINAL_KILL, "{prefix}&6+{xp} BedWars Experience Received (Final Kill)."); yml.addDefault(Messages.MONEY_REWARD_PER_MINUTE, "{prefix}&6+{money} Coins (Play Time)."); yml.addDefault(Messages.MONEY_REWARD_WIN, "{prefix}&6+{money} Coins (Game Win)."); diff --git a/bedwars-plugin/src/main/java/com/andrei1058/bedwars/language/Hindi.java b/bedwars-plugin/src/main/java/com/andrei1058/bedwars/language/Hindi.java index 67d283e64..1427200a6 100644 --- a/bedwars-plugin/src/main/java/com/andrei1058/bedwars/language/Hindi.java +++ b/bedwars-plugin/src/main/java/com/andrei1058/bedwars/language/Hindi.java @@ -280,6 +280,9 @@ public Hindi() { yml.addDefault(Messages.XP_REWARD_PER_MINUTE, "{prefix}&6+{xp} BedWars praapt kiye (Play Time)."); yml.addDefault(Messages.XP_REWARD_WIN, "{prefix}&6+{xp} BedWars praapt kiye (Game Win)."); yml.addDefault(Messages.XP_REWARD_PER_TEAMMATE, "{prefix}&6+{xp} BedWars Experience praapt kiye (Team Support)."); + yml.addDefault(Messages.XP_REWARD_BED_DESTROY, "{prefix}&6+{xp} BedWars Experience praapt kiye (Bed Destroyed)."); + yml.addDefault(Messages.XP_REWARD_REGULAR_KILL, "{prefix}&6+{xp} BedWars Experience praapt kiye (Regular Kill)."); + yml.addDefault(Messages.XP_REWARD_FINAL_KILL, "{prefix}&6+{xp} BedWars Experience praapt kiye (Final Kill)."); yml.addDefault(Messages.MONEY_REWARD_PER_MINUTE, "{prefix}&6+{money} Coins mila (Play Time)."); yml.addDefault(Messages.MONEY_REWARD_WIN, "{prefix}&6+{money} Coins mila (Game Win)."); diff --git a/bedwars-plugin/src/main/java/com/andrei1058/bedwars/language/Indonesia.java b/bedwars-plugin/src/main/java/com/andrei1058/bedwars/language/Indonesia.java index f5ec53c84..ae508bdb5 100644 --- a/bedwars-plugin/src/main/java/com/andrei1058/bedwars/language/Indonesia.java +++ b/bedwars-plugin/src/main/java/com/andrei1058/bedwars/language/Indonesia.java @@ -280,6 +280,9 @@ public Indonesia() { yml.addDefault(Messages.XP_REWARD_PER_MINUTE, "{prefix}&6+{xp} Experience Bed Wars Diterima (Waktu Bermain)."); yml.addDefault(Messages.XP_REWARD_WIN, "{prefix}&6+{xp} Experience Bed Wars Diterima (Memenangkan Permainan)."); yml.addDefault(Messages.XP_REWARD_PER_TEAMMATE, "{prefix}&6+{xp} Experience Bed Wars Diterima (Dukungan Tim)."); + yml.addDefault(Messages.XP_REWARD_BED_DESTROY, "{prefix}&6+{xp} Experience Bed Wars Diterima (Menghancurkan Kasur)."); + yml.addDefault(Messages.XP_REWARD_REGULAR_KILL, "{prefix}&6+{xp} Experience Bed Wars Diterima (Pembunuhan Biasa)."); + yml.addDefault(Messages.XP_REWARD_FINAL_KILL, "{prefix}&6+{xp} Experience Bed Wars Diterima (Pembunuhan Terakhir)."); yml.addDefault(Messages.MONEY_REWARD_PER_MINUTE, "{prefix}&6+{money} Koin (Waktu Bermain)."); yml.addDefault(Messages.MONEY_REWARD_WIN, "{prefix}&6+{money} Koin (Memenangkan Permainan)."); diff --git a/bedwars-plugin/src/main/java/com/andrei1058/bedwars/language/Italian.java b/bedwars-plugin/src/main/java/com/andrei1058/bedwars/language/Italian.java index a7cca4874..89f498f92 100644 --- a/bedwars-plugin/src/main/java/com/andrei1058/bedwars/language/Italian.java +++ b/bedwars-plugin/src/main/java/com/andrei1058/bedwars/language/Italian.java @@ -71,7 +71,7 @@ public Italian() { yml.addDefault(Messages.COMMAND_LANG_USAGE_DENIED, "{prefix}&cNon puoi cambiare la lingua durante il gioco."); yml.addDefault(Messages.COMMAND_TP_PLAYER_NOT_FOUND, "{prefix}&cPlayer not found!"); yml.addDefault(Messages.COMMAND_TP_NOT_IN_ARENA, "{prefix}&cThis player is not in a bedwars arena!"); - yml.addDefault(Messages.COMMAND_TP_NOT_STARTED, "{prefix}&cThe arena where the player is didn't start yet!"); + yml.addDefault(Messages.COMMAND_TP_NOT_STARTED, "{prefix}&cL'arena dove si trova il giocatore non è ancora inziata!"); yml.addDefault(Messages.COMMAND_TP_USAGE, "{prefix}&cUsage: /bw tp "); yml.addDefault(Messages.COMMAND_JOIN_DENIED_PARTY_TOO_BIG, "{prefix}&cIl tuo party è troppo grande per entrare in questa arena come una squadra :("); yml.addDefault(Messages.COMMAND_JOIN_DENIED_NOT_PARTY_LEADER, "{prefix}&cSolo il creatore del party può scegliere l'arena."); @@ -162,7 +162,7 @@ public Italian() { yml.addDefault(Messages.FORMATTING_CHAT_LOBBY, "{level}{vPrefix}&7{player}{vSuffix}: {message}"); yml.addDefault(Messages.FORMATTING_CHAT_WAITING, "{level}{vPrefix}&7{player}{vSuffix}: {message}"); yml.addDefault(Messages.FORMATTING_CHAT_SHOUT, "{level}{vPrefix}&6[SHOUT] {team} &7{player}&f{vSuffix}: {message}"); - yml.addDefault(Messages.FORMATTING_CHAT_TEAM, "{level}{vPrefix}&f{team}&7 {player}{vSuffix} {message}"); + yml.addDefault(Messages.FORMATTING_CHAT_TEAM, "{level}{vPrefix}&f{team}&7 {player}{vSuffix}: {message}"); yml.addDefault(Messages.FORMATTING_CHAT_SPECTATOR, "{level}{vPrefix}&7[SPECTATOR] {player}{vSuffix}: {message}"); yml.addDefault(Messages.FORMATTING_SCOREBOARD_HEALTH, Arrays.asList("&c❤", "&aVita")); yml.addDefault(Messages.FORMATTING_SPECTATOR_TEAM, "SPECT"); @@ -278,8 +278,8 @@ public Italian() { /* Lobby Command Items */ yml.addDefault(Messages.GENERAL_CONFIGURATION_LOBBY_ITEMS_NAME.replace("%path%", "stats"), "&eStatistiche"); yml.addDefault(Messages.GENERAL_CONFIGURATION_LOBBY_ITEMS_LORE.replace("%path%", "stats"), Arrays.asList("&fClick-destro per vedere", "le tue statistiche!")); - yml.addDefault(Messages.GENERAL_CONFIGURATION_LOBBY_ITEMS_NAME.replace("%path%", "arena-selector"), "&eArena Selector"); - yml.addDefault(Messages.GENERAL_CONFIGURATION_LOBBY_ITEMS_LORE.replace("%path%", "arena-selector"), Collections.singletonList("&fClick-destro to choose an arena!")); + yml.addDefault(Messages.GENERAL_CONFIGURATION_LOBBY_ITEMS_NAME.replace("%path%", "arena-selector"), "&eSelettore Arena"); + yml.addDefault(Messages.GENERAL_CONFIGURATION_LOBBY_ITEMS_LORE.replace("%path%", "arena-selector"), Collections.singletonList("&fClick-destro Per selezionare un'arena!")); yml.addDefault(Messages.GENERAL_CONFIGURATION_LOBBY_ITEMS_NAME.replace("%path%", "leave"), "&eTorna nella Lobby"); yml.addDefault(Messages.GENERAL_CONFIGURATION_LOBBY_ITEMS_LORE.replace("%path%", "leave"), Collections.singletonList("&fClick-destro per lasciare BedWars!")); /* Pre Game Command Items */ @@ -324,22 +324,25 @@ public Italian() { yml.addDefault(Messages.SCOREBOARD_LOBBY, Arrays.asList("&6&lBedWars", "&fLivello: {level}", "", "&fProgresso: &a{currentXp}&7/&b{requiredXp}", "{progress}", "", "&7{player}", "", "&fSoldi: &a{money}" - , "", "&fVincite: &a{wins}", "&fUccisioni: &a{kills}", "", "&e{server_ip}")); + , "", "&fVittorie: &a{wins}", "&fUccisioni: &a{kills}", "", "&e{server_ip}")); yml.addDefault(Messages.TEAM_ELIMINATED_CHAT, "\n&f&lTEAM ELIMINATO > Il team {TeamColor}{TeamName} &cè stato eliminato\n"); - yml.addDefault(Messages.XP_REWARD_PER_MINUTE, "{prefix}&6+{xp} BedWars Experience Received (Play Time)."); - yml.addDefault(Messages.XP_REWARD_WIN, "{prefix}&6+{xp} BedWars Experience Received (Game Win)."); - yml.addDefault(Messages.XP_REWARD_PER_TEAMMATE, "{prefix}&6+{xp} BedWars Experience Received (Team Support)."); + yml.addDefault(Messages.XP_REWARD_PER_MINUTE, "{prefix}&6+{xp} Esperienza BedWars ricevuta (Tempo di Gioco)."); + yml.addDefault(Messages.XP_REWARD_WIN, "{prefix}&6+{xp} Esperienza BedWars ricevuta (Vittoria)."); + yml.addDefault(Messages.XP_REWARD_PER_TEAMMATE, "{prefix}&6+{xp} Esperienza BedWars ricevuta (Supporto Team)."); + yml.addDefault(Messages.XP_REWARD_BED_DESTROY, "{prefix}&6+{xp} Esperienza BedWars ricevuta (Distruzione letto)."); + yml.addDefault(Messages.XP_REWARD_REGULAR_KILL, "{prefix}&6+{xp} Esperienza BedWars ricevuta (Uccisione)."); + yml.addDefault(Messages.XP_REWARD_FINAL_KILL, "{prefix}&6+{xp} Esperienza BedWars ricevuta (Uccisione Finale)."); - yml.addDefault(Messages.MONEY_REWARD_PER_MINUTE, "{prefix}&6+{money} Coins (Play Time)."); - yml.addDefault(Messages.MONEY_REWARD_WIN, "{prefix}&6+{money} Coins (Game Win)."); - yml.addDefault(Messages.MONEY_REWARD_PER_TEAMMATE, "{prefix}&6+{money} Coins (Team Support)."); - yml.addDefault(Messages.MONEY_REWARD_BED_DESTROYED, "{prefix}&6+{money} Coins (Bed Destroyed)."); - yml.addDefault(Messages.MONEY_REWARD_FINAL_KILL, "{prefix}&6+{money} Coins (Final Kill)."); - yml.addDefault(Messages.MONEY_REWARD_REGULAR_KILL, "{prefix}&6+{money} Coins (Regular Kill)."); + yml.addDefault(Messages.MONEY_REWARD_PER_MINUTE, "{prefix}&6+{money} Coins (Tempo di Gioco)."); + yml.addDefault(Messages.MONEY_REWARD_WIN, "{prefix}&6+{money} Coins (Vittoria)."); + yml.addDefault(Messages.MONEY_REWARD_PER_TEAMMATE, "{prefix}&6+{money} Coins (Supporto Team)."); + yml.addDefault(Messages.MONEY_REWARD_BED_DESTROYED, "{prefix}&6+{money} Coins (Distruzione letto)."); + yml.addDefault(Messages.MONEY_REWARD_FINAL_KILL, "{prefix}&6+{money} Coins (Uccisione Regolare)."); + yml.addDefault(Messages.MONEY_REWARD_REGULAR_KILL, "{prefix}&6+{money} Coins (Uccisione)."); //shop yml.addDefault(Messages.SHOP_INDEX_NAME, "&8Quick Buy"); - yml.addDefault(Messages.SHOP_QUICK_ADD_NAME, "&8Adding to Quick Buy..."); + yml.addDefault(Messages.SHOP_QUICK_ADD_NAME, "&8Aggiungendo al Quick Buy..."); yml.addDefault(Messages.SHOP_INSUFFICIENT_MONEY, "{prefix}&cNon hai abbastanza {currency}! Te ne occorre {amount} in più!"); yml.addDefault(Messages.SHOP_NEW_PURCHASE, "{prefix}&aHai comprato &6{item}"); yml.addDefault(Messages.SHOP_ALREADY_BOUGHT, "{prefix}&Hai già comprato questo!"); @@ -383,11 +386,11 @@ public Italian() { addCategoryMessages(yml, ConfigPath.SHOP_PATH_CATEGORY_TOOLS, "&8Utensili", "&aUtensili", Collections.singletonList("&eClicca per sfogliare!")); addContentMessages(yml, "shears", ConfigPath.SHOP_PATH_CATEGORY_TOOLS, "{color}Cesoie Permanenti", Arrays.asList("&7Costo: {cost} {currency}", - "", "&7Utile per tagliare la lana.", "&7Rispawnerai sempre con questo utensile.", "", "{quick_buy}", "{buy_status}")); + "", "&7Utile per tagliare la lana.", "&7Respawnerai sempre con questo utensile.", "", "{quick_buy}", "{buy_status}")); addContentMessages(yml, "pickaxe", ConfigPath.SHOP_PATH_CATEGORY_TOOLS, "{color}Piccone {tier}", Arrays.asList("&7Costo: {cost} {currency}", "&7Tier: &e{tier}", - "", "&7Questo è un item upgradabile.", "&7Perderai un tier alla tua morte.", "", "&7Rispawnerai sempre con", "&7questo item avendo almeno", "&7il tier pià basso.", "", "{quick_buy}", "{buy_status}")); + "", "&7Questo è un item upgradabile.", "&7Perderai un tier alla tua morte.", "", "&7Respawnerai sempre con", "&7questo item avendo almeno", "&7il tier pià basso.", "", "{quick_buy}", "{buy_status}")); addContentMessages(yml, "axe", ConfigPath.SHOP_PATH_CATEGORY_TOOLS, "{color}Ascia {tier}", Arrays.asList("&7Costo: {cost} {currency}", "&7Tier: &e{tier}", - "", "&7Questo è un item upgradabile.", "&7Perderai un tier alla tua morte.", "", "&7Rispawnerai sempre con", "&7questo item avendo almeno", "&7il tier pià basso.", "", "{quick_buy}", "{buy_status}")); + "", "&7Questo è un item upgradabile.", "&7Perderai un tier alla tua morte.", "", "&7Respawnerai sempre con", "&7questo item avendo almeno", "&7il tier pià basso.", "", "{quick_buy}", "{buy_status}")); addCategoryMessages(yml, ConfigPath.SHOP_PATH_CATEGORY_RANGED, "&8Ranged", "&aArchi", Collections.singletonList("&eClicca per sfogliare!")); addContentMessages(yml, "arrow", ConfigPath.SHOP_PATH_CATEGORY_RANGED, "{color}Frecce", Arrays.asList("&7Costo: {cost} {currency}", "", "{quick_buy}", "{buy_status}")); @@ -395,7 +398,7 @@ public Italian() { addContentMessages(yml, "bow2", ConfigPath.SHOP_PATH_CATEGORY_RANGED, "{color}Arco (Potenza I)", Arrays.asList("&7Costo: {cost} {currency}", "", "{quick_buy}", "{buy_status}")); addContentMessages(yml, "bow3", ConfigPath.SHOP_PATH_CATEGORY_RANGED, "{color}Arco (Potenza I, Contraccolpo I)", Arrays.asList("&7Costo: {cost} {currency}", "", "{quick_buy}", "{buy_status}")); - addCategoryMessages(yml, ConfigPath.SHOP_PATH_CATEGORY_POTIONS, "&8Pozioni", "&aPotioni", Collections.singletonList("&eClicca per sfogliare!")); + addCategoryMessages(yml, ConfigPath.SHOP_PATH_CATEGORY_POTIONS, "&8Pozioni", "&aPozioni", Collections.singletonList("&eClicca per sfogliare!")); addContentMessages(yml, "speed-potion", ConfigPath.SHOP_PATH_CATEGORY_POTIONS, "{color}Pozione Rapidità II (45 secondi)", Arrays.asList("&7Costo: {cost} {currency}", "", "{quick_buy}", "{buy_status}")); addContentMessages(yml, "jump-potion", ConfigPath.SHOP_PATH_CATEGORY_POTIONS, "{color}Pozione Salto V (45 secondi)", Arrays.asList("&7Costo: {cost} {currency}", "", "{quick_buy}", "{buy_status}")); @@ -432,7 +435,7 @@ public Italian() { yml.addDefault("upgrades.Default.trap.tier1.name", "&eIt's a trap!"); yml.addDefault("upgrades.Default.trap.tier1.lore", Arrays.asList("&7Il prossimo nemico che entrerà", "&7nella tua base riceverà Blindness e", "&7Slowness!", "", "&7Costo:&b {cost} {currency}", "", "{loreFooter}")); yml.addDefault("upgrades.Default.miningFatigue.tier1.name", "&eMiner Fatigue Trap"); - yml.addDefault("upgrades.Default.miningFatigue.tier1.lore", Arrays.asList("&7Il prossimo nemico che entrerà", "&7nella tua base riceverà Mining Fatigue", "&7for 10 seconds!", "", "&7Costo:&b {cost} {currency}", "", "{loreFooter}")); + yml.addDefault("upgrades.Default.miningFatigue.tier1.lore", Arrays.asList("&7Il prossimo nemico che entrerà", "&7nella tua base riceverà Mining Fatigue", "&7per 10 secondi!", "", "&7Costo:&b {cost} {currency}", "", "{loreFooter}")); yml.addDefault("upgrades.Default.healPool.tier1.name", "&eRigenerazione"); yml.addDefault("upgrades.Default.healPool.tier1.lore", Arrays.asList("&7Crea un campo di rigenerazione", "&7intorno alla tua base!", "", "&7Costo:&b {cost} {currency}", "", "{loreFooter}")); yml.addDefault(Messages.UPGRADES_UPGRADE_BOUGHT_CHAT, "&a{player} ha comprato &6{upgradeName}"); @@ -445,10 +448,10 @@ public Italian() { yml.addDefault(Messages.FORMAT_UPGRADE_TIER_LOCKED, "&7"); yml.addDefault(Messages.FORMAT_UPGRADE_TIER_UNLOCKED, "&a"); yml.addDefault(Messages.UPGRADES_LORE_REPLACEMENT_CLICK_TO_BUY, "{color}Click to purchase!"); - yml.addDefault(Messages.UPGRADES_LORE_REPLACEMENT_INSUFFICIENT_MONEY, "{color}You don't have enough {currency}"); + yml.addDefault(Messages.UPGRADES_LORE_REPLACEMENT_INSUFFICIENT_MONEY, "{color}Non hai abbastanza {currency}"); yml.addDefault(Messages.UPGRADES_LORE_REPLACEMENT_LOCKED, "&cLOCKED"); yml.addDefault(Messages.UPGRADES_LORE_REPLACEMENT_UNLOCKED, "{color}UNLOCKED"); - yml.addDefault(Messages.UPGRADES_UPGRADE_BOUGHT_CHAT, "&a{player} purchased &6{upgradeName}"); + yml.addDefault(Messages.UPGRADES_UPGRADE_BOUGHT_CHAT, "&a{player} ha acquisistato &6{upgradeName}"); yml.addDefault(Messages.UPGRADES_UPGRADE_TIER_ITEM_NAME.replace("{name}", "forge").replace("{tier}", "tier-1"), "{color}Iron Forge"); yml.addDefault(Messages.UPGRADES_UPGRADE_TIER_ITEM_LORE.replace("{name}", "forge").replace("{tier}", "tier-1"), Arrays.asList("&7Upgrade resource spawning on", "&7your island.", "", "{tierColor}Tier 1: +50% Resources, &b{cost} {currency}", @@ -545,9 +548,9 @@ public Italian() { yml.addDefault(Messages.UPGRADES_TRAP_DEFAULT_MSG, "&c&l{trap} è stata attivata!"); yml.addDefault(Messages.UPGRADES_TRAP_DEFAULT_TITLE, "&cTRAPPOLA ATTIVATA!"); yml.addDefault(Messages.UPGRADES_TRAP_DEFAULT_SUBTITLE, "&ffLa tua trappola {trap} è stata attivata!"); - yml.addDefault(Messages.UPGRADES_TRAP_CUSTOM_MSG + "3", "&c&lAlarm trap set off by &7&l{player} &c&lfrom {color}&l{team} &c<eam!"); - yml.addDefault(Messages.UPGRADES_TRAP_CUSTOM_TITLE + "3", "&c&lALARM!!!"); - yml.addDefault(Messages.UPGRADES_TRAP_CUSTOM_SUBTITLE + "3", "&fAlarm trap set off by {color}{team} &fteam!"); + yml.addDefault(Messages.UPGRADES_TRAP_CUSTOM_MSG + "3", "&c&lAllarme attivata da &7&l{player} &c&ldel team {color}&l{team} &c&l!"); + yml.addDefault(Messages.UPGRADES_TRAP_CUSTOM_TITLE + "3", "&c&lALLARME!!!"); + yml.addDefault(Messages.UPGRADES_TRAP_CUSTOM_SUBTITLE + "3", "&fAllarme attivata dal team {color}{team}&f!"); save(); setPrefix(m(Messages.PREFIX)); } diff --git a/bedwars-plugin/src/main/java/com/andrei1058/bedwars/language/Persian.java b/bedwars-plugin/src/main/java/com/andrei1058/bedwars/language/Persian.java index adfe03c1a..f0c4e83d4 100644 --- a/bedwars-plugin/src/main/java/com/andrei1058/bedwars/language/Persian.java +++ b/bedwars-plugin/src/main/java/com/andrei1058/bedwars/language/Persian.java @@ -281,6 +281,9 @@ public Persian() { yml.addDefault(Messages.XP_REWARD_PER_MINUTE, "{prefix}&6+{xp} Tajrobe BedWars Daryaft Kardid (Zaman Play)."); yml.addDefault(Messages.XP_REWARD_WIN, "{prefix}&6+{xp} Tajrobe BedWars Daryaft Kardid (Bord Bazi)."); yml.addDefault(Messages.XP_REWARD_PER_TEAMMATE, "{prefix}&6+{xp} Tajrobe BedWars Daryaft Kardid (Hemayat Az Team)."); + yml.addDefault(Messages.XP_REWARD_BED_DESTROY, "{prefix}&6+{xp} Tajrobe BedWars Daryaft Kardid (Az Bein Raftan Bed)."); + yml.addDefault(Messages.XP_REWARD_REGULAR_KILL, "{prefix}&6+{xp} Tajrobe BedWars Daryaft Kardid (Kill e Addi)."); + yml.addDefault(Messages.XP_REWARD_FINAL_KILL, "{prefix}&6+{xp} Tajrobe BedWars Daryaft Kardid (Kill e Payani)."); yml.addDefault(Messages.MONEY_REWARD_PER_MINUTE, "{prefix}&6+{money} Coin (Zaman Play)."); yml.addDefault(Messages.MONEY_REWARD_WIN, "{prefix}&6+{money} Coin (Bord Bazi)."); diff --git a/bedwars-plugin/src/main/java/com/andrei1058/bedwars/language/Polish.java b/bedwars-plugin/src/main/java/com/andrei1058/bedwars/language/Polish.java index 58573ce26..59aa2edcd 100644 --- a/bedwars-plugin/src/main/java/com/andrei1058/bedwars/language/Polish.java +++ b/bedwars-plugin/src/main/java/com/andrei1058/bedwars/language/Polish.java @@ -306,6 +306,9 @@ public Polish() { yml.addDefault(Messages.XP_REWARD_PER_MINUTE, "{prefix}&6+{xp} Otrzymano doswiedczenie BedWars (Czas grania)."); yml.addDefault(Messages.XP_REWARD_WIN, "{prefix}&6+{xp} Otrzymano doswiedczenie BedWars (Wygrana gra)."); yml.addDefault(Messages.XP_REWARD_PER_TEAMMATE, "{prefix}&6+{xp} Otrzymano doswiedczenie BedWars (Team Support)."); + yml.addDefault(Messages.XP_REWARD_BED_DESTROY, "{prefix}&6+{xp} Otrzymano doswiedczenie BedWars (Zniszczone lozko)."); + yml.addDefault(Messages.XP_REWARD_REGULAR_KILL, "{prefix}&6+{xp} Otrzymano doswiedczenie BedWars (Regularne zabojstwo)."); + yml.addDefault(Messages.XP_REWARD_FINAL_KILL, "{prefix}&6+{xp} Otrzymano doswiedczenie BedWars (Finalne zabojstwo)."); yml.addDefault(Messages.MONEY_REWARD_PER_MINUTE, "{prefix}&6+{money} Monety (Czas grania)."); yml.addDefault(Messages.MONEY_REWARD_WIN, "{prefix}&6+{money} Monety (Wygrana gra)."); diff --git a/bedwars-plugin/src/main/java/com/andrei1058/bedwars/language/Portuguese.java b/bedwars-plugin/src/main/java/com/andrei1058/bedwars/language/Portuguese.java index 4f696af1b..8e3f74a8e 100644 --- a/bedwars-plugin/src/main/java/com/andrei1058/bedwars/language/Portuguese.java +++ b/bedwars-plugin/src/main/java/com/andrei1058/bedwars/language/Portuguese.java @@ -279,6 +279,9 @@ public Portuguese() { yml.addDefault(Messages.XP_REWARD_PER_MINUTE, "{prefix}&6+{xp} BedWars Experience Received (Tempo de jogo)."); yml.addDefault(Messages.XP_REWARD_WIN, "{prefix}&6+{xp} BedWars Experience Received (Vencer o jogo)."); yml.addDefault(Messages.XP_REWARD_PER_TEAMMATE, "{prefix}&6+{xp} BedWars Experience Received (Suporte da equipe)."); + yml.addDefault(Messages.XP_REWARD_BED_DESTROY, "{prefix}&6+{xp} BedWars Experience Received (Bed Destroyed)."); + yml.addDefault(Messages.XP_REWARD_REGULAR_KILL, "{prefix}&6+{xp} BedWars Experience Received (Regular Kill)."); + yml.addDefault(Messages.XP_REWARD_FINAL_KILL, "{prefix}&6+{xp} BedWars Experience Received (Final Kill)."); yml.addDefault(Messages.MONEY_REWARD_PER_MINUTE, "{prefix}&6+{money} Moedas (Tempo de jogo)."); yml.addDefault(Messages.MONEY_REWARD_WIN, "{prefix}&6+{money} Moedas (Vencer o jogo)."); diff --git a/bedwars-plugin/src/main/java/com/andrei1058/bedwars/language/Romanian.java b/bedwars-plugin/src/main/java/com/andrei1058/bedwars/language/Romanian.java index c21e06c71..96d3536aa 100644 --- a/bedwars-plugin/src/main/java/com/andrei1058/bedwars/language/Romanian.java +++ b/bedwars-plugin/src/main/java/com/andrei1058/bedwars/language/Romanian.java @@ -326,6 +326,9 @@ public Romanian() { yml.addDefault(Messages.XP_REWARD_PER_MINUTE, "{prefix}&6+{xp} BedWars Experience Received (Play Time)."); yml.addDefault(Messages.XP_REWARD_WIN, "{prefix}&6+{xp} BedWars Experience Received (Game Win)."); yml.addDefault(Messages.XP_REWARD_PER_TEAMMATE, "{prefix}&6+{xp} BedWars Experience Received (Team Support)."); + yml.addDefault(Messages.XP_REWARD_BED_DESTROY, "{prefix}&6+{xp} BedWars Experience Received (Bed Destroyed)."); + yml.addDefault(Messages.XP_REWARD_REGULAR_KILL, "{prefix}&6+{xp} BedWars Experience Received (Regular Kill)."); + yml.addDefault(Messages.XP_REWARD_FINAL_KILL, "{prefix}&6+{xp} BedWars Experience Received (Final Kill)."); yml.addDefault(Messages.MONEY_REWARD_PER_MINUTE, "{prefix}&6+{money} Coins (Play Time)."); yml.addDefault(Messages.MONEY_REWARD_WIN, "{prefix}&6+{money} Coins (Game Win)."); diff --git a/bedwars-plugin/src/main/java/com/andrei1058/bedwars/language/Russian.java b/bedwars-plugin/src/main/java/com/andrei1058/bedwars/language/Russian.java index c59d1310c..2e3938997 100644 --- a/bedwars-plugin/src/main/java/com/andrei1058/bedwars/language/Russian.java +++ b/bedwars-plugin/src/main/java/com/andrei1058/bedwars/language/Russian.java @@ -203,6 +203,9 @@ public Russian() { yml.addDefault(Messages.XP_REWARD_PER_MINUTE, "{prefix}&6+{xp} BedWars Experience получено (Игровое время)."); yml.addDefault(Messages.XP_REWARD_WIN, "{prefix}&6+{xp} BedWars Experience получено (Победа в игре)."); yml.addDefault(Messages.XP_REWARD_PER_TEAMMATE, "{prefix}&6+{xp} BedWars Experience получено (Поддержка команды)."); + yml.addDefault(Messages.XP_REWARD_BED_DESTROY, "{prefix}&6+{xp} BedWars Experience получено (Разрушение кровати)."); + yml.addDefault(Messages.XP_REWARD_REGULAR_KILL, "{prefix}&6+{xp} BedWars Experience получено (Убийство)."); + yml.addDefault(Messages.XP_REWARD_FINAL_KILL, "{prefix}&6+{xp} BedWars Experience получено (Финальное убийство)."); yml.addDefault(Messages.MONEY_REWARD_PER_MINUTE, "{prefix}&6+{money} Монет (Игровое время)."); yml.addDefault(Messages.MONEY_REWARD_WIN, "{prefix}&6+{money} Монет (Победа в игре)."); diff --git a/bedwars-plugin/src/main/java/com/andrei1058/bedwars/language/Spanish.java b/bedwars-plugin/src/main/java/com/andrei1058/bedwars/language/Spanish.java index 547a4ffcf..32076fe82 100644 --- a/bedwars-plugin/src/main/java/com/andrei1058/bedwars/language/Spanish.java +++ b/bedwars-plugin/src/main/java/com/andrei1058/bedwars/language/Spanish.java @@ -334,6 +334,9 @@ public Spanish() { yml.addDefault(Messages.XP_REWARD_PER_MINUTE, "{prefix}&6+{xp} Experiencia de BedWars recibida (Tiempo de juego)."); yml.addDefault(Messages.XP_REWARD_WIN, "{prefix}&6+{xp} Experiencia de BedWars recibida (Ganar partida)."); yml.addDefault(Messages.XP_REWARD_PER_TEAMMATE, "{prefix}&6+{xp} Experiencia de BedWars recibida (Apoyo de equipo)."); + yml.addDefault(Messages.XP_REWARD_BED_DESTROY, "{prefix}&6+{xp} Experiencia de BedWars recibida (Cama Destruida)."); + yml.addDefault(Messages.XP_REWARD_REGULAR_KILL, "{prefix}&6+{xp} Experiencia de BedWars recibida (Asesinato)."); + yml.addDefault(Messages.XP_REWARD_FINAL_KILL, "{prefix}&6+{xp} Experiencia de BedWars recibida (Asesinato Final)."); yml.addDefault(Messages.MONEY_REWARD_PER_MINUTE, "{prefix}&6+{money} Monedas (Tiempo de Juego)."); yml.addDefault(Messages.MONEY_REWARD_WIN, "{prefix}&6+{money} Monedas (Ganar Partida)."); diff --git a/bedwars-plugin/src/main/java/com/andrei1058/bedwars/language/Turkish.java b/bedwars-plugin/src/main/java/com/andrei1058/bedwars/language/Turkish.java index 24f7bda00..b21cc1bea 100644 --- a/bedwars-plugin/src/main/java/com/andrei1058/bedwars/language/Turkish.java +++ b/bedwars-plugin/src/main/java/com/andrei1058/bedwars/language/Turkish.java @@ -281,6 +281,9 @@ public Turkish() { yml.addDefault(Messages.XP_REWARD_PER_MINUTE, "{prefix}&6+{xp} BedWars puanı kazanıldı (Oynama Süresi)"); yml.addDefault(Messages.XP_REWARD_WIN, "{prefix}&6+{xp} BBedWars puanı kazanıldı (Galibiyet)"); yml.addDefault(Messages.XP_REWARD_PER_TEAMMATE, "{prefix}&6+{xp} BedWars puanı kazanıldı (Takım Yardımı)"); + yml.addDefault(Messages.XP_REWARD_BED_DESTROY, "{prefix}&6+{xp} BedWars puanı kazanıldı (Yatak Kırma)"); + yml.addDefault(Messages.XP_REWARD_REGULAR_KILL, "{prefix}&6+{xp} BedWars puanı kazanıldı (Öldürme)"); + yml.addDefault(Messages.XP_REWARD_FINAL_KILL, "{prefix}&6+{xp} BedWars puanı kazanıldı (Final Kill)"); yml.addDefault(Messages.MONEY_REWARD_PER_MINUTE, "{prefix}&6+{money} Para (Oynama Süresi)"); yml.addDefault(Messages.MONEY_REWARD_WIN, "{prefix}&6+{money} Para (Galibiyet)"); diff --git a/bedwars-plugin/src/main/java/com/andrei1058/bedwars/levels/internal/LevelListeners.java b/bedwars-plugin/src/main/java/com/andrei1058/bedwars/levels/internal/LevelListeners.java index 422ad6acc..53391b1e9 100644 --- a/bedwars-plugin/src/main/java/com/andrei1058/bedwars/levels/internal/LevelListeners.java +++ b/bedwars-plugin/src/main/java/com/andrei1058/bedwars/levels/internal/LevelListeners.java @@ -23,6 +23,8 @@ import com.andrei1058.bedwars.BedWars; import com.andrei1058.bedwars.api.arena.team.ITeam; import com.andrei1058.bedwars.api.events.gameplay.GameEndEvent; +import com.andrei1058.bedwars.api.events.player.PlayerBedBreakEvent; +import com.andrei1058.bedwars.api.events.player.PlayerKillEvent; import com.andrei1058.bedwars.api.events.player.PlayerLeaveArenaEvent; import com.andrei1058.bedwars.api.events.player.PlayerXpGainEvent; import com.andrei1058.bedwars.api.language.Language; @@ -124,4 +126,39 @@ public void onArenaLeave(PlayerLeaveArenaEvent e) { if (pl != null) pl.updateDatabase(); }); } + + @EventHandler + public void onBreakBed(PlayerBedBreakEvent e) { + Player player = e.getPlayer (); + if (player == null) { + return; + } + int beddestroy = LevelsConfig.levels.getInt("xp-rewards.bed-destroyed"); + if (beddestroy > 0) { + PlayerLevel.getLevelByPlayer(player.getUniqueId()).addXp(beddestroy, PlayerXpGainEvent.XpSource.BED_DESTROYED); + player.sendMessage(Language.getMsg(player, Messages.XP_REWARD_BED_DESTROY).replace("{xp}", String.valueOf(beddestroy))); + } + } + + @EventHandler + public void onKill(PlayerKillEvent e) { + Player player = e.getKiller (); + Player victim = e.getVictim (); + if (player == null || victim.equals(player)) { + return; + } + int finalkill = LevelsConfig.levels.getInt("xp-rewards.final-kill"); + int regularkill = LevelsConfig.levels.getInt("xp-rewards.regular-kill"); + if (e.getCause ().isFinalKill ()) { + if (finalkill > 0) { + PlayerLevel.getLevelByPlayer(player.getUniqueId()).addXp(finalkill, PlayerXpGainEvent.XpSource.FINAL_KILL); + player.sendMessage(Language.getMsg(player, Messages.XP_REWARD_FINAL_KILL).replace("{xp}", String.valueOf(finalkill))); + } + } else { + if (regularkill > 0) { + PlayerLevel.getLevelByPlayer(player.getUniqueId()).addXp(regularkill, PlayerXpGainEvent.XpSource.REGULAR_KILL); + player.sendMessage(Language.getMsg(player, Messages.XP_REWARD_REGULAR_KILL).replace("{xp}", String.valueOf(regularkill))); + } + } + } }