Updated for 1.20.4

This commit is contained in:
quentin 2024-02-21 18:32:05 -06:00
parent 3f3d6a5ecd
commit 60c2d96996
6 changed files with 81 additions and 17 deletions

3
.gitmodules vendored Normal file
View File

@ -0,0 +1,3 @@
[submodule "canvas"]
path = canvas
url = https://github.com/IPVP-MC/canvas/

1
canvas Submodule

@ -0,0 +1 @@
Subproject commit 605fd88d4ca3fd9da35e809be8a2dea1cb93f676

View File

@ -0,0 +1,61 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>io.github.officereso</groupId>
<artifactId>pvp</artifactId>
<version>1.1-SNAPSHOT</version>
<build>
<plugins>
<plugin>
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
<source>8</source>
<target>8</target>
</configuration>
</plugin>
<plugin>
<artifactId>maven-shade-plugin</artifactId>
<version>3.5.0</version>
<executions>
<execution>
<phase>package</phase>
<goals>
<goal>shade</goal>
</goals>
</execution>
</executions>
<configuration>
<minimizeJar>true</minimizeJar>
<filters>
<filter>
<artifact>log4j:log4j</artifact>
<includes>
<include>**</include>
</includes>
</filter>
<filter>
<artifact>org.ipvp:canvas:1.7.0-SNAPSHOT</artifact>
<includes>
<include>**</include>
</includes>
</filter>
</filters>
</configuration>
</plugin>
</plugins>
</build>
<repositories>
<repository>
<id>spigotmc-repo</id>
<url>https://hub.spigotmc.org/nexus/content/repositories/snapshots/</url>
</repository>
</repositories>
<dependencies>
<dependency>
<groupId>org.spigotmc</groupId>
<artifactId>spigot-api</artifactId>
<version>1.20.4-R0.1-SNAPSHOT</version>
<scope>provided</scope>
</dependency>
</dependencies>
</project>

10
pom.xml
View File

@ -6,7 +6,7 @@
<groupId>io.github.officereso</groupId>
<artifactId>pvp</artifactId>
<version>1.0-SNAPSHOT</version>
<version>1.1-SNAPSHOT</version>
<build>
<plugins>
<plugin>
@ -20,7 +20,7 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-shade-plugin</artifactId>
<version>3.1.1</version>
<version>3.5.0</version>
<configuration>
<minimizeJar>true</minimizeJar>
<filters>
@ -31,7 +31,7 @@
</includes>
</filter>
<filter>
<artifact>org.ipvp:canvas:1.5.0-SNAPSHOT</artifact>
<artifact>org.ipvp:canvas:1.7.0-SNAPSHOT</artifact>
<includes>
<include>**</include>
</includes>
@ -60,7 +60,7 @@
<dependency>
<groupId>org.spigotmc</groupId>
<artifactId>spigot-api</artifactId>
<version>1.15.2-R0.1-SNAPSHOT</version>
<version>1.20.4-R0.1-SNAPSHOT</version>
<scope>provided</scope>
</dependency>
<dependency>
@ -71,7 +71,7 @@
<dependency>
<groupId>org.ipvp</groupId>
<artifactId>canvas</artifactId>
<version>1.5.0-SNAPSHOT</version>
<version>1.7.0-SNAPSHOT</version>
<scope>compile</scope>
</dependency>
</dependencies>

View File

@ -137,7 +137,6 @@ public class pvp extends JavaPlugin implements Listener {
Kit.Type type = kit.getType();
int playerLevel = player.getLevel();
switch (type) {
case KIT:
switch (info.getClickType()) {
case LEFT:
@ -151,6 +150,7 @@ public class pvp extends JavaPlugin implements Listener {
updateMenu(selectionWrapper, menu);
break;
}
break;
case HELMET:
switch (info.getClickType()) {
case LEFT:
@ -164,6 +164,7 @@ public class pvp extends JavaPlugin implements Listener {
updateMenu(selectionWrapper, menu);
break;
}
break;
case CHESTPLATE:
switch (info.getClickType()) {
case LEFT:
@ -177,6 +178,7 @@ public class pvp extends JavaPlugin implements Listener {
updateMenu(selectionWrapper, menu);
break;
}
break;
case LEGGINGS:
switch (info.getClickType()) {
case LEFT:
@ -190,6 +192,7 @@ public class pvp extends JavaPlugin implements Listener {
updateMenu(selectionWrapper, menu);
break;
}
break;
case BOOTS:
switch (info.getClickType()) {
case LEFT:
@ -203,6 +206,7 @@ public class pvp extends JavaPlugin implements Listener {
updateMenu(selectionWrapper, menu);
break;
}
break;
case POTION:
switch (info.getClickType()) {
case LEFT:
@ -216,6 +220,7 @@ public class pvp extends JavaPlugin implements Listener {
updateMenu(selectionWrapper, menu);
break;
}
break;
case ADDITIONAL:
switch (info.getClickType()) {
case LEFT:
@ -230,6 +235,7 @@ public class pvp extends JavaPlugin implements Listener {
break;
}
break;
}
});
}
@ -334,10 +340,7 @@ public class pvp extends JavaPlugin implements Listener {
(config.getInt(root + kit + ".items." + item + ".amount"))); // Amount of the item
PotionMeta potionMeta = (PotionMeta) itemStack.getItemMeta();
potionMeta.setBasePotionData(new PotionData(
PotionType.valueOf(config.getString(root + kit + ".items." + item + ".basePotionData")),
config.getBoolean(root + kit + ".items." + item + ".extended"),
config.getBoolean(root + kit + ".items." + item + ".upgraded")));
potionMeta.setBasePotionType(PotionType.valueOf(config.getString(root + kit + ".items." + item + ".basePotionData")));
itemStack.setItemMeta(potionMeta);
inventoryItemList.add(new InventoryItem(itemStack, inventoryPos));

View File

@ -19,23 +19,19 @@
# 1:
# material: "SPLASH_POTION"
# amount: 1
# basePotionData: "INSTANT_HEAL"
# basePotionData: "STRONG_HEALING"
# extended: false
# upgraded: true
# inventoryPos:
# 2:
# material: "SPLASH_POTION"
# amount: 1
# basePotionData: "INSTANT_HEAL"
# extended: false
# upgraded: true
# basePotionData: "STRONG_HEALING"
# inventoryPos:
# 3:
# material: "SPLASH_POTION"
# amount: 1
# basePotionData: "INSTANT_HEAL"
# extended: false
# upgraded: true
# basePotionData: "STRONG_HEALING"
# inventoryPos:
# cost: 3
# position: 16