Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/main'
Browse files Browse the repository at this point in the history
  • Loading branch information
AxenoDev committed Oct 20, 2024
2 parents 6b55782 + a6b49e9 commit b568049
Show file tree
Hide file tree
Showing 41 changed files with 365 additions and 245 deletions.
1 change: 1 addition & 0 deletions src/main/java/fr/communaywen/core/AywenCraftPlugin.java
Original file line number Diff line number Diff line change
Expand Up @@ -160,6 +160,7 @@ public void onLoad() {
this.registerFlags(new StateFlag("disable-builder-wand", false));
this.registerFlags(new StateFlag("disable-fly", false));
this.registerFlags(new StateFlag("disable-spawn-grave", false));
this.registerFlags(new StateFlag("disable-wind-charge", false));
}

@SneakyThrows
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/fr/communaywen/core/EventsManager.java
Original file line number Diff line number Diff line change
Expand Up @@ -265,7 +265,7 @@ public boolean startMiraculousFishing() {
System.out.println("\n\nEvent started\n\n");

Bukkit.broadcastMessage(ChatColor.GREEN + "Nouvel évènement en approche: " + ChatColor.BOLD + "Pêche Miraculeuse\n" +
ChatColor.RESET + ChatColor.GOLD + "Vous obtenez plus d'xp et de récompense en pêchat et en découvrant des coffres de structures");
ChatColor.RESET + ChatColor.GOLD + "Vous obtenez plus d'xp et de récompenses en pêchant et en découvrant des coffres de structures");

lastMiraculousFishing = System.currentTimeMillis();

Expand Down
4 changes: 2 additions & 2 deletions src/main/java/fr/communaywen/core/QuizManager.java
Original file line number Diff line number Diff line change
Expand Up @@ -101,9 +101,9 @@ public void onPlayerChat(AsyncPlayerChatEvent event) {
);


