updates
This commit is contained in:
parent
b0209dcd12
commit
e64c943506
@ -42,6 +42,7 @@ import land.battle.practice.util.CC;
|
|||||||
import land.battle.practice.util.timer.TimerManager;
|
import land.battle.practice.util.timer.TimerManager;
|
||||||
import land.battle.practice.util.timer.impl.EnderpearlTimer;
|
import land.battle.practice.util.timer.impl.EnderpearlTimer;
|
||||||
import land.battle.practice.vote.VoteManager;
|
import land.battle.practice.vote.VoteManager;
|
||||||
|
import land.battle.practice.vote.commands.RateCommand;
|
||||||
import lombok.Getter;
|
import lombok.Getter;
|
||||||
import lombok.Setter;
|
import lombok.Setter;
|
||||||
import me.lucko.helper.Commands;
|
import me.lucko.helper.Commands;
|
||||||
@ -271,7 +272,8 @@ public class Practice extends ExtendedJavaPlugin {
|
|||||||
new FollowCommand(),
|
new FollowCommand(),
|
||||||
new TournamentCommand(),
|
new TournamentCommand(),
|
||||||
new ServerSettingsCommand(),
|
new ServerSettingsCommand(),
|
||||||
new SetSpawnCommand()
|
new SetSpawnCommand(),
|
||||||
|
new RateCommand()
|
||||||
).forEach(acfCommandProcessor::registerCommand);
|
).forEach(acfCommandProcessor::registerCommand);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -119,7 +119,7 @@ public class PlayerListener implements Listener {
|
|||||||
this.plugin.getPlayerManager().createPlayerData(event);
|
this.plugin.getPlayerManager().createPlayerData(event);
|
||||||
}
|
}
|
||||||
|
|
||||||
private final String centeredTitle = StringUtil.getCentered(CC.GOLD + CC.BOLD + "NA Practice");
|
private final String centeredTitle = StringUtil.getCentered(CC.GOLD + CC.BOLD + "Practice");
|
||||||
private final String centeredSubTitle = StringUtil.getCentered(CC.GRAY + "Click one of the swords to start fighting!");
|
private final String centeredSubTitle = StringUtil.getCentered(CC.GRAY + "Click one of the swords to start fighting!");
|
||||||
|
|
||||||
@EventHandler
|
@EventHandler
|
||||||
|
@ -34,8 +34,8 @@ public class ItemManager {
|
|||||||
public ItemManager() {
|
public ItemManager() {
|
||||||
this.spawnItems =
|
this.spawnItems =
|
||||||
new ItemStack[] {
|
new ItemStack[] {
|
||||||
ItemUtil.createItem(Material.IRON_SWORD, CC.GOLD + "Join Unranked Matchmaking" + CC.GRAY + " (Right Click)"),
|
ItemUtil.createItem(Material.IRON_SWORD, CC.GOLD + "Play Unranked" + CC.GRAY + " (Right Click)"),
|
||||||
ItemUtil.createItem(Material.DIAMOND_SWORD, CC.GOLD + "Join Ranked Matchmaking" + CC.GRAY + " (Right Click)"),
|
ItemUtil.createItem(Material.DIAMOND_SWORD, CC.GOLD + "Play Ranked" + CC.GRAY + " (Right Click)"),
|
||||||
ItemUtil.createItem(Material.NETHER_STAR, CC.GOLD + "Create a Party" + CC.GRAY + " (Right Click)"),
|
ItemUtil.createItem(Material.NETHER_STAR, CC.GOLD + "Create a Party" + CC.GRAY + " (Right Click)"),
|
||||||
null,
|
null,
|
||||||
ItemUtil.createItem(Material.GOLD_INGOT, CC.GOLD + "Shop" + CC.GRAY + " (Right Click)"),
|
ItemUtil.createItem(Material.GOLD_INGOT, CC.GOLD + "Shop" + CC.GRAY + " (Right Click)"),
|
||||||
@ -45,8 +45,8 @@ public class ItemManager {
|
|||||||
ItemUtil.createItem(Material.REDSTONE_COMPARATOR, CC.GOLD + "Settings" + CC.GRAY + " (Right Click)")
|
ItemUtil.createItem(Material.REDSTONE_COMPARATOR, CC.GOLD + "Settings" + CC.GRAY + " (Right Click)")
|
||||||
};
|
};
|
||||||
this.holandaItems = new ItemStack[] {
|
this.holandaItems = new ItemStack[] {
|
||||||
ItemUtil.createItem(Material.IRON_SWORD, CC.GOLD + "Join Unranked Matchmaking" + CC.GRAY + " (Right Click)"),
|
ItemUtil.createItem(Material.IRON_SWORD, CC.GOLD + "Play Unranked" + CC.GRAY + " (Right Click)"),
|
||||||
ItemUtil.createItem(Material.DIAMOND_SWORD, CC.GOLD + "Join Ranked Matchmaking" + CC.GRAY + " (Right Click)"),
|
ItemUtil.createItem(Material.DIAMOND_SWORD, CC.GOLD + "Play Ranked" + CC.GRAY + " (Right Click)"),
|
||||||
null,
|
null,
|
||||||
null,
|
null,
|
||||||
ItemUtil.createItem(Material.NETHER_STAR, CC.GOLD + "Create a Party" + CC.GRAY + " (Right Click)"),
|
ItemUtil.createItem(Material.NETHER_STAR, CC.GOLD + "Create a Party" + CC.GRAY + " (Right Click)"),
|
||||||
|
@ -271,13 +271,10 @@ public class MatchManager {
|
|||||||
|
|
||||||
playerData.setPlayerState(PlayerState.SPECTATING);
|
playerData.setPlayerState(PlayerState.SPECTATING);
|
||||||
|
|
||||||
PlayerUtil.clearPlayer(player);
|
|
||||||
|
|
||||||
final CraftPlayer playerCp = (CraftPlayer) player;
|
final CraftPlayer playerCp = (CraftPlayer) player;
|
||||||
final EntityPlayer playerEp = playerCp.getHandle();
|
final EntityPlayer playerEp = playerCp.getHandle();
|
||||||
|
|
||||||
playerEp.getDataWatcher().watch(6, 0.0F);
|
playerEp.getDataWatcher().watch(6, 0.0F);
|
||||||
player.setFireTicks(0);
|
|
||||||
|
|
||||||
match.addRunnable(this.plugin.getServer().getScheduler().scheduleSyncDelayedTask(this.plugin, () -> {
|
match.addRunnable(this.plugin.getServer().getScheduler().scheduleSyncDelayedTask(this.plugin, () -> {
|
||||||
match.getTeams().forEach(team -> team.streamAlivePlayers().forEach(member -> Practice.getInstance().getEntityHider().hideEntity(member, player)));
|
match.getTeams().forEach(team -> team.streamAlivePlayers().forEach(member -> Practice.getInstance().getEntityHider().hideEntity(member, player)));
|
||||||
@ -286,6 +283,7 @@ public class MatchManager {
|
|||||||
player.getActivePotionEffects().stream().map(PotionEffect::getType).forEach(player::removePotionEffect);
|
player.getActivePotionEffects().stream().map(PotionEffect::getType).forEach(player::removePotionEffect);
|
||||||
player.setWalkSpeed(0.2F);
|
player.setWalkSpeed(0.2F);
|
||||||
player.setAllowFlight(true);
|
player.setAllowFlight(true);
|
||||||
|
for (int i = 0; i < 5; i++) PlayerUtil.clearPlayer(player);
|
||||||
}, 20L));
|
}, 20L));
|
||||||
|
|
||||||
if (match.isRedRover()) {
|
if (match.isRedRover()) {
|
||||||
@ -313,6 +311,7 @@ public class MatchManager {
|
|||||||
|
|
||||||
public void addSpectator(Player player, PlayerData playerData, Player target, Match targetMatch) {
|
public void addSpectator(Player player, PlayerData playerData, Player target, Match targetMatch) {
|
||||||
this.spectators.put(player.getUniqueId(), targetMatch.getMatchId());
|
this.spectators.put(player.getUniqueId(), targetMatch.getMatchId());
|
||||||
|
for (int i = 0; i < 5; i++) PlayerUtil.clearPlayer(player);
|
||||||
|
|
||||||
if (targetMatch.getMatchState() != MatchState.ENDING) {
|
if (targetMatch.getMatchState() != MatchState.ENDING) {
|
||||||
if (!targetMatch.haveSpectated(player.getUniqueId())) {
|
if (!targetMatch.haveSpectated(player.getUniqueId())) {
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
package land.battle.practice.match.snapshot;
|
package land.battle.practice.match.snapshot;
|
||||||
|
|
||||||
|
import com.cryptomorin.xseries.XMaterial;
|
||||||
import com.solexgames.core.util.Color;
|
import com.solexgames.core.util.Color;
|
||||||
import com.solexgames.core.util.PlayerUtil;
|
import com.solexgames.core.util.PlayerUtil;
|
||||||
import com.solexgames.core.util.builder.ItemBuilder;
|
import com.solexgames.core.util.builder.ItemBuilder;
|
||||||
@ -67,8 +68,9 @@ public class InventorySnapshot extends Menu {
|
|||||||
this.food = player.getFoodLevel();
|
this.food = player.getFoodLevel();
|
||||||
|
|
||||||
final List<String> potionEffectStrings = new ArrayList<>();
|
final List<String> potionEffectStrings = new ArrayList<>();
|
||||||
|
if (player.getActivePotionEffects().isEmpty()) {
|
||||||
for (PotionEffect potionEffect : player.getActivePotionEffects()) {
|
potionEffectStrings.add(CC.translate("&cNone"));
|
||||||
|
} else for (PotionEffect potionEffect : player.getActivePotionEffects()) {
|
||||||
final String romanNumeral = MathUtil.convertToRomanNumeral(potionEffect.getAmplifier() + 1);
|
final String romanNumeral = MathUtil.convertToRomanNumeral(potionEffect.getAmplifier() + 1);
|
||||||
final String effectName = StringUtil.toNiceString(potionEffect.getType().getName().toLowerCase());
|
final String effectName = StringUtil.toNiceString(potionEffect.getType().getName().toLowerCase());
|
||||||
final String duration = MathUtil.convertTicksToMinutes(potionEffect.getDuration());
|
final String duration = MathUtil.convertTicksToMinutes(potionEffect.getDuration());
|
||||||
@ -104,7 +106,7 @@ public class InventorySnapshot extends Menu {
|
|||||||
this.potCount = (int) Arrays.stream(contents).filter(Objects::nonNull).map(ItemStack::getDurability).filter(d -> d == 16421).count();
|
this.potCount = (int) Arrays.stream(contents).filter(Objects::nonNull).map(ItemStack::getDurability).filter(d -> d == 16421).count();
|
||||||
|
|
||||||
this.buttonMap.put(49, new ItemBuilder(Material.POTION)
|
this.buttonMap.put(49, new ItemBuilder(Material.POTION)
|
||||||
.setDisplayName(CC.AQUA + "Potion Statistics")
|
.setDisplayName(CC.GOLD + "Potion Statistics")
|
||||||
.setDurability(16421)
|
.setDurability(16421)
|
||||||
.setAmount(this.potCount)
|
.setAmount(this.potCount)
|
||||||
.addLore(
|
.addLore(
|
||||||
@ -126,7 +128,7 @@ public class InventorySnapshot extends Menu {
|
|||||||
final double roundedHealth = Math.round(health / 2.0 * 2.0) / 2.0;
|
final double roundedHealth = Math.round(health / 2.0 * 2.0) / 2.0;
|
||||||
|
|
||||||
this.buttonMap.put(47, new ItemBuilder(Material.SPECKLED_MELON)
|
this.buttonMap.put(47, new ItemBuilder(Material.SPECKLED_MELON)
|
||||||
.setDisplayName(CC.GRAY + "Health: " + CC.AQUA + roundedHealth)
|
.setDisplayName(CC.GRAY + "Health: " + CC.GOLD + roundedHealth)
|
||||||
.setAmount((int) roundedHealth)
|
.setAmount((int) roundedHealth)
|
||||||
.toButton()
|
.toButton()
|
||||||
);
|
);
|
||||||
@ -134,7 +136,7 @@ public class InventorySnapshot extends Menu {
|
|||||||
final double roundedFood = Math.round(health / 2.0 * 2.0) / 2.0;
|
final double roundedFood = Math.round(health / 2.0 * 2.0) / 2.0;
|
||||||
|
|
||||||
this.buttonMap.put(48, new ItemBuilder(Material.COOKED_BEEF)
|
this.buttonMap.put(48, new ItemBuilder(Material.COOKED_BEEF)
|
||||||
.setDisplayName(CC.GRAY + "Hunger: " + CC.AQUA + roundedFood)
|
.setDisplayName(CC.GRAY + "Hunger: " + CC.GOLD + roundedFood)
|
||||||
.setAmount((int) roundedFood)
|
.setAmount((int) roundedFood)
|
||||||
.toButton()
|
.toButton()
|
||||||
);
|
);
|
||||||
@ -144,8 +146,14 @@ public class InventorySnapshot extends Menu {
|
|||||||
|
|
||||||
final int ping = PlayerUtil.getPing(player);
|
final int ping = PlayerUtil.getPing(player);
|
||||||
|
|
||||||
this.buttonMap.put(50, new ItemBuilder(Material.PAPER)
|
this.buttonMap.put(50, new ItemBuilder(Material.BREWING_STAND_ITEM)
|
||||||
.setDisplayName(CC.AQUA + "Match Statistics")
|
.setDisplayName(CC.GOLD + "Potion Effects")
|
||||||
|
.addLore(potionEffectStrings)
|
||||||
|
.toButton()
|
||||||
|
);
|
||||||
|
|
||||||
|
this.buttonMap.put(51, new ItemBuilder(Material.PAPER)
|
||||||
|
.setDisplayName(CC.GOLD + "Match Statistics")
|
||||||
.addLore(
|
.addLore(
|
||||||
CC.GRAY + "Longest Combo: " + CC.WHITE + playerData.getLongestCombo() + " hit" + (playerData.getLongestCombo() > 1 ? "s" : ""),
|
CC.GRAY + "Longest Combo: " + CC.WHITE + playerData.getLongestCombo() + " hit" + (playerData.getLongestCombo() > 1 ? "s" : ""),
|
||||||
CC.GRAY + "Total Hits: " + CC.WHITE + playerData.getHits() + " hit" + (playerData.getHits() > 1 ? "s" : ""),
|
CC.GRAY + "Total Hits: " + CC.WHITE + playerData.getHits() + " hit" + (playerData.getHits() > 1 ? "s" : ""),
|
||||||
@ -155,6 +163,8 @@ public class InventorySnapshot extends Menu {
|
|||||||
)
|
)
|
||||||
.toButton()
|
.toButton()
|
||||||
);
|
);
|
||||||
|
buttonMap.put(52, (new ItemBuilder(XMaterial.GRAY_STAINED_GLASS_PANE.parseMaterial())).setDurability(15).setDisplayName(" ").toButton());
|
||||||
|
buttonMap.put(46, (new ItemBuilder(XMaterial.GRAY_STAINED_GLASS_PANE.parseMaterial())).setDurability(15).setDisplayName(" ").toButton());
|
||||||
|
|
||||||
if (!match.isParty()) {
|
if (!match.isParty()) {
|
||||||
for (int i = 0; i < 2; i++) {
|
for (int i = 0; i < 2; i++) {
|
||||||
|
@ -91,8 +91,13 @@ public class JoinQueueMenu extends Menu {
|
|||||||
lore.add("&7In Queue: &f" + getQueued(queue));
|
lore.add("&7In Queue: &f" + getQueued(queue));
|
||||||
lore.add("&7In Fights: &f" + getFighting(queue));
|
lore.add("&7In Fights: &f" + getFighting(queue));
|
||||||
lore.add(" ");
|
lore.add(" ");
|
||||||
|
if (queueType == QueueType.UNRANKED) {
|
||||||
lore.add("&6&lDaily Winstreaks:");
|
lore.add("&6&lDaily Winstreaks:");
|
||||||
lore.addAll(LeaderboardUpdateRunnable.KIT_SPECIFIC_WIN_STREAK_LORE_SHORT.getOrDefault(this.queue, Collections.emptyList()));
|
lore.addAll(LeaderboardUpdateRunnable.KIT_SPECIFIC_WIN_STREAK_LORE_SHORT.getOrDefault(this.queue, Collections.emptyList()));
|
||||||
|
} else if (queueType == QueueType.RANKED) {
|
||||||
|
lore.add("&6&lTop ELO:");
|
||||||
|
lore.addAll(LeaderboardUpdateRunnable.KIT_SPECIFIC_LEADERBOARD_LORE_SHORT.getOrDefault(this.queue, Collections.emptyList()));
|
||||||
|
}
|
||||||
lore.add(" ");
|
lore.add(" ");
|
||||||
lore.add(CC.YELLOW + "[Click to join queue]");
|
lore.add(CC.YELLOW + "[Click to join queue]");
|
||||||
|
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
package land.battle.practice.message.impl;
|
package land.battle.practice.message.impl;
|
||||||
|
|
||||||
|
import land.battle.practice.Practice;
|
||||||
import land.battle.practice.message.KillMessage;
|
import land.battle.practice.message.KillMessage;
|
||||||
import land.battle.practice.util.CC;
|
import land.battle.practice.util.CC;
|
||||||
import org.bukkit.entity.Player;
|
import org.bukkit.entity.Player;
|
||||||
@ -23,11 +24,19 @@ public class DefaultDeathMessage implements KillMessage {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String getFormatted(Player player, Player other, boolean otherPlayerExists) {
|
public String getFormatted(Player player, Player other, boolean otherPlayerExists) {
|
||||||
|
if (!Practice.getInstance().isHolanda()) {
|
||||||
if (!otherPlayerExists) {
|
if (!otherPlayerExists) {
|
||||||
return CC.RED + player.getName() + CC.GRAY + " foi morto.";
|
return CC.RED + player.getName() + CC.GRAY + " foi morto.";
|
||||||
}
|
}
|
||||||
|
|
||||||
return CC.RED + player.getName() + CC.GRAY + " foi morto por " + CC.GREEN + other.getName() + CC.GRAY + ".";
|
return CC.RED + player.getName() + CC.GRAY + " foi morto por " + CC.GREEN + other.getName() + CC.GRAY + ".";
|
||||||
|
} else {
|
||||||
|
if (!otherPlayerExists) {
|
||||||
|
return CC.RED + player.getName() + CC.GRAY + " died.";
|
||||||
|
}
|
||||||
|
|
||||||
|
return CC.RED + player.getName() + CC.GRAY + " was killed by " + CC.GREEN + other.getName() + CC.GRAY + ".";
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
package land.battle.practice.message.impl;
|
package land.battle.practice.message.impl;
|
||||||
|
|
||||||
|
import land.battle.practice.Practice;
|
||||||
import land.battle.practice.message.KillMessage;
|
import land.battle.practice.message.KillMessage;
|
||||||
import land.battle.practice.util.CC;
|
import land.battle.practice.util.CC;
|
||||||
import org.bukkit.entity.Player;
|
import org.bukkit.entity.Player;
|
||||||
@ -24,26 +25,40 @@ public class GamerKillMessages implements KillMessage {
|
|||||||
public String getFormatted(Player player, Player other, boolean otherPlayerExists) {
|
public String getFormatted(Player player, Player other, boolean otherPlayerExists) {
|
||||||
final String randomMessage = CC.YELLOW + this.getMessages().get(ThreadLocalRandom.current().nextInt(this.getMessages().size())) + CC.GRAY;
|
final String randomMessage = CC.YELLOW + this.getMessages().get(ThreadLocalRandom.current().nextInt(this.getMessages().size())) + CC.GRAY;
|
||||||
|
|
||||||
|
if (!Practice.getInstance().isHolanda()) {
|
||||||
if (!otherPlayerExists) {
|
if (!otherPlayerExists) {
|
||||||
return CC.RED + player.getName() + CC.GRAY + " foi " + randomMessage + ".";
|
return CC.RED + player.getName() + CC.GRAY + " foi " + randomMessage + ".";
|
||||||
}
|
}
|
||||||
|
|
||||||
return CC.RED + player.getName() + CC.GRAY + " foi " + randomMessage + " por " + CC.GREEN + other.getName() + CC.GRAY + ".";
|
return CC.RED + player.getName() + CC.GRAY + " foi " + randomMessage + " por " + CC.GREEN + other.getName() + CC.GRAY + ".";
|
||||||
|
} else {
|
||||||
|
if (!otherPlayerExists) {
|
||||||
|
return CC.RED + player.getName() + CC.GRAY + " was " + randomMessage + ".";
|
||||||
|
}
|
||||||
|
|
||||||
|
return CC.RED + player.getName() + CC.GRAY + " was " + randomMessage + " by " + CC.GREEN + other.getName() + CC.GRAY + ".";
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public List<String> getMessages() {
|
public List<String> getMessages() {
|
||||||
return Arrays.asList(
|
return !Practice.getInstance().isHolanda() ? Arrays.asList(
|
||||||
"destruido", "enrolado",
|
"destruido", "enrolado",
|
||||||
"enfiado em um armario", "espancado"
|
"enfiado em um armario", "espancado"
|
||||||
|
) : Arrays.asList(
|
||||||
|
"destroyed", "rolled",
|
||||||
|
"shoved into a locker", "clapped"
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public List<String> getDescription() {
|
public List<String> getDescription() {
|
||||||
return Arrays.asList(
|
return !Practice.getInstance().isHolanda() ? Arrays.asList(
|
||||||
CC.GRAY + "Irrite seus oponentes",
|
CC.GRAY + "Irrite seus oponentes",
|
||||||
CC.GRAY + "usando frases levemente toxicas."
|
CC.GRAY + "usando frases levemente toxicas."
|
||||||
|
) : Arrays.asList(
|
||||||
|
CC.GRAY + "Trigger your opponents",
|
||||||
|
CC.GRAY + "using slightly toxic phrases."
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
package land.battle.practice.message.impl;
|
package land.battle.practice.message.impl;
|
||||||
|
|
||||||
|
import land.battle.practice.Practice;
|
||||||
import land.battle.practice.message.KillMessage;
|
import land.battle.practice.message.KillMessage;
|
||||||
import land.battle.practice.util.CC;
|
import land.battle.practice.util.CC;
|
||||||
import org.bukkit.entity.Player;
|
import org.bukkit.entity.Player;
|
||||||
@ -24,26 +25,40 @@ public class KitchenKillMessages implements KillMessage {
|
|||||||
public String getFormatted(Player player, Player other, boolean otherPlayerExists) {
|
public String getFormatted(Player player, Player other, boolean otherPlayerExists) {
|
||||||
final String randomMessage = CC.YELLOW + this.getMessages().get(ThreadLocalRandom.current().nextInt(this.getMessages().size())) + CC.GRAY;
|
final String randomMessage = CC.YELLOW + this.getMessages().get(ThreadLocalRandom.current().nextInt(this.getMessages().size())) + CC.GRAY;
|
||||||
|
|
||||||
|
if (!Practice.getInstance().isHolanda()) {
|
||||||
if (!otherPlayerExists) {
|
if (!otherPlayerExists) {
|
||||||
return CC.RED + player.getName() + CC.GRAY + " foi " + randomMessage + ".";
|
return CC.RED + player.getName() + CC.GRAY + " foi " + randomMessage + ".";
|
||||||
}
|
}
|
||||||
|
|
||||||
return CC.RED + player.getName() + CC.GRAY + " foi " + randomMessage + " por " + CC.GREEN + other.getName() + CC.GRAY + ".";
|
return CC.RED + player.getName() + CC.GRAY + " foi " + randomMessage + " por " + CC.GREEN + other.getName() + CC.GRAY + ".";
|
||||||
|
} else {
|
||||||
|
if (!otherPlayerExists) {
|
||||||
|
return CC.RED + player.getName() + CC.GRAY + " was " + randomMessage + ".";
|
||||||
|
}
|
||||||
|
|
||||||
|
return CC.RED + player.getName() + CC.GRAY + " was " + randomMessage + " by " + CC.GREEN + other.getName() + CC.GRAY + ".";
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public List<String> getMessages() {
|
public List<String> getMessages() {
|
||||||
return Arrays.asList(
|
return !Practice.getInstance().isHolanda() ? Arrays.asList(
|
||||||
"assado lentamente", "marinado",
|
"assado lentamente", "marinado",
|
||||||
"cozido no vapor", "frito"
|
"cozido no vapor", "frito"
|
||||||
|
) : Arrays.asList(
|
||||||
|
"slow roasted", "marinated",
|
||||||
|
"steamed", "deep fried"
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public List<String> getDescription() {
|
public List<String> getDescription() {
|
||||||
return Arrays.asList(
|
return !Practice.getInstance().isHolanda() ? Arrays.asList(
|
||||||
CC.GRAY + "frases e termos comuns",
|
CC.GRAY + "frases e termos comuns",
|
||||||
CC.GRAY + "usados na cozinha."
|
CC.GRAY + "usados na cozinha."
|
||||||
|
) : Arrays.asList(
|
||||||
|
CC.GRAY + "Common phrases and terms",
|
||||||
|
CC.GRAY + "used in the kitchen."
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
package land.battle.practice.message.impl;
|
package land.battle.practice.message.impl;
|
||||||
|
|
||||||
|
import land.battle.practice.Practice;
|
||||||
import land.battle.practice.message.KillMessage;
|
import land.battle.practice.message.KillMessage;
|
||||||
import land.battle.practice.util.CC;
|
import land.battle.practice.util.CC;
|
||||||
import org.bukkit.entity.Player;
|
import org.bukkit.entity.Player;
|
||||||
@ -25,29 +26,47 @@ public class NerdyKillMessages implements KillMessage {
|
|||||||
public String getFormatted(Player player, Player other, boolean otherPlayerExists) {
|
public String getFormatted(Player player, Player other, boolean otherPlayerExists) {
|
||||||
final String randomMessage = CC.YELLOW + this.getMessages().get(ThreadLocalRandom.current().nextInt(this.getMessages().size())) + CC.GRAY;
|
final String randomMessage = CC.YELLOW + this.getMessages().get(ThreadLocalRandom.current().nextInt(this.getMessages().size())) + CC.GRAY;
|
||||||
|
|
||||||
|
if (!Practice.getInstance().isHolanda()) {
|
||||||
if (!otherPlayerExists) {
|
if (!otherPlayerExists) {
|
||||||
return CC.RED + player.getName() + CC.GRAY + " foi " + randomMessage + ".";
|
return CC.RED + player.getName() + CC.GRAY + " foi " + randomMessage + ".";
|
||||||
}
|
}
|
||||||
|
|
||||||
return CC.RED + player.getName() + CC.GRAY + " foi " + randomMessage + " por " + CC.GREEN + other.getName() + CC.GRAY + ".";
|
return CC.RED + player.getName() + CC.GRAY + " foi " + randomMessage + " por " + CC.GREEN + other.getName() + CC.GRAY + ".";
|
||||||
|
} else {
|
||||||
|
if (!otherPlayerExists) {
|
||||||
|
return CC.RED + player.getName() + CC.GRAY + " was " + randomMessage + ".";
|
||||||
|
}
|
||||||
|
|
||||||
|
return CC.RED + player.getName() + CC.GRAY + " was " + randomMessage + " by " + CC.GREEN + other.getName() + CC.GRAY + ".";
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public List<String> getMessages() {
|
public List<String> getMessages() {
|
||||||
return Arrays.asList(
|
return !Practice.getInstance().isHolanda() ? Arrays.asList(
|
||||||
"deletado",
|
"deletado",
|
||||||
"crashado",
|
"crashado",
|
||||||
"dedurado",
|
"dedurado",
|
||||||
"hackeado",
|
"hackeado",
|
||||||
"superaquecido"
|
"superaquecido"
|
||||||
|
) : Arrays.asList(
|
||||||
|
"ALT+F4'd",
|
||||||
|
"deleted",
|
||||||
|
"crashed",
|
||||||
|
"ratted",
|
||||||
|
"hacked",
|
||||||
|
"over-heated"
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public List<String> getDescription() {
|
public List<String> getDescription() {
|
||||||
return Arrays.asList(
|
return !Practice.getInstance().isHolanda() ? Arrays.asList(
|
||||||
CC.GRAY + "termos nerds de informatica",
|
CC.GRAY + "termos nerds de informatica",
|
||||||
CC.GRAY + "para irritar seu oponente."
|
CC.GRAY + "para irritar seu oponente."
|
||||||
|
) : Arrays.asList(
|
||||||
|
CC.GRAY + "Nerdy computer terms",
|
||||||
|
CC.GRAY + "to trigger your opponents."
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -33,6 +33,7 @@ public class LeaderboardUpdateRunnable implements Runnable {
|
|||||||
public static final List<String> GLOBAL_ELO_LEADERBOARD_LORE = new ArrayList<>();
|
public static final List<String> GLOBAL_ELO_LEADERBOARD_LORE = new ArrayList<>();
|
||||||
|
|
||||||
public static final Map<Kit, List<String>> KIT_SPECIFIC_LEADERBOARD_LORE = new HashMap<>();
|
public static final Map<Kit, List<String>> KIT_SPECIFIC_LEADERBOARD_LORE = new HashMap<>();
|
||||||
|
public static final Map<Kit, List<String>> KIT_SPECIFIC_LEADERBOARD_LORE_SHORT = new HashMap<>();
|
||||||
public static final Map<Kit, List<String>> KIT_SPECIFIC_WIN_STREAK_LORE = new HashMap<>();
|
public static final Map<Kit, List<String>> KIT_SPECIFIC_WIN_STREAK_LORE = new HashMap<>();
|
||||||
public static final Map<Kit, List<String>> KIT_SPECIFIC_WIN_STREAK_LORE_SHORT = new HashMap<>();
|
public static final Map<Kit, List<String>> KIT_SPECIFIC_WIN_STREAK_LORE_SHORT = new HashMap<>();
|
||||||
|
|
||||||
@ -72,6 +73,8 @@ public class LeaderboardUpdateRunnable implements Runnable {
|
|||||||
|
|
||||||
final AtomicInteger integer = new AtomicInteger();
|
final AtomicInteger integer = new AtomicInteger();
|
||||||
|
|
||||||
|
final List<String> loreEloShort = new ArrayList<>();
|
||||||
|
|
||||||
sortedUuids.forEach(uuid -> {
|
sortedUuids.forEach(uuid -> {
|
||||||
if (integer.get() != 10) {
|
if (integer.get() != 10) {
|
||||||
final Document playerDocument = CorePlugin.getInstance().getCoreDatabase().getPlayerCollection().find(Filters.eq("uuid", uuid.toString())).first();
|
final Document playerDocument = CorePlugin.getInstance().getCoreDatabase().getPlayerCollection().find(Filters.eq("uuid", uuid.toString())).first();
|
||||||
@ -82,6 +85,12 @@ public class LeaderboardUpdateRunnable implements Runnable {
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
if (lore.size() >= 3) {
|
||||||
|
IntStream.range(0, 3).forEach(i -> loreEloShort.add(" " + lore.get(i)));
|
||||||
|
}
|
||||||
|
|
||||||
|
LeaderboardUpdateRunnable.KIT_SPECIFIC_LEADERBOARD_LORE_SHORT.put(kit, loreEloShort);
|
||||||
|
|
||||||
LeaderboardUpdateRunnable.KIT_SPECIFIC_LEADERBOARD_LORE.put(kit, lore);
|
LeaderboardUpdateRunnable.KIT_SPECIFIC_LEADERBOARD_LORE.put(kit, lore);
|
||||||
|
|
||||||
final List<String> loreForKillStreaks = new ArrayList<>();
|
final List<String> loreForKillStreaks = new ArrayList<>();
|
||||||
|
@ -28,9 +28,9 @@ public class SpawnBoardAdapter implements PlayerStateAdapter {
|
|||||||
final PotPlayer potPlayer = CorePlugin.getInstance().getPlayerManager().getPlayer(player);
|
final PotPlayer potPlayer = CorePlugin.getInstance().getPlayerManager().getPlayer(player);
|
||||||
final RankedDivision rankedDivision = RankedDivision.getByGlobalElo(playerData.getGlobalElo());
|
final RankedDivision rankedDivision = RankedDivision.getByGlobalElo(playerData.getGlobalElo());
|
||||||
if (!Practice.getInstance().isHolanda()) {
|
if (!Practice.getInstance().isHolanda()) {
|
||||||
stringList.add(CC.GRAY + "Online: " + CC.AQUA + Bukkit.getOnlinePlayers().size());
|
stringList.add(CC.WHITE + "Online: " + CC.GOLD + Bukkit.getOnlinePlayers().size());
|
||||||
stringList.add(CC.GRAY + "In Fights: " + CC.AQUA + StatusCache.getInstance().getFighting());
|
stringList.add(CC.WHITE + "In Fights: " + CC.GOLD + StatusCache.getInstance().getFighting());
|
||||||
stringList.add(CC.GRAY + "Division: " + CC.BLUE + rankedDivision.getFancyName());
|
stringList.add(CC.WHITE + "Division: " + CC.BLUE + rankedDivision.getFancyName());
|
||||||
} else {
|
} else {
|
||||||
stringList.add(CC.WHITE + "Online: " + CC.GOLD + Bukkit.getOnlinePlayers().size());
|
stringList.add(CC.WHITE + "Online: " + CC.GOLD + Bukkit.getOnlinePlayers().size());
|
||||||
stringList.add(CC.WHITE + "In Fights: " + CC.GOLD + StatusCache.getInstance().getFighting());
|
stringList.add(CC.WHITE + "In Fights: " + CC.GOLD + StatusCache.getInstance().getFighting());
|
||||||
|
@ -114,7 +114,11 @@ public final class PlayerUtil {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public static void clearPlayer(Player player) {
|
public static void clearPlayer(Player player) {
|
||||||
respawnPlayer(player);
|
clearPlayer(player, false);
|
||||||
|
}
|
||||||
|
|
||||||
|
public static void clearPlayer(Player player, boolean respawn) {
|
||||||
|
if (respawn) respawnPlayer(player);
|
||||||
player.setHealth(20.0D);
|
player.setHealth(20.0D);
|
||||||
player.setFoodLevel(20);
|
player.setFoodLevel(20);
|
||||||
player.setSaturation(12.8F);
|
player.setSaturation(12.8F);
|
||||||
|
@ -25,7 +25,6 @@ public class RateCommand extends BaseCommand {
|
|||||||
|
|
||||||
@Default
|
@Default
|
||||||
@Syntax("<vote>")
|
@Syntax("<vote>")
|
||||||
@CommandCompletion("@unvanished")
|
|
||||||
public void onDefault(Player player, String v) {
|
public void onDefault(Player player, String v) {
|
||||||
final PlayerData playerData = Practice.getInstance().getPlayerManager()
|
final PlayerData playerData = Practice.getInstance().getPlayerManager()
|
||||||
.getPlayerData(player.getUniqueId());
|
.getPlayerData(player.getUniqueId());
|
||||||
|
Loading…
Reference in New Issue
Block a user