mirror of
https://github.com/RoinujNosde/SimpleClans.git
synced 2026-11-05 01:10:04 -05:00
Compare commits
4
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
e12ee8aaed | ||
|
|
fe60b25f61 | ||
|
|
503d67903e | ||
|
|
e1625d38c8 |
No files matched your search
@@ -1,5 +1,13 @@
|
||||
# Changelog
|
||||
|
||||
## [2.19.1](https://github.com/RoinujNosde/SimpleClans/compare/v2.19.0...v2.19.1) (2023-08-03)
|
||||
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* charge money on deposit ([#394](https://github.com/RoinujNosde/SimpleClans/issues/394)) ([fe60b25](https://github.com/RoinujNosde/SimpleClans/commit/fe60b25f6107281a9771f6498400c3f8ce81c916))
|
||||
* consider uppercase when checking for disallowed colors ([#391](https://github.com/RoinujNosde/SimpleClans/issues/391)) ([503d679](https://github.com/RoinujNosde/SimpleClans/commit/503d67903e386b1c4b6eb7903a1addbfd42a684a))
|
||||
|
||||
## [2.19.0](https://github.com/RoinujNosde/SimpleClans/compare/v2.18.1...v2.19.0) (2023-07-27)
|
||||
|
||||
|
||||
|
||||
@@ -1,9 +1,8 @@
|
||||
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<groupId>net.sacredlabyrinth.phaed.simpleclans</groupId>
|
||||
<artifactId>SimpleClans</artifactId>
|
||||
<version>2.19.1-SNAPSHOT</version>
|
||||
<version>2.19.1</version>
|
||||
<name>SimpleClans</name>
|
||||
<url>https://www.spigotmc.org/resources/simpleclans.71242/</url>
|
||||
|
||||
|
||||
@@ -113,7 +113,7 @@ public class Clan implements Serializable, Comparable<Clan> {
|
||||
@Deprecated
|
||||
public void deposit(double amount, Player player) {
|
||||
if (SimpleClans.getInstance().getPermissionsManager().playerHasMoney(player, amount)) {
|
||||
if (SimpleClans.getInstance().getPermissionsManager().grantPlayer(player, amount)) {
|
||||
if (SimpleClans.getInstance().getPermissionsManager().chargePlayer(player, amount)) {
|
||||
player.sendMessage(AQUA + lang("player.clan.deposit", player, amount));
|
||||
addBb(player.getName(), lang("bb.clan.deposit", amount));
|
||||
setBalance(getBalance() + amount);
|
||||
|
||||
@@ -5,6 +5,7 @@ import net.sacredlabyrinth.phaed.simpleclans.Rank;
|
||||
import net.sacredlabyrinth.phaed.simpleclans.SimpleClans;
|
||||
import net.sacredlabyrinth.phaed.simpleclans.utils.ChatUtils;
|
||||
import org.bukkit.Material;
|
||||
import org.bukkit.configuration.InvalidConfigurationException;
|
||||
import org.bukkit.configuration.file.FileConfiguration;
|
||||
import org.bukkit.plugin.Plugin;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
@@ -12,6 +13,7 @@ import org.jetbrains.annotations.NotNull;
|
||||
import java.io.File;
|
||||
import java.io.IOException;
|
||||
import java.util.*;
|
||||
import java.util.logging.Level;
|
||||
|
||||
import static net.sacredlabyrinth.phaed.simpleclans.managers.SettingsManager.ConfigField.*;
|
||||
import static net.sacredlabyrinth.phaed.simpleclans.utils.RankingNumberResolver.RankingType;
|
||||
@@ -89,8 +91,8 @@ public final class SettingsManager {
|
||||
if (configFile.exists()) {
|
||||
try {
|
||||
config.load(configFile);
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
} catch (IOException | InvalidConfigurationException ex) {
|
||||
SimpleClans.getInstance().getLogger().log(Level.SEVERE, ex.getMessage(), ex);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -100,8 +102,8 @@ public final class SettingsManager {
|
||||
public void save() {
|
||||
try {
|
||||
config.save(configFile);
|
||||
} catch (IOException e) {
|
||||
e.printStackTrace();
|
||||
} catch (IOException ex) {
|
||||
SimpleClans.getInstance().getLogger().log(Level.SEVERE, ex.getMessage(), ex);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -115,7 +117,7 @@ public final class SettingsManager {
|
||||
" that matches their clan tag.");
|
||||
}
|
||||
|
||||
if (discordSrv == null && is (DISCORDCHAT_ENABLE)) {
|
||||
if (discordSrv == null && is(DISCORDCHAT_ENABLE)) {
|
||||
plugin.getLogger().warning("DiscordChat can't be initialized, please, install DiscordSRV.");
|
||||
}
|
||||
}
|
||||
@@ -168,13 +170,8 @@ public final class SettingsManager {
|
||||
* @return whether the string contains the color code
|
||||
*/
|
||||
public boolean hasDisallowedColor(String str) {
|
||||
for (String disallowedTag : getStringList(DISALLOWED_TAG_COLORS)) {
|
||||
if (str.contains("&" + disallowedTag)) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
return false;
|
||||
var loweredString = str.toLowerCase();
|
||||
return getStringList(DISALLOWED_TAG_COLORS).stream().map(String::toLowerCase).anyMatch(color -> loweredString.contains("&" + color));
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in new issue
Block a user