contestManager.addPointPlayer(points + contestManager.getPlayerPoints(event.getPlayer()), event.getPlayer());
contestManager.addPointPlayer(points + contestManager.getPlayerPoints(event.getPlayer()).join(), event.getPlayer());
String playerCamp = "points" + ContestCache.getPlayerCampsCache(event.getPlayer());
contestManager.updateColumnInt("contest", playerCamp, points + contestManager.getInt("contest", playerCamp));
contestManager.updateColumnInt("contest", playerCamp, points + contestManager.getInt("contest", playerCamp).join());

} else {
Bukkit.broadcastMessage(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,6 @@
import fr.communaywen.core.adminshop.menu.category.defaults.OresItems;
import fr.communaywen.core.adminshop.shopinterfaces.BaseItems;
import fr.communaywen.core.adminshop.shopinterfaces.BaseShop;
import fr.communaywen.core.credit.Credit;
import fr.communaywen.core.credit.Feature;
import lombok.Getter;
import org.bukkit.Material;
import org.bukkit.entity.Player;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,6 @@
import dev.xernas.menulib.utils.InventorySize;
import dev.xernas.menulib.utils.ItemBuilder;
import fr.communaywen.core.adminshop.AdminShopCategory;
import fr.communaywen.core.credit.Credit;
import fr.communaywen.core.credit.Feature;
import org.bukkit.Material;
import org.bukkit.entity.Player;
import org.bukkit.event.inventory.InventoryClickEvent;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
import dev.xernas.menulib.utils.InventorySize;
import dev.xernas.menulib.utils.ItemBuilder;
import fr.communaywen.core.adminshop.shopinterfaces.BaseItems;
import fr.communaywen.core.customitems.utils.CustomItemsUtils;
import org.bukkit.Material;
import org.bukkit.entity.Player;
import org.bukkit.event.inventory.InventoryClickEvent;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,5 @@
package fr.communaywen.core.adminshop.menu.category.colored;

import fr.communaywen.core.adminshop.shopinterfaces.ColoredShop;
import org.bukkit.entity.Player;

public enum BlockType {
CONCRETE("Béton"),
CONCRETE_POWDER("Béton poudreux"),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@

import fr.communaywen.core.adminshop.shopinterfaces.BaseItems;
import fr.communaywen.core.adminshop.menu.category.ShopType;
import fr.communaywen.core.credit.Credit;
import fr.communaywen.core.credit.Feature;
import org.bukkit.Material;

public enum BlocksItems implements BaseItems {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@

import fr.communaywen.core.adminshop.shopinterfaces.BaseItems;
import fr.communaywen.core.adminshop.menu.category.ShopType;
import fr.communaywen.core.credit.Credit;
import fr.communaywen.core.credit.Feature;
import org.bukkit.Material;

public enum MiscItems implements BaseItems {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,7 @@
package fr.communaywen.core.adminshop.menu.category.defaults;

import fr.communaywen.core.AywenCraftPlugin;
import fr.communaywen.core.adminshop.shopinterfaces.BaseItems;
import fr.communaywen.core.adminshop.menu.category.ShopType;
import fr.communaywen.core.credit.Credit;
import fr.communaywen.core.credit.Feature;
import org.bukkit.Material;

public enum OresItems implements BaseItems {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,6 @@
import dev.xernas.menulib.utils.ItemBuilder;
import fr.communaywen.core.adminshop.menu.category.ShopType;
import fr.communaywen.core.adminshop.shopinterfaces.BaseItems;
import fr.communaywen.core.credit.Credit;
import fr.communaywen.core.credit.Feature;
import org.bukkit.Material;
import org.bukkit.entity.Player;
import org.bukkit.event.inventory.InventoryClickEvent;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
package fr.communaywen.core.adminshop.shopinterfaces;

import fr.communaywen.core.adminshop.menu.category.ShopType;
import fr.communaywen.core.credit.Credit;
import fr.communaywen.core.credit.Feature;

public interface BaseItems {
String named();
Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,10 @@
package fr.communaywen.core.claim;

import fr.communaywen.core.AywenCraftPlugin;
import fr.communaywen.core.credit.Credit;
import fr.communaywen.core.teams.Team;
import fr.communaywen.core.utils.database.DatabaseConnector;
import org.bukkit.Bukkit;
import org.bukkit.Location;
import org.bukkit.entity.Player;

import java.sql.PreparedStatement;
import java.sql.ResultSet;
Expand Down
15 changes: 0 additions & 15 deletions src/main/java/fr/communaywen/core/claim/ClaimListener.java
Original file line number Diff line number Diff line change
@@ -1,24 +1,13 @@
package fr.communaywen.core.claim;

import java.sql.SQLException;
import java.util.*;

import com.sk89q.worldedit.bukkit.BukkitAdapter;
import com.sk89q.worldguard.WorldGuard;
import com.sk89q.worldguard.protection.ApplicableRegionSet;
import com.sk89q.worldguard.protection.flags.StateFlag;
import com.sk89q.worldguard.protection.regions.RegionContainer;
import com.sk89q.worldguard.protection.regions.RegionQuery;
import dev.lone.itemsadder.api.CustomStack;
import fr.communaywen.core.utils.constant.MessageManager;
import fr.communaywen.core.utils.constant.MessageType;
import fr.communaywen.core.utils.constant.Prefix;
import net.kyori.adventure.text.Component;
import net.kyori.adventure.text.TextComponent;
import net.kyori.adventure.text.event.ClickEvent;
import org.bukkit.*;
import org.bukkit.block.Block;
import org.bukkit.block.BlockFace;
import org.bukkit.block.Container;
import org.bukkit.block.data.Openable;
import org.bukkit.block.data.type.*;
Expand All @@ -42,12 +31,8 @@
import fr.communaywen.core.AywenCraftPlugin;
import fr.communaywen.core.teams.EconomieTeam;
import fr.communaywen.core.teams.Team;
import org.bukkit.material.RedstoneTorch;
import org.bukkit.scheduler.BukkitRunnable;

import static org.bukkit.event.EventPriority.HIGH;
import static org.bukkit.event.EventPriority.LOWEST;

public class ClaimListener implements Listener {
public static final Map<UUID, ClaimParticleTask> activeParticleTasks = new HashMap<>();

Expand Down
2 changes: 0 additions & 2 deletions src/main/java/fr/communaywen/core/claim/ClaimMenu.java
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,6 @@
import dev.xernas.menulib.utils.InventorySize;
import dev.xernas.menulib.utils.ItemBuilder;
import fr.communaywen.core.AywenCraftPlugin;
import fr.communaywen.core.claim.ClaimDeleteConfirmationMenu;
import fr.communaywen.core.claim.RegionManager;
import fr.communaywen.core.teams.Team;
import org.bukkit.ChatColor;
import org.bukkit.Material;
Expand Down
2 changes: 0 additions & 2 deletions src/main/java/fr/communaywen/core/claim/RegionManager.java
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,6 @@
import lombok.Getter;
import org.bukkit.Bukkit;
import org.bukkit.Location;
import org.bukkit.OfflinePlayer;
import org.bukkit.entity.Player;

import java.util.ArrayList;
import java.util.List;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -84,22 +84,22 @@ public void setcontest(Player player, String camp1, @Named("colorContest") Strin
contestManager.deleteTableContest("camps");
contestManager.insertCustomContest(camp1, color1, camp2, color2);

player.sendMessage("§aLe Contest : " + camp1 + " VS " + camp2 + " a bien été sauvegarder\nMerci d'attendre que les données en cache s'actualise.");
MessageManager.sendMessageType(player, "§aLe Contest : " + camp1 + " VS " + camp2 + " a bien été sauvegarder\nMerci d'attendre que les données en cache s'actualise.", Prefix.STAFF, MessageType.SUCCESS, true);
} else {
player.sendMessage("§c/contest setcontest <camp1> <color1> <camp2> <color2> et color doit comporter une couleur valide");
MessageManager.sendMessageType(player, "§c/contest setcontest <camp1> <color1> <camp2> <color2> et color doit comporter une couleur valide", Prefix.STAFF, MessageType.ERROR, true);
}
} else {
player.sendMessage("§cVous pouvez pas définir un contest lorsqu'il a commencé");
MessageManager.sendMessageType(player, "§cVous pouvez pas définir un contest lorsqu'il a commencé", Prefix.STAFF, MessageType.ERROR, true);
}
}

@Subcommand("addpoints")
@Description("Permet d'ajouter des points a un membre")
@CommandPermission("ayw.command.contest.addpoints")
public void addpoints(Player player, Player target, Integer points) {
contestManager.addPointPlayer(points + contestManager.getPlayerPoints(target), target);
contestManager.addPointPlayer(points + contestManager.getPlayerPoints(target).join(), target);

player.sendMessage("§aVous avez ajouté " + points + " §apoint(s) à " + target.getName());
MessageManager.sendMessageType(player, "§aVous avez ajouté " + points + " §apoint(s) à " + target.getName(), Prefix.STAFF, MessageType.SUCCESS, true);
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ public HeadCommand(AywenCraftPlugin plugins) {
@Cooldown(4)
@DefaultFor("~")
public void defaultCommand(Player player) {
MessageManager.sendMessageType(player, "§7Vous avez trouvé §d" + HeadManager.getNumberHeads(player) + "§8tête(s) sur §d" + HeadManager.getMaxHeads() + "§8têtes", Prefix.HEAD, MessageType.SUCCESS, true);
MessageManager.sendMessageType(player, "§7Vous avez trouvé §d" + HeadManager.getNumberHeads(player) + " §8tête(s) sur §d" + HeadManager.getMaxHeads() + " §8têtes", Prefix.HEAD, MessageType.SUCCESS, true);
}

@Subcommand("add")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,12 +32,6 @@ public JumpCommand(AywenCraftPlugin plugins, JumpManager manager) {
jumpManager = manager;
}

@Cooldown(4)
@DefaultFor("~")
public void defaultCommand(Player player) {
MessageManager.sendMessageType(player, "§7Vous avez trouvé §d" + HeadManager.getNumberHeads(player) + "§8tête(s) sur §d" + HeadManager.getMaxHeads() + "§8têtes", Prefix.HEAD, MessageType.SUCCESS, true);
}

@Subcommand("end")
@Description("Arrete le jump que vous etes entrain de faire")
public void end(Player player) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@ public static void initPlayerDataCache(Player player) {
if (result.next()) {
int points = result.getInt("point_dep");
int camp = result.getInt("camps");
String color = ContestManager.getString("contest","color" + camp);
String color = ContestManager.getString("contest","color" + camp).join();
ChatColor campColor = ChatColor.valueOf(color);

Bukkit.getScheduler().runTask(plugin, () -> {
Expand Down
Loading

0 comments on commit b568049

Please sign in to comment.