mirror of
https://github.com/Plugily-Projects/BuildBattle.git
synced 2026-11-08 10:05:23 -05:00
Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
1e53ce37cf | ||
|
|
34e28d3fef | ||
|
|
9e10545e5f | ||
|
|
17123e91db | ||
|
|
ca42285076 | ||
|
|
b2dbb5adaf |
No files matched your search
@@ -10,6 +10,22 @@ deploy webhooks to print changelog successfully
|
||||
|
||||
That's all, matcher will stop when detects next line started with `###` match
|
||||
|
||||
## 5.0.15 Release (03.05.2025)
|
||||
* Allowing by default 20 places placeholder for summary list
|
||||
* Check if OPTIONS_MENU item is still in builders inventory and readd it if necessary
|
||||
* Fixed IllegalArgumentException on PlotSelector, also switched to PaginatedInventory to support all Plots
|
||||
* Added filter to maxplayers/random join team / solo so that only the correct arenas are selected
|
||||
* Updated Minigamesbox to 1.4.1
|
||||
|
||||
### 5.0.14 Release (13.03.2025)
|
||||
* Changed plot distribution on team mode tries to create only full plots now
|
||||
* Fixed plot distribution in same cases lets spectators into the plot as member
|
||||
* Fixed game ending due to not enough players counted spectators
|
||||
* Updated to minigamesbox 1.4.0
|
||||
|
||||
### 5.0.13 Release (18.02.2025)
|
||||
* Fixed Progress must be between 0 and 1
|
||||
|
||||
### 5.0.12 Release (17.02.2025)
|
||||
* Fixed ItemSpawn on Plotarea also for dropped items by not player related drops
|
||||
* Fixed gtb plot reset
|
||||
|
||||
@@ -42,14 +42,14 @@ repositories {
|
||||
}
|
||||
|
||||
dependencies {
|
||||
implementation("plugily.projects:MiniGamesBox-Classic:1.3.16") { isTransitive = false }
|
||||
implementation("plugily.projects:MiniGamesBox-Classic:1.3.17") { isTransitive = false }
|
||||
compileOnly("io.papermc.paper:paper-api:1.21.4-R0.1-SNAPSHOT")
|
||||
compileOnly("net.citizensnpcs:citizensapi:2.0.31-SNAPSHOT")
|
||||
compileOnly("org.jetbrains:annotations:24.0.1")
|
||||
}
|
||||
|
||||
group = "plugily.projects"
|
||||
version = "5.0.12"
|
||||
version = "5.0.13-SNAPSHOT4"
|
||||
description = "BuildBattle"
|
||||
|
||||
java {
|
||||
File renamed without changes.
File renamed without changes.
@@ -0,0 +1,206 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!--
|
||||
~
|
||||
~ BuildBattle - Ultimate building competition minigame
|
||||
~ Copyright (C) 2021 Plugily Projects - maintained by Tigerpanzer_02, 2Wild4You and contributors
|
||||
~
|
||||
~ This program is free software: you can redistribute it and/or modify
|
||||
~ it under the terms of the GNU General Public License as published by
|
||||
~ the Free Software Foundation, either version 3 of the License, or
|
||||
~ (at your option) any later version.
|
||||
~
|
||||
~ This program is distributed in the hope that it will be useful,
|
||||
~ but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
~ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
~ GNU General Public License for more details.
|
||||
~
|
||||
~ You should have received a copy of the GNU General Public License
|
||||
~ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
~
|
||||
-->
|
||||
|
||||
<project xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xmlns="http://maven.apache.org/POM/4.0.0"
|
||||
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>plugily.projects</groupId>
|
||||
<artifactId>buildbattle</artifactId>
|
||||
<version>5.0.14-SNAPSHOT1</version>
|
||||
<name>BuildBattle</name>
|
||||
|
||||
<properties>
|
||||
<java.version>1.8</java.version>
|
||||
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
||||
</properties>
|
||||
|
||||
<repositories>
|
||||
<repository>
|
||||
<id>papermc</id>
|
||||
<url>https://repo.papermc.io/repository/maven-public/</url>
|
||||
</repository>
|
||||
<repository>
|
||||
<id>plugilyprojects</id>
|
||||
<url>https://maven.plugily.xyz/releases</url>
|
||||
</repository>
|
||||
<repository>
|
||||
<id>plugilyprojects-snapshots</id>
|
||||
<url>https://maven.plugily.xyz/snapshots</url>
|
||||
</repository>
|
||||
<repository>
|
||||
<id>jitpack</id>
|
||||
<url>https://jitpack.io</url>
|
||||
</repository>
|
||||
<repository>
|
||||
<id>spigot-repo</id>
|
||||
<url>https://hub.spigotmc.org/nexus/content/repositories/snapshots/</url>
|
||||
</repository>
|
||||
<repository>
|
||||
<id>citizens-repo</id>
|
||||
<url>https://repo.citizensnpcs.co/</url>
|
||||
</repository>
|
||||
</repositories>
|
||||
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>io.papermc.paper</groupId>
|
||||
<artifactId>paper-api</artifactId>
|
||||
<version>1.21.4-R0.1-SNAPSHOT</version>
|
||||
<scope>provided</scope>
|
||||
</dependency>
|
||||
<!-- https://mvnrepository.com/artifact/org.jetbrains/annotations -->
|
||||
<dependency>
|
||||
<groupId>org.jetbrains</groupId>
|
||||
<artifactId>annotations</artifactId>
|
||||
<version>23.0.0</version>
|
||||
<scope>provided</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>plugily.projects</groupId>
|
||||
<artifactId>MiniGamesBox-Classic</artifactId>
|
||||
<version>1.4.0</version>
|
||||
<scope>compile</scope>
|
||||
<optional>true</optional>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>net.citizensnpcs</groupId>
|
||||
<artifactId>citizensapi</artifactId>
|
||||
<version>2.0.26-SNAPSHOT</version>
|
||||
<scope>provided</scope>
|
||||
<exclusions>
|
||||
<exclusion>
|
||||
<groupId>ch.ethz.globis.phtree</groupId>
|
||||
<artifactId>phtree</artifactId>
|
||||
</exclusion>
|
||||
</exclusions>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
|
||||
<build>
|
||||
<resources>
|
||||
<resource>
|
||||
<directory>src/main/resources</directory>
|
||||
<filtering>true</filtering>
|
||||
</resource>
|
||||
</resources>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-compiler-plugin</artifactId>
|
||||
<version>3.14.0</version>
|
||||
<configuration>
|
||||
<source>${java.version}</source>
|
||||
<target>${java.version}</target>
|
||||
<encoding>UTF-8</encoding>
|
||||
</configuration>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-site-plugin</artifactId>
|
||||
<version>3.21.0</version>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-deploy-plugin</artifactId>
|
||||
<version>3.1.4</version>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-project-info-reports-plugin</artifactId>
|
||||
<version>3.9.0</version>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-javadoc-plugin</artifactId>
|
||||
<version>3.11.2</version>
|
||||
<configuration>
|
||||
<windowtitle>BuildBattle API docs for v${project.version}</windowtitle>
|
||||
<description>Minecraft building minigame.
|
||||
The goal is to build the best you can! You must compete with other players in this building game.
|
||||
Who will be the best? Have fun using it! Leave a good rating if you really like it.
|
||||
</description>
|
||||
</configuration>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-jar-plugin</artifactId>
|
||||
<version>3.4.2</version>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-shade-plugin</artifactId>
|
||||
<version>3.6.0</version>
|
||||
<executions>
|
||||
<execution>
|
||||
<phase>package</phase>
|
||||
<goals>
|
||||
<goal>shade</goal>
|
||||
</goals>
|
||||
<configuration>
|
||||
<minimizeJar>true</minimizeJar>
|
||||
<relocations>
|
||||
<relocation>
|
||||
<pattern>com.zaxxer.hikari</pattern>
|
||||
<shadedPattern>plugily.projects.buildbattle.database.hikari</shadedPattern>
|
||||
</relocation>
|
||||
<relocation>
|
||||
<pattern>plugily.projects.minigamesbox</pattern>
|
||||
<shadedPattern>plugily.projects.buildbattle.minigamesbox</shadedPattern>
|
||||
</relocation>
|
||||
</relocations>
|
||||
<createDependencyReducedPom>false</createDependencyReducedPom>
|
||||
</configuration>
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
|
||||
<!-- External beta versions discord deployer plugin -->
|
||||
<plugin>
|
||||
<groupId>plugily.projects</groupId>
|
||||
<artifactId>betty-maven-plugin</artifactId>
|
||||
<version>1.0.2</version>
|
||||
<configuration>
|
||||
<changelogFile>${project.basedir}/CHANGELOG.md</changelogFile>
|
||||
</configuration>
|
||||
</plugin>
|
||||
<!-- External beta versions discord deployer plugin -->
|
||||
</plugins>
|
||||
<extensions>
|
||||
<extension>
|
||||
<groupId>org.apache.maven.wagon</groupId>
|
||||
<artifactId>wagon-ssh</artifactId>
|
||||
<version>3.5.3</version>
|
||||
</extension>
|
||||
</extensions>
|
||||
</build>
|
||||
<distributionManagement>
|
||||
<repository>
|
||||
<id>Release</id>
|
||||
<url>https://maven.plugily.xyz/releases</url>
|
||||
</repository>
|
||||
<snapshotRepository>
|
||||
<id>Snapshot</id>
|
||||
<url>https://maven.plugily.xyz/snapshots</url>
|
||||
</snapshotRepository>
|
||||
</distributionManagement>
|
||||
</project>
|
||||
File renamed without changes.
@@ -10,11 +10,9 @@ jobs:
|
||||
steps:
|
||||
- name: Checkout Latest Commit
|
||||
uses: actions/checkout@v4.2.2
|
||||
- name: Grant execute permission for gradlew
|
||||
run: chmod +x gradlew
|
||||
- name: Bump Version
|
||||
id: bump
|
||||
uses: Plugily-Projects/version-bump-action@v8
|
||||
uses: Plugily-Projects/version-bump-action@v10
|
||||
with:
|
||||
github-token: ${{ secrets.github_token }}
|
||||
auto-version-bump: true
|
||||
@@ -34,10 +32,23 @@ jobs:
|
||||
distribution: 'temurin'
|
||||
java-version: '21'
|
||||
java-package: jdk
|
||||
- name: Grant execute permission for gradlew
|
||||
run: chmod +x gradlew
|
||||
- name: Publish with Gradle
|
||||
run: ./gradlew publishMavenPublicationToSnapshotsRepository
|
||||
env:
|
||||
MAVEN_USERNAME: ${{ secrets.SNAPSHOTSUSERNAME }}
|
||||
MAVEN_PASSWORD: ${{ secrets.SNAPSHOTSPASSWORD }}
|
||||
- name: Set up Maven
|
||||
uses: stCarolas/setup-maven@v5
|
||||
with:
|
||||
maven-version: 3.8.2
|
||||
- name: Cache
|
||||
uses: actions/cache@v4.2.2
|
||||
with:
|
||||
path: ~/.m2/repository
|
||||
key: maven-${{ hashFiles('**/pom.xml') }}
|
||||
restore-keys: maven-
|
||||
- name: Publish with Maven
|
||||
uses: s4u/maven-settings-action@v3.1.0
|
||||
with:
|
||||
servers: |
|
||||
[{
|
||||
"id": "Snapshot",
|
||||
"username": "${{ secrets.SNAPSHOTSUSERNAME }}",
|
||||
"password": "${{ secrets.SNAPSHOTSPASSWORD }}"
|
||||
}]
|
||||
- run: mvn clean verify compile package site:site javadoc:javadoc javadoc:jar deploy -DaltDeploymentRepository=Snapshot::https://maven.plugily.xyz/snapshots -f pom.xml
|
||||
@@ -12,11 +12,9 @@ jobs:
|
||||
steps:
|
||||
- name: Checkout Latest Commit
|
||||
uses: actions/checkout@v4.2.2
|
||||
- name: Grant execute permission for gradlew
|
||||
run: chmod +x gradlew
|
||||
- name: Bump Version
|
||||
id: bump
|
||||
uses: Plugily-Projects/version-bump-action@v8
|
||||
uses: Plugily-Projects/version-bump-action@v10
|
||||
with:
|
||||
github-token: ${{ secrets.github_token }}
|
||||
auto-version-bump: false
|
||||
@@ -37,10 +35,23 @@ jobs:
|
||||
distribution: 'temurin'
|
||||
java-version: '21'
|
||||
java-package: jdk
|
||||
- name: Grant execute permission for gradlew
|
||||
run: chmod +x gradlew
|
||||
- name: Publish with Gradle
|
||||
run: ./gradlew publishMavenPublicationToReleasesRepository
|
||||
env:
|
||||
MAVEN_USERNAME: ${{ secrets.RELEASESUSERNAME }}
|
||||
MAVEN_PASSWORD: ${{ secrets.RELEASESPASSWORD }}
|
||||
- name: Set up Maven
|
||||
uses: stCarolas/setup-maven@v5
|
||||
with:
|
||||
maven-version: 3.8.2
|
||||
- name: Cache
|
||||
uses: actions/cache@v4.2.2
|
||||
with:
|
||||
path: ~/.m2/repository
|
||||
key: maven-${{ hashFiles('**/pom.xml') }}
|
||||
restore-keys: maven-
|
||||
- name: Publish with Maven
|
||||
uses: s4u/maven-settings-action@v3.1.0
|
||||
with:
|
||||
servers: |
|
||||
[{
|
||||
"id": "Release",
|
||||
"username": "${{ secrets.RELEASESUSERNAME }}",
|
||||
"password": "${{ secrets.RELEASESPASSWORD }}"
|
||||
}]
|
||||
- run: mvn clean verify compile package site:site javadoc:javadoc javadoc:jar deploy -DaltDeploymentRepository=Release::https://maven.plugily.xyz/releases -f pom.xml
|
||||
@@ -0,0 +1,206 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!--
|
||||
~
|
||||
~ BuildBattle - Ultimate building competition minigame
|
||||
~ Copyright (C) 2021 Plugily Projects - maintained by Tigerpanzer_02, 2Wild4You and contributors
|
||||
~
|
||||
~ This program is free software: you can redistribute it and/or modify
|
||||
~ it under the terms of the GNU General Public License as published by
|
||||
~ the Free Software Foundation, either version 3 of the License, or
|
||||
~ (at your option) any later version.
|
||||
~
|
||||
~ This program is distributed in the hope that it will be useful,
|
||||
~ but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
~ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
~ GNU General Public License for more details.
|
||||
~
|
||||
~ You should have received a copy of the GNU General Public License
|
||||
~ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
~
|
||||
-->
|
||||
|
||||
<project xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xmlns="http://maven.apache.org/POM/4.0.0"
|
||||
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>plugily.projects</groupId>
|
||||
<artifactId>buildbattle</artifactId>
|
||||
<version>5.0.15</version>
|
||||
<name>BuildBattle</name>
|
||||
|
||||
<properties>
|
||||
<java.version>1.8</java.version>
|
||||
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
||||
</properties>
|
||||
|
||||
<repositories>
|
||||
<repository>
|
||||
<id>papermc</id>
|
||||
<url>https://repo.papermc.io/repository/maven-public/</url>
|
||||
</repository>
|
||||
<repository>
|
||||
<id>plugilyprojects</id>
|
||||
<url>https://maven.plugily.xyz/releases</url>
|
||||
</repository>
|
||||
<repository>
|
||||
<id>plugilyprojects-snapshots</id>
|
||||
<url>https://maven.plugily.xyz/snapshots</url>
|
||||
</repository>
|
||||
<repository>
|
||||
<id>jitpack</id>
|
||||
<url>https://jitpack.io</url>
|
||||
</repository>
|
||||
<repository>
|
||||
<id>spigot-repo</id>
|
||||
<url>https://hub.spigotmc.org/nexus/content/repositories/snapshots/</url>
|
||||
</repository>
|
||||
<repository>
|
||||
<id>citizens-repo</id>
|
||||
<url>https://repo.citizensnpcs.co/</url>
|
||||
</repository>
|
||||
</repositories>
|
||||
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>io.papermc.paper</groupId>
|
||||
<artifactId>paper-api</artifactId>
|
||||
<version>1.21.4-R0.1-SNAPSHOT</version>
|
||||
<scope>provided</scope>
|
||||
</dependency>
|
||||
<!-- https://mvnrepository.com/artifact/org.jetbrains/annotations -->
|
||||
<dependency>
|
||||
<groupId>org.jetbrains</groupId>
|
||||
<artifactId>annotations</artifactId>
|
||||
<version>23.0.0</version>
|
||||
<scope>provided</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>plugily.projects</groupId>
|
||||
<artifactId>MiniGamesBox-Classic</artifactId>
|
||||
<version>1.4.1</version>
|
||||
<scope>compile</scope>
|
||||
<optional>true</optional>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>net.citizensnpcs</groupId>
|
||||
<artifactId>citizensapi</artifactId>
|
||||
<version>2.0.26-SNAPSHOT</version>
|
||||
<scope>provided</scope>
|
||||
<exclusions>
|
||||
<exclusion>
|
||||
<groupId>ch.ethz.globis.phtree</groupId>
|
||||
<artifactId>phtree</artifactId>
|
||||
</exclusion>
|
||||
</exclusions>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
|
||||
<build>
|
||||
<resources>
|
||||
<resource>
|
||||
<directory>src/main/resources</directory>
|
||||
<filtering>true</filtering>
|
||||
</resource>
|
||||
</resources>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-compiler-plugin</artifactId>
|
||||
<version>3.14.0</version>
|
||||
<configuration>
|
||||
<source>${java.version}</source>
|
||||
<target>${java.version}</target>
|
||||
<encoding>UTF-8</encoding>
|
||||
</configuration>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-site-plugin</artifactId>
|
||||
<version>3.21.0</version>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-deploy-plugin</artifactId>
|
||||
<version>3.1.4</version>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-project-info-reports-plugin</artifactId>
|
||||
<version>3.9.0</version>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-javadoc-plugin</artifactId>
|
||||
<version>3.11.2</version>
|
||||
<configuration>
|
||||
<windowtitle>BuildBattle API docs for v${project.version}</windowtitle>
|
||||
<description>Minecraft building minigame.
|
||||
The goal is to build the best you can! You must compete with other players in this building game.
|
||||
Who will be the best? Have fun using it! Leave a good rating if you really like it.
|
||||
</description>
|
||||
</configuration>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-jar-plugin</artifactId>
|
||||
<version>3.4.2</version>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-shade-plugin</artifactId>
|
||||
<version>3.6.0</version>
|
||||
<executions>
|
||||
<execution>
|
||||
<phase>package</phase>
|
||||
<goals>
|
||||
<goal>shade</goal>
|
||||
</goals>
|
||||
<configuration>
|
||||
<minimizeJar>true</minimizeJar>
|
||||
<relocations>
|
||||
<relocation>
|
||||
<pattern>com.zaxxer.hikari</pattern>
|
||||
<shadedPattern>plugily.projects.buildbattle.database.hikari</shadedPattern>
|
||||
</relocation>
|
||||
<relocation>
|
||||
<pattern>plugily.projects.minigamesbox</pattern>
|
||||
<shadedPattern>plugily.projects.buildbattle.minigamesbox</shadedPattern>
|
||||
</relocation>
|
||||
</relocations>
|
||||
<createDependencyReducedPom>false</createDependencyReducedPom>
|
||||
</configuration>
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
|
||||
<!-- External beta versions discord deployer plugin -->
|
||||
<plugin>
|
||||
<groupId>plugily.projects</groupId>
|
||||
<artifactId>betty-maven-plugin</artifactId>
|
||||
<version>1.0.2</version>
|
||||
<configuration>
|
||||
<changelogFile>${project.basedir}/CHANGELOG.md</changelogFile>
|
||||
</configuration>
|
||||
</plugin>
|
||||
<!-- External beta versions discord deployer plugin -->
|
||||
</plugins>
|
||||
<extensions>
|
||||
<extension>
|
||||
<groupId>org.apache.maven.wagon</groupId>
|
||||
<artifactId>wagon-ssh</artifactId>
|
||||
<version>3.5.3</version>
|
||||
</extension>
|
||||
</extensions>
|
||||
</build>
|
||||
<distributionManagement>
|
||||
<repository>
|
||||
<id>Release</id>
|
||||
<url>https://maven.plugily.xyz/releases</url>
|
||||
</repository>
|
||||
<snapshotRepository>
|
||||
<id>Snapshot</id>
|
||||
<url>https://maven.plugily.xyz/snapshots</url>
|
||||
</snapshotRepository>
|
||||
</distributionManagement>
|
||||
</project>
|
||||
@@ -26,7 +26,7 @@
|
||||
|
||||
<groupId>plugily.projects</groupId>
|
||||
<artifactId>buildbattle</artifactId>
|
||||
<version>5.0.0</version>
|
||||
<version>5.0.13-SNAPSHOT4</version>
|
||||
<name>BuildBattle</name>
|
||||
|
||||
<properties>
|
||||
@@ -37,7 +37,7 @@
|
||||
<repositories>
|
||||
<repository>
|
||||
<id>papermc</id>
|
||||
<url>https://papermc.io/repo/repository/maven-public/</url>
|
||||
<url>https://repo.papermc.io/repository/maven-public/</url>
|
||||
</repository>
|
||||
<repository>
|
||||
<id>plugilyprojects</id>
|
||||
@@ -69,7 +69,7 @@
|
||||
<dependency>
|
||||
<groupId>io.papermc.paper</groupId>
|
||||
<artifactId>paper-api</artifactId>
|
||||
<version>1.19.1-R0.1-SNAPSHOT</version>
|
||||
<version>1.21.4-R0.1-SNAPSHOT</version>
|
||||
<scope>provided</scope>
|
||||
</dependency>
|
||||
<!-- https://mvnrepository.com/artifact/org.jetbrains/annotations -->
|
||||
@@ -82,7 +82,7 @@
|
||||
<dependency>
|
||||
<groupId>plugily.projects</groupId>
|
||||
<artifactId>MiniGamesBox-Classic</artifactId>
|
||||
<version>1.2.0-SNAPSHOT51</version>
|
||||
<version>1.3.17-SNAPSHOT10</version>
|
||||
<scope>compile</scope>
|
||||
<optional>true</optional>
|
||||
</dependency>
|
||||
@@ -108,41 +108,51 @@
|
||||
</resource>
|
||||
</resources>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-site-plugin</artifactId>
|
||||
<version>3.12.0</version>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-compiler-plugin</artifactId>
|
||||
<version>3.10.1</version>
|
||||
<goals>
|
||||
<goal>compile</goal>
|
||||
</goals>
|
||||
<version>3.14.0</version>
|
||||
<configuration>
|
||||
<source>${java.version}</source>
|
||||
<target>${java.version}</target>
|
||||
</configuration>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-site-plugin</artifactId>
|
||||
<version>3.21.0</version>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-deploy-plugin</artifactId>
|
||||
<version>3.1.4</version>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-project-info-reports-plugin</artifactId>
|
||||
<version>3.9.0</version>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-javadoc-plugin</artifactId>
|
||||
<version>3.4.0</version>
|
||||
<version>3.11.2</version>
|
||||
<configuration>
|
||||
<destDir>minecraft/buildbattle</destDir>
|
||||
<isOffline>false</isOffline>
|
||||
<windowtitle>Murder Mystery API docs for v${project.version}</windowtitle>
|
||||
<description>Minecraft survival minigame.
|
||||
Be the murderer, innocent or the detective! Don't be killed during the game to win! API
|
||||
documentation for hooking Murder Mystery with your plugin.
|
||||
</description>
|
||||
</configuration>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-jar-plugin</artifactId>
|
||||
<version>3.2.2</version>
|
||||
<version>3.4.2</version>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-shade-plugin</artifactId>
|
||||
<version>3.3.0</version>
|
||||
<version>3.6.0</version>
|
||||
<executions>
|
||||
<execution>
|
||||
<phase>package</phase>
|
||||
@@ -159,10 +169,6 @@
|
||||
<pattern>plugily.projects.minigamesbox</pattern>
|
||||
<shadedPattern>plugily.projects.buildbattle.minigamesbox</shadedPattern>
|
||||
</relocation>
|
||||
<relocation>
|
||||
<pattern>plugily.projects.commonsbox</pattern>
|
||||
<shadedPattern>plugily.projects.buildbattle.commonsbox</shadedPattern>
|
||||
</relocation>
|
||||
</relocations>
|
||||
<createDependencyReducedPom>false</createDependencyReducedPom>
|
||||
</configuration>
|
||||
@@ -185,14 +191,18 @@
|
||||
<extension>
|
||||
<groupId>org.apache.maven.wagon</groupId>
|
||||
<artifactId>wagon-ssh</artifactId>
|
||||
<version>3.5.2</version>
|
||||
<version>3.5.3</version>
|
||||
</extension>
|
||||
</extensions>
|
||||
</build>
|
||||
<distributionManagement>
|
||||
<repository>
|
||||
<id>plugily-projects</id>
|
||||
<id>Release</id>
|
||||
<url>https://maven.plugily.xyz/releases</url>
|
||||
</repository>
|
||||
<snapshotRepository>
|
||||
<id>Snapshot</id>
|
||||
<url>https://maven.plugily.xyz/snapshots</url>
|
||||
</snapshotRepository>
|
||||
</distributionManagement>
|
||||
</project>
|
||||
</project>
|
||||
@@ -56,7 +56,7 @@ public class ArenaManager extends PluginArenaManager {
|
||||
List<Plot> plots = pluginArena.getPlotManager().getPlots();
|
||||
Plot partyPlot = plots.get(plots.size() == 1 ? 0 : plugin.getRandom().nextInt(plots.size()));
|
||||
|
||||
if(arena.getPlayers().contains(partyLeader)) {
|
||||
if(arena.getPlayersLeft().contains(partyLeader)) {
|
||||
Plot partyLeaderPlot = pluginArena.getPlotManager().getPlot(partyLeader);
|
||||
if(partyLeaderPlot != null) {
|
||||
partyPlot = partyLeaderPlot;
|
||||
|
||||
@@ -30,6 +30,7 @@ import plugily.projects.buildbattle.handlers.themes.vote.VotePoll;
|
||||
import plugily.projects.minigamesbox.api.arena.IArenaState;
|
||||
|
||||
import java.util.*;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
/**
|
||||
* @author Tigerpanzer_02
|
||||
@@ -89,7 +90,7 @@ public class BuildArena extends BaseArena {
|
||||
|
||||
@Override
|
||||
public void distributePlots() {
|
||||
int neededPlots = getPlayers().size() / getArenaOption("PLOT_MEMBER_SIZE");
|
||||
int neededPlots = getPlayersLeft().size() / getArenaOption("PLOT_MEMBER_SIZE");
|
||||
if(getPlotManager().getPlots().size() < neededPlots) {
|
||||
getPlugin().getMessageUtils().errorOccurred();
|
||||
getPlugin().getDebugger().sendConsoleMsg("&c[Build Battle] [PLOT WARNING] Not enough plots in arena " + getId() + "! Lacks " + (neededPlots - getPlotManager().getPlots().size()) + " plots");
|
||||
@@ -111,23 +112,27 @@ public class BuildArena extends BaseArena {
|
||||
}
|
||||
break;
|
||||
case TEAM:
|
||||
for(Player player : getPlayers()) {
|
||||
// get base with min players
|
||||
Plot minPlayers = getPlotManager().getPlots().stream().min(Comparator.comparing(Plot::getMembersSize)).get();
|
||||
// add player to min base if he got no base
|
||||
Plot playerPlot = getPlotManager().getPlot(player);
|
||||
if(playerPlot == null) {
|
||||
minPlayers.addMember(player, this, true);
|
||||
}
|
||||
// fallback
|
||||
if(playerPlot == null) {
|
||||
getPlotManager().getPlots().get(0).addMember(player, this, true);
|
||||
int plotMemberSize = getArenaOption("PLOT_MEMBER_SIZE");
|
||||
int neededDividedPlots = getPlayersLeft().size() / plotMemberSize;
|
||||
int currentDividedPlots = (int) getPlotManager().getPlots().stream().filter(plot -> plot.getMembersSize() > 0).count();
|
||||
|
||||
|
||||
if(neededDividedPlots > currentDividedPlots) {
|
||||
List<Plot> fullPlots = getPlotManager().getPlots().stream().filter(plot -> plot.getMembersSize() == plotMemberSize).collect(Collectors.toList());
|
||||
List<Player> playersToMove = getPlayersLeft().stream().filter(player -> fullPlots.stream().noneMatch(plot -> plot.getMembers().contains(player))).collect(Collectors.toList());
|
||||
if(!playersToMove.isEmpty()) {
|
||||
for(int i = 0; i < playersToMove.size(); i++) {
|
||||
Player move = playersToMove.get(i);
|
||||
List<Plot> emptyPlots = getPlotManager().getPlots().stream().filter(plot -> plot.getMembersSize() < plotMemberSize).collect(Collectors.toList());
|
||||
Plot maxEmptyPlot = emptyPlots.stream().max(Comparator.comparing(Plot::getMembersSize)).get();
|
||||
maxEmptyPlot.addMember(move, this, true);
|
||||
}
|
||||
}
|
||||
}
|
||||
//check if not only one plot got players
|
||||
Plot maxPlayers = getPlotManager().getPlots().stream().max(Comparator.comparing(Plot::getMembersSize)).get();
|
||||
Plot minPlayers = getPlotManager().getPlots().stream().min(Comparator.comparing(Plot::getMembersSize)).get();
|
||||
if(maxPlayers.getMembersSize() == getPlayers().size()) {
|
||||
if(maxPlayers.getMembersSize() == getPlayersLeft().size()) {
|
||||
for(int i = 0; i < maxPlayers.getMembersSize() / 2; i++) {
|
||||
Player move = maxPlayers.getMembers().get(i);
|
||||
minPlayers.addMember(move, this, true);
|
||||
@@ -149,14 +154,14 @@ public class BuildArena extends BaseArena {
|
||||
|
||||
@Override
|
||||
public boolean enoughPlayersToContinue() {
|
||||
int size = getPlayers().size();
|
||||
int size = getPlayersLeft().size();
|
||||
int memberSize = getArenaOption("PLOT_MEMBER_SIZE");
|
||||
|
||||
if(size > memberSize) {
|
||||
return true;
|
||||
}
|
||||
if(size == memberSize) {
|
||||
return !new HashSet<>(getPlotManager().getPlot(getPlayersLeft().get(0)).getMembers()).containsAll(getPlayers());
|
||||
return !new HashSet<>(getPlotManager().getPlot(getPlayersLeft().get(0)).getMembers()).containsAll(getPlayersLeft());
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -76,8 +76,8 @@ public class GuessArena extends BaseArena {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void distributePlots() {
|
||||
int neededPlots = getPlayers().size() / plotMemberSize;
|
||||
public void distributePlots() {
|
||||
int neededPlots = getPlayersLeft().size() / plotMemberSize;
|
||||
if(getPlotManager().getPlots().size() < neededPlots) {
|
||||
getPlugin().getMessageUtils().errorOccurred();
|
||||
getPlugin().getDebugger().sendConsoleMsg("&c[Build Battle] [PLOT WARNING] Not enough plots in arena " + getId() + "! Lacks " + (neededPlots - getPlotManager().getPlots().size()) + " plots");
|
||||
@@ -108,13 +108,13 @@ public class GuessArena extends BaseArena {
|
||||
|
||||
@Override
|
||||
public boolean enoughPlayersToContinue() {
|
||||
int size = getPlayers().size();
|
||||
int size = getPlayersLeft().size();
|
||||
|
||||
if(size > plotMemberSize) {
|
||||
return true;
|
||||
}
|
||||
if(size == plotMemberSize) {
|
||||
return !new HashSet<>(getPlotManager().getPlot(getPlayersLeft().get(0)).getMembers()).containsAll(getPlayers());
|
||||
return !new HashSet<>(getPlotManager().getPlot(getPlayersLeft().get(0)).getMembers()).containsAll(getPlayersLeft());
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -23,14 +23,12 @@ package plugily.projects.buildbattle.arena.managers;
|
||||
import org.bukkit.entity.Player;
|
||||
import plugily.projects.buildbattle.arena.BaseArena;
|
||||
import plugily.projects.buildbattle.arena.GuessArena;
|
||||
import plugily.projects.minigamesbox.api.arena.IPluginArena;
|
||||
import plugily.projects.minigamesbox.api.user.IUser;
|
||||
import plugily.projects.minigamesbox.api.arena.IArenaState;
|
||||
import plugily.projects.minigamesbox.classic.arena.PluginArena;
|
||||
import plugily.projects.minigamesbox.classic.arena.managers.PluginScoreboardManager;
|
||||
import plugily.projects.minigamesbox.classic.handlers.language.MessageBuilder;
|
||||
import plugily.projects.minigamesbox.classic.utils.scoreboard.common.EntryBuilder;
|
||||
import plugily.projects.minigamesbox.classic.utils.scoreboard.type.Entry;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
@@ -47,47 +45,33 @@ public class ScoreboardManager extends PluginScoreboardManager {
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<Entry> formatScoreboard(IUser user) {
|
||||
EntryBuilder builder = new EntryBuilder();
|
||||
public List<String> getScoreboardLines(Player player) {
|
||||
List<String> lines;
|
||||
IPluginArena userArena = user.getArena();
|
||||
|
||||
switch (userArena.getArenaState()) {
|
||||
case FULL_GAME: {
|
||||
lines = userArena.getPlugin().getLanguageManager().getLanguageList("Scoreboard.Content.Starting");
|
||||
break;
|
||||
}
|
||||
switch(arena.getArenaState()) {
|
||||
case IN_GAME: {
|
||||
if(userArena instanceof GuessArena) {
|
||||
lines = userArena.getPlugin().getLanguageManager().getLanguageList("Scoreboard.Content." + userArena.getArenaState().getFormattedName() + ".Guess-The-Build" + (((GuessArena) userArena).getArenaInGameState() == BaseArena.ArenaInGameState.PLOT_VOTING ? "-Waiting" : ""));
|
||||
if(arena instanceof GuessArena) {
|
||||
lines = arena.getPlugin().getLanguageManager().getLanguageList("Scoreboard.Content." + arena.getArenaState().getFormattedName() + ".Guess-The-Build" + (((GuessArena) arena).getArenaInGameState() == BaseArena.ArenaInGameState.PLOT_VOTING ? "-Waiting" : ""));
|
||||
} else {
|
||||
if(userArena.getArenaOption("PLOT_MEMBER_SIZE") <= 1) {
|
||||
lines = userArena.getPlugin().getLanguageManager().getLanguageList("Scoreboard.Content." + userArena.getArenaState().getFormattedName() + ".Classic");
|
||||
if(arena.getArenaOption("PLOT_MEMBER_SIZE") <= 1) {
|
||||
lines = arena.getPlugin().getLanguageManager().getLanguageList("Scoreboard.Content." + arena.getArenaState().getFormattedName() + ".Classic");
|
||||
} else {
|
||||
lines = userArena.getPlugin().getLanguageManager().getLanguageList("Scoreboard.Content." + userArena.getArenaState().getFormattedName() + ".Teams");
|
||||
lines = arena.getPlugin().getLanguageManager().getLanguageList("Scoreboard.Content." + arena.getArenaState().getFormattedName() + ".Teams");
|
||||
}
|
||||
}
|
||||
break;
|
||||
}
|
||||
case ENDING: {
|
||||
if(userArena instanceof GuessArena) {
|
||||
lines = userArena.getPlugin().getLanguageManager().getLanguageList("Scoreboard.Content." + userArena.getArenaState().getFormattedName() + ".Guess-The-Build");
|
||||
if(arena instanceof GuessArena) {
|
||||
lines = arena.getPlugin().getLanguageManager().getLanguageList("Scoreboard.Content." + arena.getArenaState().getFormattedName() + ".Guess-The-Build");
|
||||
} else {
|
||||
lines = userArena.getPlugin().getLanguageManager().getLanguageList("Scoreboard.Content." + userArena.getArenaState().getFormattedName() + ".Classic");
|
||||
lines = arena.getPlugin().getLanguageManager().getLanguageList("Scoreboard.Content." + arena.getArenaState().getFormattedName() + ".Classic");
|
||||
}
|
||||
break;
|
||||
}
|
||||
default: {
|
||||
lines = userArena.getPlugin().getLanguageManager().getLanguageList("Scoreboard.Content." + userArena.getArenaState().getFormattedName());
|
||||
lines = super.getScoreboardLines(player);
|
||||
}
|
||||
}
|
||||
|
||||
Player player = user.getPlayer();
|
||||
|
||||
for(String line : lines) {
|
||||
builder.next(new MessageBuilder(line).player(player).arena(arena).build());
|
||||
}
|
||||
return builder.build();
|
||||
return lines;
|
||||
}
|
||||
|
||||
}
|
||||
+17
-3
@@ -35,6 +35,8 @@ import plugily.projects.minigamesbox.classic.utils.version.VersionUtils;
|
||||
import plugily.projects.minigamesbox.classic.utils.version.xseries.XMaterial;
|
||||
import plugily.projects.minigamesbox.inventory.common.item.SimpleClickableItem;
|
||||
import plugily.projects.minigamesbox.inventory.normal.NormalFastInv;
|
||||
import plugily.projects.minigamesbox.inventory.utils.fastinv.InventoryScheme;
|
||||
import plugily.projects.minigamesbox.inventory.utils.fastinv.PaginatedFastInv;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
@@ -79,10 +81,22 @@ public final class PlotMenuHandler {
|
||||
}
|
||||
|
||||
public void createMenu(Player player, BaseArena arena) {
|
||||
NormalFastInv gui = new NormalFastInv(plugin.getBukkitHelper().serializeInt(arena.getPlotManager().getPlots().size()), new MessageBuilder("IN_GAME_MESSAGES_PLOT_SELECTOR_MENU_NAME").asKey().build());
|
||||
PaginatedFastInv gui = new PaginatedFastInv(27, new MessageBuilder("IN_GAME_MESSAGES_PLOT_SELECTOR_MENU_NAME").asKey().build());
|
||||
new InventoryScheme()
|
||||
.mask(" 1111111 ")
|
||||
.mask(" 1111111 ")
|
||||
.bindPagination('1').apply(gui);
|
||||
|
||||
|
||||
int plots = 0;
|
||||
int arenaPlotMemberSize = arena.getArenaOption("PLOT_MEMBER_SIZE");
|
||||
|
||||
gui.previousPageItem(20, p -> new ItemBuilder(XMaterial.ARROW.parseItem()).name("<- " + p + "/" + gui.lastPage()).build());
|
||||
gui.nextPageItem(24, p -> new ItemBuilder(XMaterial.ARROW.parseItem()).name(p + "/" + gui.lastPage() + " ->").build());
|
||||
|
||||
gui.setItem(22, new ItemBuilder(XMaterial.BARRIER.parseItem()).name("X").build(),
|
||||
e -> e.getWhoClicked().closeInventory());
|
||||
|
||||
for(Plot plot : arena.getPlotManager().getPlots()) {
|
||||
ItemStack itemStack = getItemStack(plot, arenaPlotMemberSize, player);
|
||||
int plotMemberSize = plot.getMembersSize();
|
||||
@@ -127,7 +141,7 @@ public final class PlotMenuHandler {
|
||||
});
|
||||
|
||||
int finalPlots = plots;
|
||||
gui.addItem(new SimpleClickableItem(itemStack, event -> {
|
||||
gui.addContent(itemStack, event -> {
|
||||
event.setCancelled(true);
|
||||
|
||||
if(!(event.isLeftClick() || event.isRightClick())) {
|
||||
@@ -143,7 +157,7 @@ public final class PlotMenuHandler {
|
||||
|
||||
new MessageBuilder("IN_GAME_MESSAGES_PLOT_SELECTOR_PLOT_CHOOSE").asKey().player(player).integer(finalPlots).sendPlayer();
|
||||
event.getWhoClicked().closeInventory();
|
||||
}));
|
||||
});
|
||||
|
||||
plots++;
|
||||
}
|
||||
|
||||
@@ -63,11 +63,13 @@ public class InGameState extends PluginInGameState {
|
||||
new MessageBuilder("IN_GAME_MESSAGES_PLOT_GTB_THEME_NAME").asKey().arena(pluginArena).sendArena();
|
||||
}
|
||||
|
||||
for(Player player : pluginArena.getPlayers()) {
|
||||
for(Player player : pluginArena.getPlayersLeft()) {
|
||||
player.closeInventory();
|
||||
player.setGameMode(GameMode.CREATIVE);
|
||||
VersionUtils.setCollidable(player, false);
|
||||
}
|
||||
// second time after voting as sometimes world switch causing no teleportation!
|
||||
pluginArena.getPlotManager().teleportToPlots();
|
||||
} else {
|
||||
handleThemeVoting(pluginArena);
|
||||
}
|
||||
@@ -75,12 +77,11 @@ public class InGameState extends PluginInGameState {
|
||||
break;
|
||||
case BUILD_TIME:
|
||||
handleBuildTime(pluginArena);
|
||||
handleOptionsMenu(pluginArena);
|
||||
if(arena.getTimer() <= 0) {
|
||||
for(Player player : pluginArena.getPlayersLeft()) {
|
||||
IUser user = getPlugin().getUserManager().getUser(player);
|
||||
|
||||
if(user.isSpectator()) continue;
|
||||
|
||||
Plot playerPlot = pluginArena.getPlotFromPlayer(player);
|
||||
if(!pluginArena.getQueue().contains(playerPlot)) {
|
||||
pluginArena.getQueue().add(playerPlot);
|
||||
@@ -180,7 +181,7 @@ public class InGameState extends PluginInGameState {
|
||||
}
|
||||
|
||||
private void handleThemeVoting(BuildArena pluginArena) {
|
||||
for(Player player : pluginArena.getPlayers()) {
|
||||
for(Player player : pluginArena.getPlayersLeft()) {
|
||||
pluginArena.getVoteMenu().updateInventory(player);
|
||||
}
|
||||
}
|
||||
@@ -196,6 +197,15 @@ public class InGameState extends PluginInGameState {
|
||||
pluginArena.checkPlayerOutSidePlot();
|
||||
}
|
||||
|
||||
private void handleOptionsMenu(BuildArena pluginArena) {
|
||||
if(pluginArena.getTimer() % 10 != 0) {
|
||||
return;
|
||||
}
|
||||
for(Player player : pluginArena.getPlayersLeft()) {
|
||||
pluginArena.getPlugin().getSpecialItemManager().getSpecialItem("OPTIONS_MENU").setItem(player);
|
||||
}
|
||||
}
|
||||
|
||||
private void handlePlotVoting(BuildArena pluginArena) {
|
||||
|
||||
}
|
||||
@@ -268,7 +278,7 @@ public class InGameState extends PluginInGameState {
|
||||
String formattedMembers = plot.getFormattedMembers();
|
||||
boolean hidePlotOwner = getPlugin().getConfigPreferences().getOption("PLOT_HIDE_OWNER");
|
||||
|
||||
for(Player player : pluginArena.getPlayers()) {
|
||||
for(Player player : pluginArena.getPlayersLeft()) {
|
||||
VersionUtils.teleport(player, teleportLoc);
|
||||
player.setPlayerWeather(plot.getWeatherType());
|
||||
player.setPlayerTime(Plot.Time.format(plot.getTime(), player.getWorld().getTime()), false);
|
||||
|
||||
@@ -26,6 +26,7 @@ import org.bukkit.Material;
|
||||
import org.bukkit.entity.HumanEntity;
|
||||
import org.bukkit.entity.Player;
|
||||
import plugily.projects.buildbattle.arena.BaseArena;
|
||||
import plugily.projects.buildbattle.arena.BuildArena;
|
||||
import plugily.projects.buildbattle.arena.GuessArena;
|
||||
import plugily.projects.buildbattle.arena.managers.plots.Plot;
|
||||
import plugily.projects.buildbattle.handlers.themes.BBTheme;
|
||||
@@ -102,6 +103,7 @@ public class InGameState extends PluginInGameState {
|
||||
}
|
||||
//}
|
||||
handleBuildTime(pluginArena);
|
||||
handleOptionsMenu(pluginArena);
|
||||
break;
|
||||
case PLOT_VOTING:
|
||||
if(pluginArena.getRound() + 1 > pluginArena.getPlotList().size() * pluginArena.getArenaOption("GTB_ROUNDS_PER_PLOT")) {
|
||||
@@ -189,6 +191,15 @@ public class InGameState extends PluginInGameState {
|
||||
setChosenTheme(pluginArena, getThemeByDifficulty(pluginArena, difficulty));
|
||||
}
|
||||
|
||||
private void handleOptionsMenu(GuessArena pluginArena) {
|
||||
if(pluginArena.getTimer() % 10 != 0) {
|
||||
return;
|
||||
}
|
||||
for(Player player : pluginArena.getCurrentBuilders()) {
|
||||
pluginArena.getPlugin().getSpecialItemManager().getSpecialItem("OPTIONS_MENU").setItem(player);
|
||||
}
|
||||
}
|
||||
|
||||
private void setChosenTheme(GuessArena pluginArena, BBTheme bbTheme) {
|
||||
setTheme(pluginArena, bbTheme);
|
||||
pluginArena.getCurrentBuilders().forEach(HumanEntity::closeInventory);
|
||||
|
||||
@@ -447,8 +447,8 @@ public class PlaceholderInitializer {
|
||||
return null;
|
||||
}
|
||||
int places = pluginArena.getPlotManager().getTopPlotsOrder().size();
|
||||
if(places > 16) {
|
||||
places = 16;
|
||||
if(places > 20) {
|
||||
places = 20;
|
||||
}
|
||||
StringBuilder placeSummary = new StringBuilder();
|
||||
for(int i = 1; i <= places; i++) {
|
||||
|
||||
+6
-2
@@ -21,6 +21,7 @@
|
||||
package plugily.projects.buildbattle.commands.arguments;
|
||||
|
||||
import plugily.projects.buildbattle.Main;
|
||||
import plugily.projects.buildbattle.arena.BaseArena;
|
||||
import plugily.projects.buildbattle.arena.BuildArena;
|
||||
import plugily.projects.buildbattle.arena.GuessArena;
|
||||
import plugily.projects.buildbattle.commands.arguments.admin.ThemeArgument;
|
||||
@@ -63,10 +64,13 @@ public class ArgumentsRegistry extends PluginArgumentsRegistry {
|
||||
case "guessthebuild":
|
||||
case "guess_the_build":
|
||||
return arenas.stream().filter(GuessArena.class::isInstance).collect(Collectors.toList());
|
||||
case "team":
|
||||
return arenas.stream().filter(BuildArena.class::isInstance).filter(arena -> ((BuildArena) arena).getArenaType().equals(BaseArena.ArenaType.TEAM)).collect(Collectors.toList());
|
||||
case "classic":
|
||||
case "solo":
|
||||
case "team":
|
||||
default:
|
||||
return arenas.stream().filter(BuildArena.class::isInstance).filter(arena -> ((BuildArena) arena).getArenaType().equals(BaseArena.ArenaType.SOLO)).collect(Collectors.toList());
|
||||
case "build":
|
||||
default:
|
||||
return arenas.stream().filter(BuildArena.class::isInstance).collect(Collectors.toList());
|
||||
}
|
||||
}
|
||||
|
||||
@@ -39,6 +39,7 @@ import plugily.projects.minigamesbox.classic.utils.version.xseries.XMaterial;
|
||||
import plugily.projects.minigamesbox.inventory.common.item.ItemMap;
|
||||
import plugily.projects.minigamesbox.inventory.common.item.SimpleClickableItem;
|
||||
import plugily.projects.minigamesbox.inventory.normal.NormalFastInv;
|
||||
import plugily.projects.minigamesbox.inventory.utils.fastinv.PaginatedFastInv;
|
||||
|
||||
import java.util.HashSet;
|
||||
import java.util.Set;
|
||||
@@ -50,147 +51,154 @@ import java.util.Set;
|
||||
*/
|
||||
public class OptionsRegistry {
|
||||
|
||||
private ParticleRegistry particleRegistry;
|
||||
private BiomesRegistry biomesRegistry;
|
||||
private PlayerHeadsRegistry playerHeadsRegistry;
|
||||
private final Set<MenuOption> registeredOptions = new HashSet<>();
|
||||
private int inventorySize = 5 * 9;
|
||||
private final ItemStack menuItem;
|
||||
private final Main plugin;
|
||||
private ParticleRegistry particleRegistry;
|
||||
private BiomesRegistry biomesRegistry;
|
||||
private PlayerHeadsRegistry playerHeadsRegistry;
|
||||
private final Set<MenuOption> registeredOptions = new HashSet<>();
|
||||
private int inventorySize = 5 * 9;
|
||||
private final ItemStack menuItem;
|
||||
private final Main plugin;
|
||||
|
||||
private NormalFastInv optionsGui;
|
||||
private NormalFastInv optionsGui;
|
||||
|
||||
public OptionsRegistry(Main plugin) {
|
||||
this.plugin = plugin;
|
||||
this.menuItem = plugin.getSpecialItemManager().getSpecialItemStack("OPTIONS_MENU");
|
||||
public OptionsRegistry(Main plugin) {
|
||||
this.plugin = plugin;
|
||||
this.menuItem = plugin.getSpecialItemManager().getSpecialItemStack("OPTIONS_MENU");
|
||||
}
|
||||
|
||||
public void registerOptions() {
|
||||
biomesRegistry = new BiomesRegistry(this);
|
||||
new BiomeChangeOption(this);
|
||||
|
||||
new FloorChangeOption(this);
|
||||
|
||||
//register particles
|
||||
particleRegistry = new ParticleRegistry(this);
|
||||
new ParticlesOption(this);
|
||||
|
||||
//register player heads
|
||||
playerHeadsRegistry = new PlayerHeadsRegistry(this);
|
||||
new PlayerHeadsOption(this);
|
||||
|
||||
new PlotResetOption(this);
|
||||
new TimeChangeOption(this);
|
||||
new WeatherChangeOption(this);
|
||||
new BannerCreatorOption(this);
|
||||
}
|
||||
|
||||
/**
|
||||
* Registers new menu option available in options menu in game.
|
||||
*
|
||||
* @param option option to register
|
||||
* @throws IllegalArgumentException if option slot is same as one of already registered ones
|
||||
* or ID of option is same as one of registered one
|
||||
*/
|
||||
public void registerOption(MenuOption option) {
|
||||
for(MenuOption opt : registeredOptions) {
|
||||
if(opt.getSlot() == option.getSlot()) {
|
||||
throw new IllegalArgumentException("Cannot register new option on existing option slot!");
|
||||
}
|
||||
if(opt.getID().equals(option.getID())) {
|
||||
throw new IllegalArgumentException("Cannot register new option with equal identifier!");
|
||||
}
|
||||
}
|
||||
registeredOptions.add(option);
|
||||
}
|
||||
|
||||
public void registerOptions() {
|
||||
biomesRegistry = new BiomesRegistry(this);
|
||||
new BiomeChangeOption(this);
|
||||
|
||||
new FloorChangeOption(this);
|
||||
|
||||
//register particles
|
||||
particleRegistry = new ParticleRegistry(this);
|
||||
new ParticlesOption(this);
|
||||
|
||||
//register player heads
|
||||
playerHeadsRegistry = new PlayerHeadsRegistry(this);
|
||||
new PlayerHeadsOption(this);
|
||||
|
||||
new PlotResetOption(this);
|
||||
new TimeChangeOption(this);
|
||||
new WeatherChangeOption(this);
|
||||
new BannerCreatorOption(this);
|
||||
/**
|
||||
* Unregisters menu option that available in options menu
|
||||
*
|
||||
* @param option option to unregister
|
||||
* @throws IllegalArgumentException if option doesn't exist
|
||||
*/
|
||||
public void unregisterOption(MenuOption option) {
|
||||
if(!registeredOptions.remove(option)) {
|
||||
throw new IllegalArgumentException("Cannot remove non existing option!");
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Registers new menu option available in options menu in game.
|
||||
*
|
||||
* @param option option to register
|
||||
* @throws IllegalArgumentException if option slot is same as one of already registered ones
|
||||
* or ID of option is same as one of registered one
|
||||
*/
|
||||
public void registerOption(MenuOption option) {
|
||||
for (MenuOption opt : registeredOptions) {
|
||||
if (opt.getSlot() == option.getSlot()) {
|
||||
throw new IllegalArgumentException("Cannot register new option on existing option slot!");
|
||||
}
|
||||
if (opt.getID().equals(option.getID())) {
|
||||
throw new IllegalArgumentException("Cannot register new option with equal identifier!");
|
||||
}
|
||||
}
|
||||
registeredOptions.add(option);
|
||||
/**
|
||||
* Defines new size of options inventory
|
||||
*
|
||||
* @param size size to set
|
||||
*/
|
||||
public void defineInventorySize(int size) {
|
||||
inventorySize = size;
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates inventory with all of registered menu options
|
||||
*
|
||||
* @return options inventory
|
||||
*/
|
||||
public NormalFastInv getOptionsGui() {
|
||||
if(optionsGui != null)
|
||||
return optionsGui;
|
||||
NormalFastInv gui = new NormalFastInv(inventorySize, new MessageBuilder("MENU_OPTION_INVENTORY").asKey().build());
|
||||
gui.addClickHandler(clickEvent -> {
|
||||
if(clickEvent.getClickedInventory() != gui.getInventory()) {
|
||||
clickEvent.setCancelled(false);
|
||||
}
|
||||
});
|
||||
for(MenuOption option : registeredOptions) {
|
||||
gui.setItem(option.getSlot(), new SimpleClickableItem(option.getItemStack(), option::onClick));
|
||||
}
|
||||
return optionsGui = gui;
|
||||
}
|
||||
|
||||
/**
|
||||
* Unregisters menu option that available in options menu
|
||||
*
|
||||
* @param option option to unregister
|
||||
* @throws IllegalArgumentException if option doesn't exist
|
||||
*/
|
||||
public void unregisterOption(MenuOption option) {
|
||||
if (!registeredOptions.remove(option)) {
|
||||
throw new IllegalArgumentException("Cannot remove non existing option!");
|
||||
}
|
||||
public Set<MenuOption> getRegisteredOptions() {
|
||||
return registeredOptions;
|
||||
}
|
||||
|
||||
public ItemStack getMenuItem() {
|
||||
return menuItem;
|
||||
}
|
||||
|
||||
public BiomesRegistry getBiomesRegistry() {
|
||||
return biomesRegistry;
|
||||
}
|
||||
|
||||
public PlayerHeadsRegistry getPlayerHeadsRegistry() {
|
||||
return playerHeadsRegistry;
|
||||
}
|
||||
|
||||
public ParticleRegistry getParticleRegistry() {
|
||||
return particleRegistry;
|
||||
}
|
||||
|
||||
public Main getPlugin() {
|
||||
return plugin;
|
||||
}
|
||||
|
||||
private ItemBuilder backButton;
|
||||
|
||||
private SimpleClickableItem getBackItem() {
|
||||
if(backButton == null) {
|
||||
backButton = new ItemBuilder(XMaterial.STONE_BUTTON.parseItem())
|
||||
.name(new MessageBuilder("MENU_BUTTONS_BACK_ITEM_NAME").asKey().build())
|
||||
.lore(new MessageBuilder("MENU_BUTTONS_BACK_ITEM_LORE").asKey().build());
|
||||
}
|
||||
return new SimpleClickableItem(backButton.build(), event -> {
|
||||
event.setCancelled(true);
|
||||
event.getWhoClicked().closeInventory();
|
||||
getOptionsGui().open(event.getWhoClicked());
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Defines new size of options inventory
|
||||
*
|
||||
* @param size size to set
|
||||
*/
|
||||
public void defineInventorySize(int size) {
|
||||
inventorySize = size;
|
||||
}
|
||||
public void addGoBackItem(ItemMap page, int slot) {
|
||||
page.setItem(slot, getBackItem());
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates inventory with all of registered menu options
|
||||
*
|
||||
* @return options inventory
|
||||
*/
|
||||
public NormalFastInv getOptionsGui() {
|
||||
if (optionsGui != null)
|
||||
return optionsGui;
|
||||
NormalFastInv gui = new NormalFastInv(inventorySize, new MessageBuilder("MENU_OPTION_INVENTORY").asKey().build());
|
||||
gui.addClickHandler(clickEvent -> {
|
||||
if (clickEvent.getClickedInventory() != gui.getInventory()) {
|
||||
clickEvent.setCancelled(false);
|
||||
}
|
||||
});
|
||||
for (MenuOption option : registeredOptions) {
|
||||
gui.setItem(option.getSlot(), new SimpleClickableItem(option.getItemStack(), option::onClick));
|
||||
}
|
||||
return optionsGui = gui;
|
||||
}
|
||||
|
||||
public Set<MenuOption> getRegisteredOptions() {
|
||||
return registeredOptions;
|
||||
}
|
||||
|
||||
public ItemStack getMenuItem() {
|
||||
return menuItem;
|
||||
}
|
||||
|
||||
public BiomesRegistry getBiomesRegistry() {
|
||||
return biomesRegistry;
|
||||
}
|
||||
|
||||
public PlayerHeadsRegistry getPlayerHeadsRegistry() {
|
||||
return playerHeadsRegistry;
|
||||
}
|
||||
|
||||
public ParticleRegistry getParticleRegistry() {
|
||||
return particleRegistry;
|
||||
}
|
||||
|
||||
public Main getPlugin() {
|
||||
return plugin;
|
||||
}
|
||||
|
||||
private ItemBuilder backButton;
|
||||
|
||||
private SimpleClickableItem getBackItem() {
|
||||
if (backButton == null) {
|
||||
backButton = new ItemBuilder(XMaterial.STONE_BUTTON.parseItem())
|
||||
.name(new MessageBuilder("MENU_BUTTONS_BACK_ITEM_NAME").asKey().build())
|
||||
.lore(new MessageBuilder("MENU_BUTTONS_BACK_ITEM_LORE").asKey().build());
|
||||
}
|
||||
return new SimpleClickableItem(backButton.build(), event -> {
|
||||
event.setCancelled(true);
|
||||
event.getWhoClicked().closeInventory();
|
||||
getOptionsGui().open(event.getWhoClicked());
|
||||
});
|
||||
}
|
||||
|
||||
public void addGoBackItem(ItemMap page, int slot) {
|
||||
page.setItem(slot, getBackItem());
|
||||
}
|
||||
|
||||
public void addGoBackItem(NormalFastInv gui, int slot) {
|
||||
gui.setItem(slot, getBackItem());
|
||||
}
|
||||
public void addGoBackItem(NormalFastInv gui, int slot) {
|
||||
gui.setItem(slot, getBackItem());
|
||||
}
|
||||
|
||||
public void addGoBackItem(PaginatedFastInv gui, int slot) {
|
||||
gui.setItem(slot, backButton.build(), event -> {
|
||||
event.setCancelled(true);
|
||||
event.getWhoClicked().closeInventory();
|
||||
getOptionsGui().open(event.getWhoClicked());
|
||||
});
|
||||
}
|
||||
|
||||
}
|
||||
+28
-46
@@ -35,9 +35,8 @@ import plugily.projects.minigamesbox.classic.utils.configuration.ConfigUtils;
|
||||
import plugily.projects.minigamesbox.classic.utils.helper.ItemBuilder;
|
||||
import plugily.projects.minigamesbox.classic.utils.version.VersionUtils;
|
||||
import plugily.projects.minigamesbox.classic.utils.version.xseries.XMaterial;
|
||||
import plugily.projects.minigamesbox.inventory.common.item.ItemMap;
|
||||
import plugily.projects.minigamesbox.inventory.common.item.SimpleClickableItem;
|
||||
import plugily.projects.minigamesbox.inventory.paged.PagedFastInv;
|
||||
import plugily.projects.minigamesbox.inventory.utils.fastinv.InventoryScheme;
|
||||
import plugily.projects.minigamesbox.inventory.utils.fastinv.PaginatedFastInv;
|
||||
|
||||
import java.util.*;
|
||||
|
||||
@@ -49,7 +48,7 @@ import java.util.*;
|
||||
*/
|
||||
public class ParticleRegistry {
|
||||
|
||||
private PagedFastInv particles;
|
||||
private PaginatedFastInv particles;
|
||||
private final List<String> blackListedParticles = Arrays.asList("BLOCK_CRACK", "ITEM_CRACK", "ITEM_TAKE", "BLOCK_DUST", "MOB_APPEARANCE", "FOOTSTEP", "REDSTONE");
|
||||
private final Set<ParticleItem> registeredParticles = new HashSet<>();
|
||||
private final Main plugin;
|
||||
@@ -114,46 +113,23 @@ public class ParticleRegistry {
|
||||
}
|
||||
|
||||
private void registerInventory() {
|
||||
int i = 0;
|
||||
Set<ParticleItem> particleItemsPage1 = new HashSet<>(registeredParticles.size());
|
||||
Set<ParticleItem> particleItemsPage2 = new HashSet<>();
|
||||
PaginatedFastInv gui = new PaginatedFastInv(54, new MessageBuilder("MENU_OPTION_CONTENT_PARTICLE_INVENTORY").asKey().build());
|
||||
|
||||
for(ParticleItem item : registeredParticles) {
|
||||
(i >= 45 ? particleItemsPage2 : particleItemsPage1).add(item);
|
||||
i++;
|
||||
}
|
||||
new InventoryScheme()
|
||||
.mask(" 1111111 ")
|
||||
.mask(" 1111111 ")
|
||||
.mask(" 1111111 ")
|
||||
.mask(" 1111111 ")
|
||||
.bindPagination('1').apply(gui);
|
||||
|
||||
PagedFastInv gui = new PagedFastInv(54, new MessageBuilder("MENU_OPTION_CONTENT_PARTICLE_INVENTORY").asKey().build());
|
||||
|
||||
gui.setForceRefresh(true);
|
||||
gui.previousPageItem(45, p -> new ItemBuilder(XMaterial.ARROW.parseItem()).name("<- " + p + "/" + gui.lastPage()).build());
|
||||
gui.nextPageItem(53, p -> new ItemBuilder(XMaterial.ARROW.parseItem()).name(p + "/" + gui.lastPage() + " ->").build());
|
||||
|
||||
ItemMap page1 = gui.createNewPage();
|
||||
ItemMap page2 = gui.createNewPage();
|
||||
gui.setItem(52, new ItemBuilder(XMaterial.BARRIER.parseItem()).name("X").build(),
|
||||
e -> e.getWhoClicked().closeInventory());
|
||||
|
||||
page2.setItem(45, new SimpleClickableItem(new ItemBuilder(new ItemStack(XMaterial.ARROW.parseMaterial())).name("<-").build(), event -> {
|
||||
gui.setCurrentPage(0);
|
||||
gui.refresh();
|
||||
}));
|
||||
page1.setItem(53, new SimpleClickableItem(new ItemBuilder(new ItemStack(XMaterial.ARROW.parseMaterial())).name("->").build(), event -> {
|
||||
gui.setCurrentPage(1);
|
||||
gui.refresh();
|
||||
}));
|
||||
|
||||
addParticles(page1, particleItemsPage1);
|
||||
addParticles(page2, particleItemsPage2);
|
||||
|
||||
addRemoveItem(page1);
|
||||
addRemoveItem(page2);
|
||||
setParticles(gui);
|
||||
|
||||
plugin.getOptionsRegistry().addGoBackItem(page1, 46);
|
||||
plugin.getOptionsRegistry().addGoBackItem(page2, 46);
|
||||
|
||||
gui.refresh();
|
||||
}
|
||||
|
||||
private void addRemoveItem(ItemMap itemMap) {
|
||||
itemMap.setItem(49, new SimpleClickableItem(new ItemBuilder(new ItemStack(Material.REDSTONE_BLOCK))
|
||||
gui.setItem(49, new ItemBuilder(new ItemStack(Material.REDSTONE_BLOCK))
|
||||
.name(new MessageBuilder("MENU_OPTION_CONTENT_PARTICLE_ITEM_REMOVE_NAME").asKey().build())
|
||||
.lore(Collections.singletonList(new MessageBuilder("MENU_OPTION_CONTENT_PARTICLE_ITEM_REMOVE_LORE").asKey().build()))
|
||||
.build(), event -> {
|
||||
@@ -170,12 +146,18 @@ public class ParticleRegistry {
|
||||
event.setCancelled(false);
|
||||
player.closeInventory();
|
||||
ParticleRemoveMenu.openMenu(player, arena.getPlotManager().getPlot(player));
|
||||
}));
|
||||
});
|
||||
|
||||
plugin.getOptionsRegistry().addGoBackItem(gui, 46);
|
||||
|
||||
addParticles(gui);
|
||||
|
||||
setParticles(gui);
|
||||
}
|
||||
|
||||
private void addParticles(ItemMap itemMap, Set<ParticleItem> particleItems) {
|
||||
for(ParticleItem item : particleItems) {
|
||||
itemMap.addItem(new SimpleClickableItem(item.getItemStack(), event -> {
|
||||
private void addParticles(PaginatedFastInv gui) {
|
||||
for(ParticleItem item : registeredParticles) {
|
||||
gui.addContent(item.getItemStack(), event -> {
|
||||
HumanEntity humanEntity = event.getWhoClicked();
|
||||
|
||||
if(!(humanEntity instanceof Player))
|
||||
@@ -198,15 +180,15 @@ public class ParticleRegistry {
|
||||
plot.getParticles().put(player.getLocation(), item.getEffect());
|
||||
plugin.getUserManager().getUser(player).adjustStatistic("PARTICLES_USED", 1);
|
||||
new MessageBuilder("MENU_OPTION_CONTENT_PARTICLE_ADDED").asKey().player(player).sendPlayer();
|
||||
}));
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
public PagedFastInv getParticles() {
|
||||
public PaginatedFastInv getParticles() {
|
||||
return particles;
|
||||
}
|
||||
|
||||
public void setParticles(PagedFastInv particles) {
|
||||
public void setParticles(PaginatedFastInv particles) {
|
||||
this.particles = particles;
|
||||
}
|
||||
|
||||
|
||||
+1
-1
@@ -52,7 +52,7 @@ public class ParticlesOption {
|
||||
}
|
||||
|
||||
humanEntity.closeInventory();
|
||||
registry.getPlugin().getOptionsRegistry().getParticleRegistry().getParticles().open(humanEntity);
|
||||
registry.getPlugin().getOptionsRegistry().getParticleRegistry().getParticles().open(((Player) humanEntity));
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
@@ -21,7 +21,6 @@
|
||||
package plugily.projects.buildbattle.handlers.themes.vote;
|
||||
|
||||
import org.bukkit.Material;
|
||||
import org.bukkit.enchantments.Enchantment;
|
||||
import org.bukkit.entity.HumanEntity;
|
||||
import org.bukkit.entity.Player;
|
||||
import org.bukkit.event.inventory.InventoryClickEvent;
|
||||
@@ -37,6 +36,7 @@ import plugily.projects.minigamesbox.api.arena.IArenaState;
|
||||
import plugily.projects.minigamesbox.api.user.IUser;
|
||||
import plugily.projects.minigamesbox.classic.handlers.language.MessageBuilder;
|
||||
import plugily.projects.minigamesbox.classic.utils.helper.ItemBuilder;
|
||||
import plugily.projects.minigamesbox.classic.utils.version.xseries.XEnchantment;
|
||||
import plugily.projects.minigamesbox.classic.utils.version.xseries.XMaterial;
|
||||
import plugily.projects.minigamesbox.inventory.common.item.ClickableItem;
|
||||
import plugily.projects.minigamesbox.inventory.common.item.SimpleClickableItem;
|
||||
@@ -183,7 +183,7 @@ public class VoteMenu {
|
||||
ItemBuilder itemBuilder = new ItemBuilder(clickableSignItem.getItem()).removeLore();
|
||||
itemBuilder.lore(new MessageBuilder("MENU_THEME_ITEM_LORE").asKey().arena(arena).value(theme).integer((int) percent).build().split(";"));
|
||||
if(theme.equals(playerVote)) {
|
||||
itemBuilder.enchantment(Enchantment.UNBREAKING, 1).flags(ItemFlag.HIDE_ENCHANTS);
|
||||
itemBuilder.enchantment(XEnchantment.UNBREAKING.get(), 1).flags(ItemFlag.HIDE_ENCHANTS);
|
||||
} else {
|
||||
itemBuilder.removeEnchants().removeFlags();
|
||||
}
|
||||
|
||||
@@ -10,6 +10,7 @@
|
||||
# Available localizations:
|
||||
# default - English language. Uses 'language.yml'.
|
||||
# See https://github.com/Plugily-Projects/locale_storage/tree/master/plugins/minecraft/buildbattle
|
||||
# Help us translate the project -> https://translate.plugily.xyz
|
||||
# Use filename of the language e.g. de_DE.yml -> locale: de_DE
|
||||
locale: default
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
name: ${description}
|
||||
name: BuildBattle
|
||||
main: plugily.projects.buildbattle.Main
|
||||
authors: [ PlugilyProjects, Tigerpanzer_02, Tigerpanzer, Plajer, TomTheDeveloper ]
|
||||
version: ${version}
|
||||
|
||||
Reference in new issue
Block a user