8b7cad3fce
Chef → admin: the chef role no longer grants any command privilege. All team-management subcommands now take <team> as an argument and are gated by their crcore.team.<action> permission only: - add <team> <player> - remove <team> <player> - transfer <team> <player> - visibility <team> <PUBLIC|PRIVATE> - setspawn <team> (still player-only — needs admin's location) The LEADER role is kept in the data model (Team / TeamMember) and remains usable by game plugins via the API, but does not unlock any default command. Future work can re-introduce chef-specific commands if needed. PlaceholderAPI: auto-detected at CRCore.enable(). If the PAPI plugin is present on the server, CRCorePlaceholderExpansion registers automatically; otherwise the lib runs without it (no NoClassDefFoundError thanks to the indirection through doRegisterPlaceholderHook). Placeholders exposed: - Team: %crcore_team%, %crcore_team_name/tag/color/color_chat/size/ visibility/leader_name/total_score%, %crcore_team_score_<name>% - Player: %crcore_player_score_<name>%, %crcore_player_score_total% Dependency: me.clip:placeholderapi:2.11.6, scope provided. New repo: https://repo.extendedclip.com/content/repositories/placeholderapi/. docs/features.md, decisions.md and the builtin-commands diagram updated to reflect the simpler admin/player two-tier model and the PAPI section. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
165 lines
6.3 KiB
XML
165 lines
6.3 KiB
XML
<?xml version="1.0" encoding="UTF-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">
|
|
<modelVersion>4.0.0</modelVersion>
|
|
|
|
<groupId>fr.luc</groupId>
|
|
<artifactId>CR-Core</artifactId>
|
|
<version>1.0-SNAPSHOT</version>
|
|
<packaging>jar</packaging>
|
|
|
|
<name>CR-Core</name>
|
|
<description>Reusable core library for CR Minecraft game plugins (teams, players, scores, commands, events, SQLite persistence).</description>
|
|
|
|
<properties>
|
|
<!--
|
|
On utilise <release> plutôt que <source>+<target> pour garantir
|
|
que les références à des API ne sont pas accidentellement plus
|
|
récentes que Java 11 (ex. List.copyOf en Java 10+ : OK ;
|
|
Stream.toList en Java 16+ : refusé par javac).
|
|
-->
|
|
<maven.compiler.release>11</maven.compiler.release>
|
|
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
|
<sqlite.version>3.45.3.0</sqlite.version>
|
|
</properties>
|
|
|
|
<repositories>
|
|
<repository>
|
|
<id>papermc</id>
|
|
<url>https://repo.papermc.io/repository/maven-public/</url>
|
|
</repository>
|
|
<repository>
|
|
<id>spigot-repo</id>
|
|
<url>https://hub.spigotmc.org/nexus/content/repositories/snapshots/</url>
|
|
</repository>
|
|
<repository>
|
|
<id>sonatype</id>
|
|
<url>https://oss.sonatype.org/content/groups/public/</url>
|
|
</repository>
|
|
<repository>
|
|
<id>placeholderapi</id>
|
|
<url>https://repo.extendedclip.com/content/repositories/placeholderapi/</url>
|
|
</repository>
|
|
</repositories>
|
|
|
|
<dependencies>
|
|
<dependency>
|
|
<groupId>com.destroystokyo.paper</groupId>
|
|
<artifactId>paper-api</artifactId>
|
|
<version>1.16.5-R0.1-SNAPSHOT</version>
|
|
<scope>provided</scope>
|
|
</dependency>
|
|
<!--
|
|
SQLite JDBC driver. Scope compile so consumer plugins that depend on
|
|
CR-Core get it transitively. They are expected to shade it into
|
|
their final jar (or declare the dependency themselves) since Paper
|
|
does not bundle it.
|
|
-->
|
|
<dependency>
|
|
<groupId>org.xerial</groupId>
|
|
<artifactId>sqlite-jdbc</artifactId>
|
|
<version>${sqlite.version}</version>
|
|
<scope>compile</scope>
|
|
</dependency>
|
|
<!--
|
|
PlaceholderAPI — intégration OPTIONNELLE. Scope provided : si PAPI
|
|
est installé sur le serveur, on enregistre nos placeholders ; sinon,
|
|
la hook reste dormante. Le plugin de jeu n'a pas besoin de l'ajouter
|
|
lui-même.
|
|
-->
|
|
<dependency>
|
|
<groupId>me.clip</groupId>
|
|
<artifactId>placeholderapi</artifactId>
|
|
<version>2.11.6</version>
|
|
<scope>provided</scope>
|
|
</dependency>
|
|
</dependencies>
|
|
|
|
<!--
|
|
Publication vers le registry Maven de Gitea (Gitea Packages).
|
|
URL = https://<gitea>/api/packages/<owner>/maven
|
|
Le même endpoint sert pour les releases et les snapshots ; Gitea
|
|
décide selon le suffixe -SNAPSHOT de la version.
|
|
|
|
L'<id> doit matcher l'entrée <server id="gitea-luc-rival"> dans
|
|
~/.m2/settings.xml (qui contient le PAT). Voir docs/setup.md.
|
|
-->
|
|
<distributionManagement>
|
|
<repository>
|
|
<id>gitea-luc-rival</id>
|
|
<url>https://gitea.luc-rival.fr/api/packages/admin/maven</url>
|
|
</repository>
|
|
<snapshotRepository>
|
|
<id>gitea-luc-rival</id>
|
|
<url>https://gitea.luc-rival.fr/api/packages/admin/maven</url>
|
|
</snapshotRepository>
|
|
</distributionManagement>
|
|
|
|
<build>
|
|
<finalName>${project.artifactId}-${project.version}</finalName>
|
|
<plugins>
|
|
<plugin>
|
|
<groupId>org.apache.maven.plugins</groupId>
|
|
<artifactId>maven-compiler-plugin</artifactId>
|
|
<version>3.11.0</version>
|
|
<configuration>
|
|
<release>${maven.compiler.release}</release>
|
|
</configuration>
|
|
</plugin>
|
|
|
|
<!--
|
|
Publie un -sources.jar contenant le code source .java. Permet à
|
|
IntelliJ d'aller au source d'une classe CR-Core depuis un plugin
|
|
de jeu consommateur (Ctrl+Click).
|
|
-->
|
|
<plugin>
|
|
<groupId>org.apache.maven.plugins</groupId>
|
|
<artifactId>maven-source-plugin</artifactId>
|
|
<version>3.3.0</version>
|
|
<executions>
|
|
<execution>
|
|
<id>attach-sources</id>
|
|
<goals>
|
|
<goal>jar-no-fork</goal>
|
|
</goals>
|
|
</execution>
|
|
</executions>
|
|
</plugin>
|
|
|
|
<!--
|
|
Publie un -javadoc.jar contenant le HTML généré à partir des
|
|
commentaires /** ... */ du code. IntelliJ l'affiche en popup
|
|
au survol d'une méthode CR-Core.
|
|
|
|
doclint=none désactive les checks stricts (méthodes sans @param,
|
|
@return, etc.) — on accepte de la doc partielle plutôt que
|
|
bloquer le build.
|
|
-->
|
|
<plugin>
|
|
<groupId>org.apache.maven.plugins</groupId>
|
|
<artifactId>maven-javadoc-plugin</artifactId>
|
|
<version>3.6.3</version>
|
|
<configuration>
|
|
<source>${maven.compiler.release}</source>
|
|
<doclint>none</doclint>
|
|
<quiet>true</quiet>
|
|
<encoding>UTF-8</encoding>
|
|
<docencoding>UTF-8</docencoding>
|
|
<charset>UTF-8</charset>
|
|
<failOnError>false</failOnError>
|
|
</configuration>
|
|
<executions>
|
|
<execution>
|
|
<id>attach-javadocs</id>
|
|
<goals>
|
|
<goal>jar</goal>
|
|
</goals>
|
|
</execution>
|
|
</executions>
|
|
</plugin>
|
|
</plugins>
|
|
</build>
|
|
|
|
</project>
|