mirror of
https://github.com/Maxlego08/zKoth.git
synced 2025-02-16 01:42:17 +01:00
Merge branch 'release/3.0.6'
This commit is contained in:
commit
ff22a96d78
@ -1,4 +1,8 @@
|
||||
# Unreleased
|
||||
# 3.0.6
|
||||
|
||||
- Some fixs
|
||||
- Fix /koth stop auto-completion
|
||||
- Fix ``noKoth`` configuration
|
||||
|
||||
# 3.0.5
|
||||
|
||||
|
@ -3,7 +3,7 @@
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<groupId>fr.maxlego08.koth</groupId>
|
||||
<artifactId>zKoth</artifactId>
|
||||
<version>3.0.5</version>
|
||||
<version>3.0.6</version>
|
||||
<build>
|
||||
<sourceDirectory>src</sourceDirectory>
|
||||
<resources>
|
||||
|
2
pom.xml
2
pom.xml
@ -3,7 +3,7 @@
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<groupId>fr.maxlego08.koth</groupId>
|
||||
<artifactId>zKoth</artifactId>
|
||||
<version>3.0.5</version>
|
||||
<version>3.0.6</version>
|
||||
<properties>
|
||||
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
||||
<maven.compiler.source>8</maven.compiler.source>
|
||||
|
@ -326,6 +326,6 @@ public class KothManager extends ZUtils implements Savable {
|
||||
}
|
||||
|
||||
public List<String> getActiveNameKoths() {
|
||||
return this.getEnableKoths().stream().map(Koth::getFileName).collect(Collectors.toList());
|
||||
return this.getActiveKoths().stream().map(Koth::getFileName).collect(Collectors.toList());
|
||||
}
|
||||
}
|
||||
|
@ -834,7 +834,7 @@ public class ZKoth extends ZUtils implements Koth {
|
||||
|
||||
@Override
|
||||
public int getScore(Player player) {
|
||||
return this.playersValues.getOrDefault(player.getUniqueId(), 0);
|
||||
return player == null ? 0 : this.playersValues.getOrDefault(player.getUniqueId(), 0);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -7,7 +7,6 @@ import me.neznamy.tab.api.TabPlayer;
|
||||
import me.neznamy.tab.api.scoreboard.ScoreboardManager;
|
||||
import org.bukkit.Bukkit;
|
||||
import org.bukkit.entity.Player;
|
||||
import org.bukkit.plugin.Plugin;
|
||||
|
||||
import java.util.function.Consumer;
|
||||
|
||||
@ -24,8 +23,9 @@ public class TabHook implements KothScoreboard {
|
||||
TabAPI api = TabAPI.getInstance();
|
||||
TabPlayer tabPlayer = api.getPlayer(player.getUniqueId());
|
||||
ScoreboardManager manager = TabAPI.getInstance().getScoreboardManager();
|
||||
System.out.println(tabPlayer + " - " + manager);
|
||||
if (tabPlayer != null && manager != null) {
|
||||
manager.toggleScoreboard(tabPlayer, false);
|
||||
manager.toggleScoreboard(tabPlayer, true);
|
||||
Bukkit.getScheduler().runTaskLater(this.plugin, () -> after.accept(player), 10);
|
||||
}
|
||||
}
|
||||
|
@ -1,5 +1,6 @@
|
||||
package fr.maxlego08.koth.hook.teams;
|
||||
|
||||
import fr.maxlego08.koth.KothPlugin;
|
||||
import fr.maxlego08.koth.api.KothTeam;
|
||||
import net.brcdev.gangs.GangsPlugin;
|
||||
import net.brcdev.gangs.gang.Gang;
|
||||
@ -11,6 +12,13 @@ import java.util.Collections;
|
||||
import java.util.List;
|
||||
|
||||
public class GangsHook implements KothTeam {
|
||||
|
||||
private final KothPlugin plugin;
|
||||
|
||||
public GangsHook(KothPlugin plugin) {
|
||||
this.plugin = plugin;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getTeamName(OfflinePlayer player) {
|
||||
Gang gang = GangsPlugin.getInstance().getGangManager().getPlayersGang(player);
|
||||
|
@ -37,8 +37,8 @@ public class DistantPlaceholder extends PlaceholderExpansion {
|
||||
}
|
||||
|
||||
@Override
|
||||
public String onPlaceholderRequest(Player p, String params) {
|
||||
return this.placeholder.onRequest(p, params);
|
||||
public String onPlaceholderRequest(Player player, String params) {
|
||||
return this.placeholder.onRequest(player, params);
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -63,7 +63,7 @@ public class Config {
|
||||
displayMessageKothCap = configuration.getIntegerList("displayMessageKothCap");
|
||||
noPlayer = configuration.getString("noPlayer", "X");
|
||||
noFaction = configuration.getString("noFaction", "X");
|
||||
noFaction = configuration.getString("noKoth", "X");
|
||||
noKoth = configuration.getString("noKoth", "X");
|
||||
schedulerMillisecond = configuration.getLong("schedulerMillisecond", 1000);
|
||||
removeChestSec = configuration.getInt("removeChestSec", 120);
|
||||
|
||||
|
@ -836,7 +836,7 @@ public abstract class ZUtils extends MessageUtils {
|
||||
protected boolean isCooldown(Player player, String cooldown, int timer) {
|
||||
if (CooldownBuilder.isCooldown(cooldown, player)) {
|
||||
ActionBar.sendActionBar(player,
|
||||
String.format("<EFBFBD>cVous devez attendre encore <20>6%s <20>cavant de pouvoir faire cette action.",
|
||||
String.format("§cVous devez attendre encore §6%s §cavant de pouvoir faire cette action.",
|
||||
timerFormat(player, cooldown)));
|
||||
return true;
|
||||
}
|
||||
@ -850,7 +850,7 @@ public abstract class ZUtils extends MessageUtils {
|
||||
* @return
|
||||
*/
|
||||
protected String toList(Stream<String> list) {
|
||||
return toList(list.collect(Collectors.toList()), "<EFBFBD>e", "<EFBFBD>6");
|
||||
return toList(list.collect(Collectors.toList()), "§e", "§6");
|
||||
}
|
||||
|
||||
/**
|
||||
@ -858,7 +858,7 @@ public abstract class ZUtils extends MessageUtils {
|
||||
* @return
|
||||
*/
|
||||
protected String toList(List<String> list) {
|
||||
return toList(list, "<EFBFBD>e", "<EFBFBD>6<EFBFBD>n");
|
||||
return toList(list, "§e", "§6§n");
|
||||
}
|
||||
|
||||
/**
|
||||
@ -889,7 +889,7 @@ public abstract class ZUtils extends MessageUtils {
|
||||
*/
|
||||
protected String removeColor(String message) {
|
||||
for (ChatColor color : ChatColor.values())
|
||||
message = message.replace("<EFBFBD>" + color.getChar(), "").replace("&" + color.getChar(), "");
|
||||
message = message.replace("§" + color.getChar(), "").replace("&" + color.getChar(), "");
|
||||
return message;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user