mirror of
https://github.com/Plugily-Projects/BuildBattle.git
synced 2026-11-04 16:40:09 -05:00
Compare commits
No files matched your search
@@ -10,6 +10,34 @@ deploy webhooks to print changelog successfully
|
||||
|
||||
That's all, matcher will stop when detects next line started with `###` match
|
||||
|
||||
### 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
|
||||
* Fixed gtb Arena CleanUp which results in first round issues at selection of theme etc.
|
||||
* Fixed gtb options menu is not showing up for every builder
|
||||
* Fixed block destroy drops
|
||||
* Fixed a bug on gtb where players were getting points for guess even when they wrote the theme on chat when it was already shown by the plugin
|
||||
* Fixed spectator counts on gtb guess
|
||||
* Fixed bba settheme command
|
||||
* Fixed PlayerHeads on 1.20+
|
||||
* Fixed clearing of dropped items on 1.21+
|
||||
* Fixed Biomes on 1.21
|
||||
* Fixed Banner Building on 1.20+
|
||||
* Fixed Creature Spawning outside plots in same world
|
||||
* Fixed players are collidable on normal mode
|
||||
* Changed stained glass pane naming to ???
|
||||
* Updated to minigamesbox 1.3.16
|
||||
|
||||
|
||||
### 5.0.9 Release (09.07.2024)
|
||||
* Updated to minigamesbox 1.3.11
|
||||
* Fixed ChunkManager.sendMapChunk
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
plugins {
|
||||
id("signing")
|
||||
`maven-publish`
|
||||
id("com.github.johnrengelman.shadow") version "8.1.1"
|
||||
id ("com.gradleup.shadow") version "9.0.0-beta5"
|
||||
java
|
||||
}
|
||||
|
||||
@@ -31,7 +31,10 @@ repositories {
|
||||
maven("https://hub.spigotmc.org/nexus/content/repositories/snapshots/")
|
||||
maven("https://oss.sonatype.org/content/repositories/snapshots")
|
||||
maven("https://oss.sonatype.org/content/repositories/central")
|
||||
maven(uri("https://papermc.io/repo/repository/maven-public/"))
|
||||
maven {
|
||||
name = "papermc"
|
||||
url = uri("https://repo.papermc.io/repository/maven-public/")
|
||||
}
|
||||
maven(uri("https://maven.plugily.xyz/releases"))
|
||||
maven(uri("https://maven.plugily.xyz/snapshots"))
|
||||
maven(uri("https://repo.citizensnpcs.co/"))
|
||||
@@ -39,15 +42,14 @@ repositories {
|
||||
}
|
||||
|
||||
dependencies {
|
||||
implementation("plugily.projects:MiniGamesBox-Classic:1.3.12") { isTransitive = false }
|
||||
compileOnly("org.spigotmc:spigot-api:1.20.4-R0.1-SNAPSHOT")
|
||||
compileOnly("io.papermc.paper:paper-api:1.20.4-R0.1-SNAPSHOT")
|
||||
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.10"
|
||||
version = "5.0.13-SNAPSHOT4"
|
||||
description = "BuildBattle"
|
||||
|
||||
java {
|
||||
File renamed without changes.
File renamed without changes.
@@ -0,0 +1,208 @@
|
||||
<?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.13-SNAPSHOT5</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>codemc-repo</id>
|
||||
<url>https://repo.codemc.org/repository/maven-public/</url>
|
||||
</repository>
|
||||
<repository>
|
||||
<id>spigot-repo</id>
|
||||
<url>https://hub.spigotmc.org/nexus/content/repositories/snapshots/</url>
|
||||
</repository>
|
||||
<repository>
|
||||
<id>citizens-repo</id>
|
||||
<url>http://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.3.17-SNAPSHOT12</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>
|
||||
</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>
|
||||
<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.
@@ -9,12 +9,10 @@ jobs:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout Latest Commit
|
||||
uses: actions/checkout@v4.1.3
|
||||
- name: Grant execute permission for gradlew
|
||||
run: chmod +x gradlew
|
||||
uses: actions/checkout@v4.2.2
|
||||
- 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
|
||||
@@ -25,19 +23,32 @@ jobs:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout Latest Commit
|
||||
uses: actions/checkout@v4.1.3
|
||||
uses: actions/checkout@v4.2.2
|
||||
with:
|
||||
ref: 'development'
|
||||
- name: Set up JDK
|
||||
uses: actions/setup-java@v4.2.1
|
||||
uses: actions/setup-java@v4.6.0
|
||||
with:
|
||||
distribution: 'temurin'
|
||||
java-version: '17'
|
||||
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
|
||||
@@ -11,12 +11,10 @@ jobs:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout Latest Commit
|
||||
uses: actions/checkout@v4.1.3
|
||||
- name: Grant execute permission for gradlew
|
||||
run: chmod +x gradlew
|
||||
uses: actions/checkout@v4.2.2
|
||||
- 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
|
||||
@@ -28,19 +26,32 @@ jobs:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout Latest Commit
|
||||
uses: actions/checkout@v4.1.3
|
||||
uses: actions/checkout@v4.2.2
|
||||
with:
|
||||
ref: 'master'
|
||||
- name: Set up JDK
|
||||
uses: actions/setup-java@v4.2.1
|
||||
uses: actions/setup-java@v4.6.0
|
||||
with:
|
||||
distribution: 'temurin'
|
||||
java-version: '17'
|
||||
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
|
||||
+2
-21
@@ -1,26 +1,7 @@
|
||||
#
|
||||
#
|
||||
# BuildBattle - Ultimate building competition minigame
|
||||
# Copyright (C) 2022 Plugily Projects - maintained by Tigerpanzer_02 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/>.
|
||||
#
|
||||
#
|
||||
|
||||
distributionBase=GRADLE_USER_HOME
|
||||
distributionPath=wrapper/dists
|
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-8.1.1-bin.zip
|
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-8.10-bin.zip
|
||||
networkTimeout=10000
|
||||
validateDistributionUrl=true
|
||||
zipStoreBase=GRADLE_USER_HOME
|
||||
zipStorePath=wrapper/dists
|
||||
@@ -0,0 +1,205 @@
|
||||
<?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</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>
|
||||
</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>
|
||||
@@ -32,7 +32,6 @@ import org.bukkit.event.EventPriority;
|
||||
import org.bukkit.event.block.*;
|
||||
import org.bukkit.event.entity.*;
|
||||
import org.bukkit.event.inventory.InventoryClickEvent;
|
||||
import org.bukkit.event.inventory.InventoryCloseEvent;
|
||||
import org.bukkit.event.inventory.InventoryType;
|
||||
import org.bukkit.event.player.AsyncPlayerChatEvent;
|
||||
import org.bukkit.event.player.PlayerBucketEmptyEvent;
|
||||
@@ -84,11 +83,35 @@ public class ArenaEvents extends PluginArenaEvents {
|
||||
|
||||
if(buildPlot != null && buildPlot.getCuboid() != null && buildPlot.getCuboid().isIn(event.getBlock().getLocation())) {
|
||||
plugin.getUserManager().getUser(event.getPlayer()).adjustStatistic("BLOCKS_BROKEN", 1);
|
||||
if(event.isDropItems()) {
|
||||
event.getBlock().getDrops().clear();
|
||||
}
|
||||
return;
|
||||
}
|
||||
event.setCancelled(true);
|
||||
}
|
||||
|
||||
@EventHandler(priority = EventPriority.HIGH)
|
||||
public void onItemSpawn(ItemSpawnEvent event) {
|
||||
if (!plugin.getArenaRegistry().getArenaWorlds().contains(event.getLocation().getWorld())) {
|
||||
return;
|
||||
}
|
||||
|
||||
plugin.getArenaRegistry().getArenas().forEach(arena -> {
|
||||
if(!(arena instanceof BaseArena)) {
|
||||
return;
|
||||
}
|
||||
if(((BaseArena) arena).getArenaInGameState() != BaseArena.ArenaInGameState.BUILD_TIME || plugin.getBlacklistManager().getItemList().contains(event.getEntity().getItemStack().getType())) {
|
||||
return;
|
||||
}
|
||||
for(Plot buildPlot : ((BaseArena) arena).getPlotManager().getPlots()) {
|
||||
if(buildPlot.getCuboid() != null && buildPlot.getCuboid().isInWithMarge(event.getLocation(), 1)) {
|
||||
event.setCancelled(true);
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
@EventHandler(priority = EventPriority.HIGH)
|
||||
public void onPlace(BlockPlaceEvent event) {
|
||||
BaseArena arena = plugin.getArenaRegistry().getArena(event.getPlayer());
|
||||
@@ -189,7 +212,7 @@ public class ArenaEvents extends PluginArenaEvents {
|
||||
if(playerPlot != null) {
|
||||
|
||||
// Prevent "Legacy material support initialisation"
|
||||
playerPlot.changeFloor(material, ServerVersion.Version.isCurrentEqualOrLower(ServerVersion.Version.v1_12_R1) ? hand.getData().getData() : 0);
|
||||
playerPlot.changeFloor(material, ServerVersion.Version.isCurrentEqualOrLower(ServerVersion.Version.v1_12) ? hand.getData().getData() : 0);
|
||||
new MessageBuilder("MENU_OPTION_CONTENT_FLOOR_CHANGED").asKey().player(event.getPlayer()).sendPlayer();
|
||||
}
|
||||
}
|
||||
@@ -317,13 +340,13 @@ public class ArenaEvents extends PluginArenaEvents {
|
||||
continue;
|
||||
}
|
||||
|
||||
if(event.getEntity().getType() == EntityType.WITHER || !plugin.getConfigPreferences().getOption("MOB_SPAWN")) {
|
||||
event.setCancelled(true);
|
||||
return;
|
||||
}
|
||||
|
||||
for(Plot plot : baseArena.getPlotManager().getPlots()) {
|
||||
if(plot.getCuboid() != null && plot.getCuboid().isInWithMarge(entityLoc, 1)) {
|
||||
if(!plugin.getConfigPreferences().getOption("MOB_SPAWN")) {
|
||||
event.setCancelled(true);
|
||||
return;
|
||||
}
|
||||
|
||||
if(plot.getEntities() >= maxMobPerPlot) {
|
||||
plot.getMembers().forEach(player -> new MessageBuilder("IN_GAME_MESSAGES_PLOT_LIMIT_ENTITIES").asKey().arena(arena).player(player).sendPlayer());
|
||||
event.setCancelled(true);
|
||||
@@ -340,7 +363,7 @@ public class ArenaEvents extends PluginArenaEvents {
|
||||
plot.addEntity();
|
||||
event.setCancelled(false);
|
||||
|
||||
if(ServerVersion.Version.isCurrentEqualOrHigher(ServerVersion.Version.v1_9_R1)) {
|
||||
if(ServerVersion.Version.isCurrentEqualOrHigher(ServerVersion.Version.v1_9)) {
|
||||
event.getEntity().setAI(false);
|
||||
}
|
||||
}
|
||||
@@ -412,9 +435,6 @@ public class ArenaEvents extends PluginArenaEvents {
|
||||
if(arena == null || arena.getArenaState() != IArenaState.IN_GAME) {
|
||||
return;
|
||||
}
|
||||
if(event.getEntity().getType() != EntityType.PLAYER) {
|
||||
return;
|
||||
}
|
||||
event.setCancelled(true);
|
||||
}
|
||||
|
||||
@@ -592,6 +612,9 @@ public class ArenaEvents extends PluginArenaEvents {
|
||||
if(arena.getArenaState() != IArenaState.IN_GAME) {
|
||||
return;
|
||||
}
|
||||
if(arena.getArenaInGameState() != BaseArena.ArenaInGameState.BUILD_TIME) {
|
||||
return;
|
||||
}
|
||||
if(arena.getSpectators().contains(player)) {
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -119,7 +119,7 @@ public class ArenaRegistry extends PluginArenaRegistry {
|
||||
World minWorld = minPoint.getWorld();
|
||||
|
||||
if(minWorld != null) {
|
||||
Biome biome = ServerVersion.Version.isCurrentHigher(ServerVersion.Version.v1_15_R1) ?
|
||||
Biome biome = ServerVersion.Version.isCurrentHigher(ServerVersion.Version.v1_15) ?
|
||||
minWorld.getBiome(minPoint.getBlockX(), minPoint.getBlockY(), minPoint.getBlockZ())
|
||||
: minWorld.getBiome(minPoint.getBlockX(), minPoint.getBlockZ());
|
||||
|
||||
|
||||
@@ -53,7 +53,7 @@ public class BaseArena extends PluginArena {
|
||||
private final List<Player> spectators = new ArrayList<>();
|
||||
private MapRestorerManager mapRestorerManager;
|
||||
private final PlotManager plotManager;
|
||||
private String theme = "Theme";
|
||||
private String theme = null;
|
||||
protected ParticleRefreshScheduler particleRefreshScheduler;
|
||||
private ArenaType arenaType;
|
||||
|
||||
@@ -153,8 +153,8 @@ public class BaseArena extends PluginArena {
|
||||
return theme;
|
||||
}
|
||||
|
||||
public void setTheme(String theme) {
|
||||
this.theme = theme == null ? "Theme" : theme;
|
||||
public void setTheme(String arenaTheme) {
|
||||
this.theme = arenaTheme;
|
||||
}
|
||||
|
||||
public void sendBuildLeftTimeMessage() {
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
@@ -68,17 +68,16 @@ public class GuessArena extends BaseArena {
|
||||
@Override
|
||||
public void cleanUpArena() {
|
||||
currentTheme = null;
|
||||
resetBuildPlot();
|
||||
round = 1;
|
||||
whoGuessed.clear();
|
||||
removedCharsAt.clear();
|
||||
playedPlots.clear();
|
||||
playedThemes.clear();
|
||||
super.cleanUpArena();
|
||||
}
|
||||
|
||||
@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");
|
||||
@@ -109,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;
|
||||
}
|
||||
@@ -138,10 +137,10 @@ public class GuessArena extends BaseArena {
|
||||
if(buildPlot != null) {
|
||||
buildPlot.resetPlot();
|
||||
}
|
||||
getRemovedCharsAt().clear();
|
||||
removedCharsAt.clear();
|
||||
setBuildPlot(null);
|
||||
setCurrentTheme(null);
|
||||
getWhoGuessed().clear();
|
||||
whoGuessed.clear();
|
||||
round += 1;
|
||||
getPlayers().forEach(player -> getPlugin().getActionBarManager().clearActionBarsFromPlayer(player));
|
||||
}
|
||||
@@ -183,7 +182,7 @@ public class GuessArena extends BaseArena {
|
||||
}
|
||||
|
||||
//-1 because builder can´t guess
|
||||
if(whoGuessed.size() >= getPlayers().size() - 1) {
|
||||
if(whoGuessed.size() >= getPlayersLeft().size() - 1) {
|
||||
setTimer(getPlugin().getConfig().getInt("Time-Manager." + getArenaType().getPrefix() + ".Round-Delay"));
|
||||
setArenaInGameState(ArenaInGameState.PLOT_VOTING);
|
||||
|
||||
|
||||
@@ -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,41 @@ public class ScoreboardManager extends PluginScoreboardManager {
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<Entry> formatScoreboard(IUser user) {
|
||||
EntryBuilder builder = new EntryBuilder();
|
||||
List<String> lines;
|
||||
IPluginArena userArena = user.getArena();
|
||||
public List<String> formatScoreboardLines(List<String> lines, Player player) {
|
||||
List<String> changedLines = new ArrayList<>();
|
||||
|
||||
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 = arena.getPlugin().getLanguageManager().getLanguageList(arena.getArenaState() == IArenaState.FULL_GAME ? "Scoreboard.Content.Starting"
|
||||
: "Scoreboard.Content." + arena.getArenaState().getFormattedName());
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
Player player = user.getPlayer();
|
||||
|
||||
for(String line : lines) {
|
||||
builder.next(new MessageBuilder(line).player(player).arena(arena).build());
|
||||
changedLines.add(new MessageBuilder(line).player(player).arena(arena).build());
|
||||
}
|
||||
return builder.build();
|
||||
return changedLines;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -220,7 +220,7 @@ public class Plot {
|
||||
}
|
||||
|
||||
for(Chunk chunk : cuboid.chunkList()) {
|
||||
if(ServerVersion.Version.isCurrentEqualOrHigher(ServerVersion.Version.v1_15_R1)) {
|
||||
if(ServerVersion.Version.isCurrentEqualOrHigher(ServerVersion.Version.v1_15)) {
|
||||
chunk.getWorld().refreshChunk(chunk.getX(), chunk.getZ());
|
||||
continue;
|
||||
}
|
||||
@@ -235,7 +235,7 @@ public class Plot {
|
||||
changeFloor(defaultFloor.parseMaterial());
|
||||
|
||||
if(centerWorld != null) {
|
||||
if(ServerVersion.Version.isCurrentHigher(ServerVersion.Version.v1_15_R1)) {
|
||||
if(ServerVersion.Version.isCurrentHigher(ServerVersion.Version.v1_15)) {
|
||||
Location min = cuboid.getMinPoint();
|
||||
Location max = cuboid.getMaxPoint();
|
||||
|
||||
@@ -307,7 +307,7 @@ public class Plot {
|
||||
Block block = maxWorld.getBlockAt(x, y, z);
|
||||
block.setType(material);
|
||||
|
||||
if(ServerVersion.Version.isCurrentEqualOrLower(ServerVersion.Version.v1_12_R1)) {
|
||||
if(ServerVersion.Version.isCurrentEqualOrLower(ServerVersion.Version.v1_12)) {
|
||||
try {
|
||||
Block.class.getMethod("setData", byte.class).invoke(block, data);
|
||||
} catch(Exception e) {
|
||||
|
||||
@@ -52,21 +52,24 @@ public class InGameState extends PluginInGameState {
|
||||
}
|
||||
switch(pluginArena.getArenaInGameState()) {
|
||||
case THEME_VOTING:
|
||||
if(arena.getTimer() <= 0) {
|
||||
if(arena.getTimer() <= 0 || pluginArena.getTheme() != null) {
|
||||
// may consider start to build message...
|
||||
pluginArena.setArenaInGameState(BaseArena.ArenaInGameState.BUILD_TIME);
|
||||
|
||||
setArenaTimer(getPlugin().getConfig().getInt("Time-Manager." + pluginArena.getArenaType().getPrefix() + ".In-Game"));
|
||||
|
||||
if(pluginArena.getVotePoll() != null && pluginArena.getTheme().equals("Theme")) {
|
||||
if(pluginArena.getVotePoll() != null && pluginArena.getTheme() == null) {
|
||||
pluginArena.setTheme(pluginArena.getVotePoll().getVotedTheme());
|
||||
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);
|
||||
}
|
||||
@@ -179,7 +182,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);
|
||||
}
|
||||
}
|
||||
@@ -267,7 +270,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);
|
||||
|
||||
@@ -71,7 +71,10 @@ public class InGameState extends PluginInGameState {
|
||||
new MessageBuilder("IN_GAME_MESSAGES_PLOT_GTB_ROUND").asKey().integer(pluginArena.getRound()).arena(pluginArena).sendArena();
|
||||
new TitleBuilder("IN_GAME_MESSAGES_PLOT_GTB_THEME_GUESS_TITLE").asKey().arena(pluginArena).sendArena();
|
||||
|
||||
Bukkit.getScheduler().runTaskLater(getPlugin(), () -> pluginArena.getCurrentBuilders().forEach(player -> player.setGameMode(GameMode.CREATIVE)), 40);
|
||||
Bukkit.getScheduler().runTaskLater(getPlugin(), () -> pluginArena.getCurrentBuilders().forEach(player -> {
|
||||
player.setGameMode(GameMode.CREATIVE);
|
||||
pluginArena.getPlugin().getSpecialItemManager().getSpecialItem("OPTIONS_MENU").setItem(player);
|
||||
} ), 40);
|
||||
|
||||
setArenaTimer(getPlugin().getConfig().getInt("Time-Manager." + pluginArena.getArenaType().getPrefix() + ".In-Game"));
|
||||
pluginArena.setArenaInGameState(BaseArena.ArenaInGameState.BUILD_TIME);
|
||||
@@ -108,9 +111,7 @@ public class InGameState extends PluginInGameState {
|
||||
pluginArena.teleportToWinnerPlot(); //todo save built plot from winner
|
||||
pluginArena.executeEndRewards();
|
||||
getPlugin().getArenaManager().stopGame(false, arena);
|
||||
}
|
||||
//round delay
|
||||
if(arena.getTimer() <= 0) {
|
||||
} else if (arena.getTimer() <= 0) {
|
||||
pluginArena.resetBuildPlot();
|
||||
setArenaTimer(getPlugin().getConfig().getInt("Time-Manager." + pluginArena.getArenaType().getPrefix() + ".Voting.Theme"));
|
||||
pluginArena.setArenaInGameState(BaseArena.ArenaInGameState.THEME_VOTING);
|
||||
|
||||
@@ -74,7 +74,7 @@ public class PlaceholderInitializer {
|
||||
return null;
|
||||
}
|
||||
String theme = pluginArena.getTheme();
|
||||
if(theme.equalsIgnoreCase("theme")) {
|
||||
if(theme == null) {
|
||||
theme = new MessageBuilder("SCOREBOARD_THEME_UNKNOWN").asKey().build();
|
||||
}
|
||||
return theme;
|
||||
|
||||
+10
-6
@@ -25,11 +25,14 @@ import org.bukkit.entity.Player;
|
||||
import plugily.projects.buildbattle.arena.BaseArena;
|
||||
import plugily.projects.buildbattle.arena.BuildArena;
|
||||
import plugily.projects.buildbattle.commands.arguments.ArgumentsRegistry;
|
||||
import plugily.projects.minigamesbox.api.arena.IArenaState;
|
||||
import plugily.projects.minigamesbox.classic.commands.arguments.data.CommandArgument;
|
||||
import plugily.projects.minigamesbox.classic.commands.arguments.data.LabelData;
|
||||
import plugily.projects.minigamesbox.classic.commands.arguments.data.LabeledCommandArgument;
|
||||
import plugily.projects.minigamesbox.classic.handlers.language.MessageBuilder;
|
||||
|
||||
import java.util.StringJoiner;
|
||||
|
||||
/**
|
||||
* @author Plajer
|
||||
* <p>
|
||||
@@ -58,15 +61,16 @@ public class SetThemeArgument {
|
||||
new MessageBuilder("&cPlease type arena theme!").prefix().send(sender);
|
||||
return;
|
||||
}
|
||||
if(arena.getArenaInGameState() == BaseArena.ArenaInGameState.THEME_VOTING) {
|
||||
String themeName = args[1];
|
||||
|
||||
if(arena.getPlugin().getThemeManager().isThemeBlacklisted(themeName)) {
|
||||
StringJoiner themeName = new StringJoiner(" ");
|
||||
for(int i = 1; i < args.length; i++)
|
||||
themeName.add(args[i]);
|
||||
if(arena.getArenaInGameState() == BaseArena.ArenaInGameState.BUILD_TIME || arena.getArenaState() == IArenaState.STARTING) {
|
||||
if(arena.getPlugin().getThemeManager().isThemeBlacklisted(themeName.toString())) {
|
||||
new MessageBuilder("COMMANDS_THEME_BLACKLISTED").asKey().prefix().send(sender);
|
||||
return;
|
||||
}
|
||||
arena.setTheme(themeName);
|
||||
new MessageBuilder("IN_GAME_MESSAGES_ADMIN_CHANGED_THEME").asKey().prefix().value(themeName).arena(arena).sendArena();
|
||||
arena.setTheme(themeName.toString());
|
||||
new MessageBuilder("IN_GAME_MESSAGES_ADMIN_CHANGED_THEME").asKey().prefix().value(themeName.toString()).arena(arena).sendArena();
|
||||
} else {
|
||||
new MessageBuilder("&cWrong state to force theme!").prefix().send(sender);
|
||||
}
|
||||
|
||||
@@ -57,6 +57,11 @@ public class GuessArgument {
|
||||
|
||||
GuessArena gameArena = (GuessArena) arena;
|
||||
|
||||
if(gameArena.getArenaInGameState() != BaseArena.ArenaInGameState.BUILD_TIME) {
|
||||
new MessageBuilder("COMMANDS_NOT_PLAYING").asKey().player(player).sendPlayer();
|
||||
return;
|
||||
}
|
||||
|
||||
if(gameArena.getWhoGuessed().contains(player)) {
|
||||
new MessageBuilder("IN_GAME_MESSAGES_PLOT_GTB_THEME_GUESS_CANT_TALK").asKey().arena(gameArena).player(player).sendPlayer();
|
||||
return;
|
||||
|
||||
+5
-2
@@ -33,6 +33,8 @@ import plugily.projects.buildbattle.handlers.menu.MenuOption;
|
||||
import plugily.projects.buildbattle.handlers.menu.OptionsRegistry;
|
||||
import plugily.projects.minigamesbox.classic.handlers.language.MessageBuilder;
|
||||
import plugily.projects.minigamesbox.classic.utils.helper.ItemBuilder;
|
||||
import plugily.projects.minigamesbox.classic.utils.version.ServerVersion;
|
||||
import plugily.projects.minigamesbox.classic.utils.version.xseries.XEntityType;
|
||||
import plugily.projects.minigamesbox.classic.utils.version.xseries.XMaterial;
|
||||
|
||||
/**
|
||||
@@ -88,8 +90,9 @@ public class FloorChangeOption {
|
||||
event.getCurrentItem().setType(Material.AIR);
|
||||
player.closeInventory();
|
||||
|
||||
player.getNearbyEntities(5, 5, 5).stream().filter(entity -> entity.getType() == EntityType.DROPPED_ITEM)
|
||||
.forEach(Entity::remove);
|
||||
player.getNearbyEntities(5, 5, 5).stream().filter(entity -> entity.getType() == XEntityType.ITEM.get())
|
||||
.forEach(Entity::remove);
|
||||
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
+10
-2
@@ -21,10 +21,12 @@
|
||||
package plugily.projects.buildbattle.handlers.menu.registry.banner;
|
||||
|
||||
import org.bukkit.DyeColor;
|
||||
import org.bukkit.block.BlockState;
|
||||
import org.bukkit.block.banner.Pattern;
|
||||
import org.bukkit.block.banner.PatternType;
|
||||
import org.bukkit.inventory.ItemStack;
|
||||
import org.bukkit.inventory.meta.BannerMeta;
|
||||
import org.bukkit.inventory.meta.BlockStateMeta;
|
||||
import plugily.projects.minigamesbox.classic.utils.version.ServerVersion;
|
||||
import plugily.projects.minigamesbox.classic.utils.version.xseries.XMaterial;
|
||||
|
||||
@@ -66,8 +68,14 @@ public class Banner {
|
||||
ItemStack item = XMaterial.WHITE_BANNER.parseItem();
|
||||
BannerMeta meta = (BannerMeta) item.getItemMeta();
|
||||
|
||||
if(ServerVersion.Version.isCurrentEqualOrLower(ServerVersion.Version.v1_12_R1)) {
|
||||
meta.setBaseColor(color);
|
||||
if(ServerVersion.Version.isCurrentEqualOrLower(ServerVersion.Version.v1_12)) {
|
||||
BlockStateMeta bsm = (BlockStateMeta) meta;
|
||||
BlockState state = ((BlockStateMeta) meta).getBlockState();
|
||||
if (state instanceof org.bukkit.block.Banner) {
|
||||
((org.bukkit.block.Banner) state).setBaseColor(color);
|
||||
state.update(true);
|
||||
}
|
||||
bsm.setBlockState(state);
|
||||
}
|
||||
|
||||
for(BannerPattern pattern : patterns) {
|
||||
|
||||
+10
-2
@@ -21,11 +21,13 @@
|
||||
package plugily.projects.buildbattle.handlers.menu.registry.banner;
|
||||
|
||||
import org.bukkit.DyeColor;
|
||||
import org.bukkit.block.BlockState;
|
||||
import org.bukkit.block.banner.Pattern;
|
||||
import org.bukkit.block.banner.PatternType;
|
||||
import org.bukkit.entity.Player;
|
||||
import org.bukkit.inventory.ItemStack;
|
||||
import org.bukkit.inventory.meta.BannerMeta;
|
||||
import org.bukkit.inventory.meta.BlockStateMeta;
|
||||
import org.bukkit.plugin.java.JavaPlugin;
|
||||
import plugily.projects.buildbattle.Main;
|
||||
import plugily.projects.minigamesbox.classic.handlers.language.MessageBuilder;
|
||||
@@ -69,11 +71,17 @@ public class BannerMenu {
|
||||
for(DyeColor color : DyeColor.values()) {
|
||||
ItemStack item;
|
||||
|
||||
if(ServerVersion.Version.isCurrentEqualOrLower(ServerVersion.Version.v1_12_R1)) {
|
||||
if(ServerVersion.Version.isCurrentEqualOrLower(ServerVersion.Version.v1_12)) {
|
||||
item = XMaterial.WHITE_BANNER.parseItem();
|
||||
BannerMeta meta = (BannerMeta) item.getItemMeta();
|
||||
|
||||
meta.setBaseColor(color);
|
||||
BlockStateMeta bsm = (BlockStateMeta) meta;
|
||||
BlockState state = ((BlockStateMeta) meta).getBlockState();
|
||||
if (state instanceof org.bukkit.block.Banner) {
|
||||
((org.bukkit.block.Banner) state).setBaseColor(color);
|
||||
state.update(true);
|
||||
}
|
||||
bsm.setBlockState(state);
|
||||
item.setItemMeta(meta);
|
||||
} else {
|
||||
item = XMaterial.matchXMaterial(color.toString() + "_BANNER").orElse(XMaterial.WHITE_BANNER).parseItem();
|
||||
|
||||
+1
-1
@@ -88,7 +88,7 @@ public class BiomeChangeOption {
|
||||
}
|
||||
|
||||
for(Chunk chunk : plot.getCuboid().chunkList()) {
|
||||
if(ServerVersion.Version.isCurrentEqualOrHigher(ServerVersion.Version.v1_15_R1)) {
|
||||
if(ServerVersion.Version.isCurrentEqualOrHigher(ServerVersion.Version.v1_15)) {
|
||||
chunk.getWorld().refreshChunk(chunk.getX(), chunk.getZ());
|
||||
continue;
|
||||
}
|
||||
|
||||
+1
-1
@@ -64,7 +64,7 @@ public class BiomesRegistry {
|
||||
.getString(biome + ".material-name", "bedrock").toUpperCase()).orElse(XMaterial.BEDROCK).parseItem())
|
||||
.name(new MessageBuilder(config.getString(biome + ".displayname")).build())
|
||||
.lore(lore)
|
||||
.build(), config.getString(biome + ".permission"), XBiome.matchXBiome(biome).orElse(XBiome.BADLANDS));
|
||||
.build(), config.getString(biome + ".permission"), XBiome.of(biome).orElse(XBiome.BADLANDS));
|
||||
biomes.add(biomeItem);
|
||||
i++;
|
||||
}
|
||||
|
||||
+2
-2
@@ -27,7 +27,7 @@ import plugily.projects.buildbattle.handlers.menu.MenuOption;
|
||||
import plugily.projects.buildbattle.handlers.menu.OptionsRegistry;
|
||||
import plugily.projects.minigamesbox.classic.handlers.language.MessageBuilder;
|
||||
import plugily.projects.minigamesbox.classic.utils.helper.ItemBuilder;
|
||||
import plugily.projects.minigamesbox.classic.utils.helper.ItemUtils;
|
||||
import plugily.projects.minigamesbox.classic.utils.version.xseries.XMaterial;
|
||||
import plugily.projects.minigamesbox.inventory.common.item.SimpleClickableItem;
|
||||
import plugily.projects.minigamesbox.inventory.normal.NormalFastInv;
|
||||
|
||||
@@ -39,7 +39,7 @@ import plugily.projects.minigamesbox.inventory.normal.NormalFastInv;
|
||||
public class PlayerHeadsOption {
|
||||
|
||||
public PlayerHeadsOption(OptionsRegistry registry) {
|
||||
registry.registerOption(new MenuOption(10, "PLAYER_HEADS", new ItemBuilder(ItemUtils.PLAYER_HEAD_ITEM.clone())
|
||||
registry.registerOption(new MenuOption(10, "PLAYER_HEADS", new ItemBuilder(XMaterial.PLAYER_HEAD.parseItem())
|
||||
.name(new MessageBuilder("MENU_OPTION_CONTENT_HEADS_ITEM_NAME").asKey().build())
|
||||
.lore(new MessageBuilder("MENU_OPTION_CONTENT_HEADS_ITEM_LORE").asKey().build())
|
||||
.build(), new MessageBuilder("MENU_OPTION_CONTENT_HEADS_INVENTORY").asKey().build()) {
|
||||
|
||||
@@ -39,11 +39,11 @@ public class ChunkManager {
|
||||
private static Constructor<?> mapChunkConstructor;
|
||||
|
||||
static {
|
||||
if (ServerVersion.Version.isCurrentLower(ServerVersion.Version.v1_18_R1)) {
|
||||
if (ServerVersion.Version.isCurrentLower(ServerVersion.Version.v1_18)) {
|
||||
packetPlayOutMapChunk = PacketUtils.classByName("net.minecraft.network.protocol.game", "PacketPlayOutMapChunk");
|
||||
chunkClass = PacketUtils.classByName("net.minecraft.world.level.chunk", "Chunk");
|
||||
|
||||
if (ServerVersion.Version.isCurrentEqualOrHigher(ServerVersion.Version.v1_17_R1)) {
|
||||
if (ServerVersion.Version.isCurrentEqualOrHigher(ServerVersion.Version.v1_17)) {
|
||||
try {
|
||||
mapChunkConstructor = packetPlayOutMapChunk.getConstructor(PacketUtils.classByName("net.minecraft.world.level.chunk", "LevelChunk"));
|
||||
} catch (NoSuchMethodException e) {
|
||||
@@ -58,18 +58,18 @@ public class ChunkManager {
|
||||
}
|
||||
|
||||
public static void sendMapChunk(Player player, Chunk chunk) {
|
||||
if (ServerVersion.Version.isCurrentEqualOrHigher(ServerVersion.Version.v1_18_R1)) {
|
||||
if (ServerVersion.Version.isCurrentEqualOrHigher(ServerVersion.Version.v1_18)) {
|
||||
return; // Should just use World#refreshChunk instead
|
||||
}
|
||||
|
||||
try {
|
||||
Method chunkHandleMethod = chunk.getClass().getMethod("getHandle");
|
||||
if (ServerVersion.Version.isCurrentEqualOrHigher(ServerVersion.Version.v1_17_R1)) {
|
||||
if (ServerVersion.Version.isCurrentEqualOrHigher(ServerVersion.Version.v1_17)) {
|
||||
PacketUtils.sendPacket(player, mapChunkConstructor.newInstance(chunkHandleMethod.invoke(chunk)));
|
||||
return;
|
||||
}
|
||||
|
||||
if (ServerVersion.Version.isCurrentEqualOrHigher(ServerVersion.Version.v1_16_R1)) {
|
||||
if (ServerVersion.Version.isCurrentEqualOrHigher(ServerVersion.Version.v1_16)) {
|
||||
if (mapChunkConstructor == null)
|
||||
mapChunkConstructor = packetPlayOutMapChunk.getConstructor(chunkClass, int.class, boolean.class);
|
||||
|
||||
@@ -77,7 +77,7 @@ public class ChunkManager {
|
||||
return;
|
||||
}
|
||||
|
||||
if (ServerVersion.Version.isCurrentEqualOrLower(ServerVersion.Version.v1_10_R2)) {
|
||||
if (ServerVersion.Version.isCurrentEqualOrLower(ServerVersion.Version.v1_10)) {
|
||||
if (mapChunkConstructor == null)
|
||||
mapChunkConstructor = packetPlayOutMapChunk.getConstructor(chunkClass, boolean.class, int.class);
|
||||
|
||||
|
||||
@@ -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.DAMAGE_ALL, 1).flags(ItemFlag.HIDE_ENCHANTS);
|
||||
itemBuilder.enchantment(XEnchantment.UNBREAKING.get(), 1).flags(ItemFlag.HIDE_ENCHANTS);
|
||||
} else {
|
||||
itemBuilder.removeEnchants().removeFlags();
|
||||
}
|
||||
@@ -215,10 +215,10 @@ public class VoteMenu {
|
||||
int slot = multiplied + 2 + j;
|
||||
|
||||
if(vote > percent) {
|
||||
gui.setItem(slot, ClickableItem.of(new ItemBuilder(XMaterial.RED_STAINED_GLASS_PANE.parseItem()).name("").build()));
|
||||
gui.setItem(slot, ClickableItem.of(new ItemBuilder(XMaterial.RED_STAINED_GLASS_PANE.parseItem()).name("???").build()));
|
||||
continue;
|
||||
}
|
||||
gui.setItem(slot, ClickableItem.of(new ItemBuilder(XMaterial.LIME_STAINED_GLASS_PANE.parseItem()).name("").build()));
|
||||
gui.setItem(slot, ClickableItem.of(new ItemBuilder(XMaterial.LIME_STAINED_GLASS_PANE.parseItem()).name("???").build()));
|
||||
vote += 16.7;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -67,6 +67,15 @@ Block:
|
||||
Leave: false
|
||||
# Cancels Item Movement into player crafting, enchantment tables, anvils ...
|
||||
Item-Move: true
|
||||
ArmorStand:
|
||||
# Should we block armor stand destroy with double click?
|
||||
Destroy: true
|
||||
# Should we block armor stand interaction?
|
||||
Interact: true
|
||||
# Should these only be blocked while ingame and arena state is in_game? (e.g. Lobby and Ending is blocked)
|
||||
# Setting it to false means on all stages of the game the event will be cancelled.
|
||||
# Setting it to true means only while IN_GAME the event will be cancelled.
|
||||
Check: true
|
||||
|
||||
|
||||
# Enable this option when you're using MySQL, otherwise it won't work.
|
||||
@@ -191,8 +200,8 @@ Time-Manager:
|
||||
|
||||
|
||||
Mob:
|
||||
# Should mob spawning on arenas be enabled?
|
||||
Spawn: false
|
||||
# Should mob spawning on arenas be enabled? (Contains Armour Stands)
|
||||
Spawn: true
|
||||
# The list of restricted entities that can't be spawned in game
|
||||
Restricted:
|
||||
- wither
|
||||
@@ -274,4 +283,4 @@ Update-Notifier:
|
||||
# You edited it, huh? Next time hurt yourself!
|
||||
Do-Not-Edit:
|
||||
File-Version: 1
|
||||
Core-Version: 4
|
||||
Core-Version: 5
|
||||
@@ -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