Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
7e6144fcea | ||
|
|
440d43ed09 | ||
|
|
adf60eb533 | ||
|
|
1ddfe08162 | ||
|
|
19338dcdcd | ||
|
|
4c9bb79652 |
No files matched your search
+11
-41
@@ -6,7 +6,7 @@
|
||||
|
||||
<groupId>me.lifelessnerd.purekitpvp</groupId>
|
||||
<artifactId>PureKitPvP</artifactId>
|
||||
<version>1.3</version>
|
||||
<version>1.3.1</version>
|
||||
<packaging>jar</packaging>
|
||||
|
||||
<name>PureKitPvP</name>
|
||||
@@ -44,45 +44,12 @@
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
<!-- <plugin>-->
|
||||
<!-- <groupId>net.md-5</groupId>-->
|
||||
<!-- <artifactId>specialsource-maven-plugin</artifactId>-->
|
||||
<!-- <version>1.2.2</version>-->
|
||||
<!-- <executions>-->
|
||||
<!-- <execution>-->
|
||||
<!-- <phase>package</phase>-->
|
||||
<!-- <goals>-->
|
||||
<!-- <goal>remap</goal>-->
|
||||
<!-- </goals>-->
|
||||
<!-- <id>remap-obf</id>-->
|
||||
<!-- <configuration>-->
|
||||
<!-- <srgIn>org.spigotmc:minecraft-server:1.20.2-R0.1-SNAPSHOT:txt:maps-mojang</srgIn>-->
|
||||
<!-- <reverse>true</reverse>-->
|
||||
<!-- <remappedDependencies>org.spigotmc:spigot:1.20.2-R0.1-SNAPSHOT:jar:remapped-mojang</remappedDependencies>-->
|
||||
<!-- <remappedArtifactAttached>true</remappedArtifactAttached>-->
|
||||
<!-- <remappedClassifierName>remapped-obf</remappedClassifierName>-->
|
||||
<!-- </configuration>-->
|
||||
<!-- </execution>-->
|
||||
<!-- <execution>-->
|
||||
<!-- <phase>package</phase>-->
|
||||
<!-- <goals>-->
|
||||
<!-- <goal>remap</goal>-->
|
||||
<!-- </goals>-->
|
||||
<!-- <id>remap-spigot</id>-->
|
||||
<!-- <configuration>-->
|
||||
<!-- <inputFile>${project.build.directory}/${project.artifactId}-${project.version}-remapped-obf.jar</inputFile>-->
|
||||
<!-- <srgIn>org.spigotmc:minecraft-server:1.20.2-R0.1-SNAPSHOT:csrg:maps-spigot</srgIn>-->
|
||||
<!-- <remappedDependencies>org.spigotmc:spigot:1.20.2-R0.1-SNAPSHOT:jar:remapped-obf</remappedDependencies>-->
|
||||
<!-- </configuration>-->
|
||||
<!-- </execution>-->
|
||||
<!-- </executions>-->
|
||||
<!-- </plugin>-->
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-jar-plugin</artifactId>
|
||||
<version>3.3.0</version>
|
||||
<configuration>
|
||||
<outputDirectory>F:\Minecraft\Servers\MC 1.20.4 Server\plugins</outputDirectory>
|
||||
<outputDirectory>F:\Minecraft\Servers\MC 1.20.6 Server\plugins</outputDirectory>
|
||||
</configuration>
|
||||
</plugin>
|
||||
</plugins>
|
||||
@@ -103,15 +70,10 @@
|
||||
<id>sonatype</id>
|
||||
<url>https://oss.sonatype.org/content/groups/public/</url>
|
||||
</repository>
|
||||
<!-- <repository>-->
|
||||
<!-- <id>sk89q-repo</id>-->
|
||||
<!-- <url>https://maven.enginehub.org/repo/</url>-->
|
||||
<!-- </repository>-->
|
||||
<repository>
|
||||
<id>sonatype-snapshots</id>
|
||||
<url>https://oss.sonatype.org/content/repositories/snapshots/</url>
|
||||
</repository>
|
||||
|
||||
</repositories>
|
||||
|
||||
<dependencies>
|
||||
@@ -125,7 +87,8 @@
|
||||
<dependency>
|
||||
<groupId>me.catcoder</groupId>
|
||||
<artifactId>bukkit-sidebar</artifactId>
|
||||
<version>6.2.5-SNAPSHOT</version>
|
||||
<version>6.2.7-SNAPSHOT</version>
|
||||
<scope>compile</scope>
|
||||
</dependency>
|
||||
<!-- https://mvnrepository.com/artifact/com.j256.ormlite/ormlite-jdbc -->
|
||||
<dependency>
|
||||
@@ -133,6 +96,13 @@
|
||||
<artifactId>ormlite-jdbc</artifactId>
|
||||
<version>6.1</version>
|
||||
</dependency>
|
||||
<!-- https://mvnrepository.com/artifact/com.github.steveice10/opennbt -->
|
||||
<dependency>
|
||||
<groupId>com.github.steveice10</groupId>
|
||||
<artifactId>opennbt</artifactId>
|
||||
<version>1.6</version>
|
||||
</dependency>
|
||||
|
||||
|
||||
</dependencies>
|
||||
</project>
|
||||
@@ -38,7 +38,7 @@ public class InfoCommand extends Subcommand{
|
||||
|
||||
String message =
|
||||
"""
|
||||
&bPureKitPvP - version 1.3
|
||||
&bPureKitPvP - version 1.3.1
|
||||
&6Discord Support: &ohttps://discord.com/invite/8n65jSEkVf
|
||||
&6SpigotMC: &ohttps://bit.ly/PureKitPvPSpigotMC
|
||||
&6Github: &ohttps://github.com/LifelessNerd/PureKitPvP
|
||||
|
||||
@@ -94,6 +94,7 @@ public final class PureKitPvP extends JavaPlugin {
|
||||
LanguageConfig.save();
|
||||
LanguageConfig.loadLanguage();
|
||||
|
||||
|
||||
SidebarScoreboard scoreboard = new SidebarScoreboard(this);
|
||||
|
||||
getCommand("getkit").setExecutor(new GetKit(this));
|
||||
|
||||
+5
-3
@@ -6,6 +6,7 @@ import me.lifelessnerd.purekitpvp.files.PerkData;
|
||||
import me.lifelessnerd.purekitpvp.utils.ComponentUtils;
|
||||
import org.bukkit.Material;
|
||||
import org.bukkit.Sound;
|
||||
import org.bukkit.attribute.Attribute;
|
||||
import org.bukkit.configuration.ConfigurationSection;
|
||||
import org.bukkit.enchantments.Enchantment;
|
||||
import org.bukkit.entity.*;
|
||||
@@ -218,11 +219,12 @@ public class PerkFireHandler {
|
||||
//Main logic
|
||||
double damageDealt = event.getDamage();
|
||||
double regen = damageDealt / 2;
|
||||
|
||||
if (player.getHealth() + regen <= 20){
|
||||
double maxHealth = player.getAttribute(Attribute.GENERIC_MAX_HEALTH).getValue();
|
||||
// System.out.println(maxHealth);
|
||||
if (player.getHealth() + regen <= maxHealth){
|
||||
player.setHealth(player.getHealth() + regen);
|
||||
} else {
|
||||
player.setHealth(20);
|
||||
player.setHealth(maxHealth);
|
||||
}
|
||||
|
||||
player.playSound(player.getLocation(), Sound.ENTITY_PLAYER_BURP, 1,0);
|
||||
|
||||
+5
@@ -8,6 +8,7 @@ import me.lifelessnerd.purekitpvp.utils.ComponentUtils;
|
||||
import me.lifelessnerd.purekitpvp.utils.DoubleUtils;
|
||||
import me.lifelessnerd.purekitpvp.utils.PlayerUtils;
|
||||
|
||||
import me.lifelessnerd.purekitpvp.versioning.MinecraftVersion;
|
||||
import net.kyori.adventure.text.Component;
|
||||
import net.kyori.adventure.text.format.NamedTextColor;
|
||||
import org.bukkit.entity.Player;
|
||||
@@ -28,6 +29,7 @@ public class SidebarScoreboard implements Listener {
|
||||
if (plugin.getConfig().getBoolean("scoreboard-enabled")){
|
||||
refreshLeaderboard();
|
||||
}
|
||||
System.out.println(MinecraftVersion.getVersion());
|
||||
|
||||
}
|
||||
|
||||
@@ -45,11 +47,13 @@ public class SidebarScoreboard implements Listener {
|
||||
switch(panel){
|
||||
case "GlobalStats":
|
||||
Sidebar<Component> globalStatsSidebar = ProtocolSidebar.newAdventureSidebar(titleComponent, plugin);
|
||||
globalStatsSidebar.getObjective().scoreNumberFormatBlank();
|
||||
fillGlobalSidebar(globalStatsSidebar);
|
||||
enabledSidebars.add(globalStatsSidebar);
|
||||
break;
|
||||
case "PersonalStats":
|
||||
Sidebar<Component> personalStatsSidebar = ProtocolSidebar.newAdventureSidebar(titleComponent, plugin);
|
||||
personalStatsSidebar.getObjective().scoreNumberFormatBlank();
|
||||
fillPersonalSidebar(personalStatsSidebar);
|
||||
enabledSidebars.add(personalStatsSidebar);
|
||||
break;
|
||||
@@ -96,6 +100,7 @@ public class SidebarScoreboard implements Listener {
|
||||
switch(component) {
|
||||
case "Killstreak":
|
||||
sidebar.addLine(LanguageConfig.lang.get("SCOREBOARD_GLOBAL_KILLSTREAK"));
|
||||
|
||||
createdLeaderboard = createLeaderboard(".killstreak", places);
|
||||
|
||||
break;
|
||||
|
||||
+25
@@ -0,0 +1,25 @@
|
||||
package me.lifelessnerd.purekitpvp.versioning;
|
||||
|
||||
import org.bukkit.Bukkit;
|
||||
|
||||
import java.util.regex.Matcher;
|
||||
import java.util.regex.Pattern;
|
||||
|
||||
public class MinecraftVersion {
|
||||
|
||||
public static String getVersion(){
|
||||
return extractVersion(Bukkit.getVersion());
|
||||
}
|
||||
|
||||
public static String extractVersion(String input) {
|
||||
// Define a regular expression pattern to match the version number
|
||||
Pattern pattern = Pattern.compile("\\b(\\d+\\.\\d+\\.\\d+)\\b");
|
||||
Matcher matcher = pattern.matcher(input);
|
||||
|
||||
if (matcher.find()) {
|
||||
return matcher.group(1);
|
||||
} else {
|
||||
throw new IllegalArgumentException("No version number found in the input string");
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,38 @@
|
||||
package me.lifelessnerd.purekitpvp.versioning;
|
||||
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
|
||||
import static java.lang.Integer.parseInt;
|
||||
|
||||
public class Version implements Comparable<Version> {
|
||||
|
||||
int major;
|
||||
int minor;
|
||||
int build;
|
||||
|
||||
public Version(int major, int minor, int build) {
|
||||
this.major = major;
|
||||
this.minor = minor;
|
||||
this.build = build;
|
||||
}
|
||||
|
||||
public Version(String versionString){
|
||||
// versionString: 1.20.6
|
||||
String[] split = versionString.split("\\.");
|
||||
this.major = parseInt(split[0]);
|
||||
this.minor = parseInt(split[1]);
|
||||
this.build = parseInt(split[2]);
|
||||
}
|
||||
|
||||
public int getVersionNumber(){
|
||||
String versionNumber = major + String.valueOf(minor) + build; // hacky
|
||||
return parseInt(versionNumber);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int compareTo(@NotNull Version o) {
|
||||
// TODO
|
||||
return 0;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,14 +1,14 @@
|
||||
|
||||
![\[Banner\]](https://i.imgur.com/tl2TQuw.png)
|
||||
# PureKitPvP (1.2)
|
||||
# PureKitPvP (1.3.1)
|
||||
|
||||
PureKitPvP lets you create a kit pvp environment quickly, with your own custom kits. These kits work similar to the plugin PureKits, but since that plugin is abandoned, I decided to extend it with other features. A quick overview of all features:
|
||||
PureKitPvP lets you create a kit pvp environment quickly, with your own custom kits. A quick overview of all features:
|
||||
- Death Recaps
|
||||
- Kill Credit on void/environmental damage
|
||||
- Assist credit
|
||||
- Tracks Killstreaks, Kills, Deaths and a lot more stats
|
||||
- Level system based on kills, deaths and assists
|
||||
- Kits can be made in-game
|
||||
- Kits can be made in-game, layout customizable per player
|
||||
- Kits can have a kill item, an item that will be aquired on kill
|
||||
- Pick only one kit per minecraft life (reset after death)
|
||||
- Per kit permissions
|
||||
@@ -23,26 +23,30 @@ PureKitPvP lets you create a kit pvp environment quickly, with your own custom k
|
||||
- Quickly die when falling in the void
|
||||
- 14 Perks, with GUI selection
|
||||
- Cosmetics: Projectile Trails, Kill Effect, Kill/Death Message
|
||||
- Global PvP-related Events
|
||||
- Customizable language file: most player-visible messages can be changed
|
||||
|
||||
## Commands
|
||||
All commands can be seen in-game via _/purekitpvp help_.
|
||||
|
||||
### Admin commands
|
||||
* **/purekitpvp createkit \<kitName> \<displayColor> \<kitIcon> \<kitPermission> \<killItem>**
|
||||
* Create a kit with the contents of your inventory
|
||||
* \<kitIcon> / \<killItem> - _All material names within the autocomplete menu_
|
||||
* Use _air_ if you don't want a kill item
|
||||
|
||||
* **/purekitpvp deletekit\<kitName>**
|
||||
* Remove a kit
|
||||
All admin commands are preceded with /purekitpvp.
|
||||
* **/purekitpvp kit <create/delete/edit/setkillitem>**
|
||||
* **create** \<kitName> \<displayColor> \<kitIcon> \<kitPermission> \<killItem>
|
||||
* Create a kit with the contents of your inventory
|
||||
* \<kitIcon> / \<killItem> - _All material names within the autocomplete menu_
|
||||
* Use _air_ if you don't want a kill item
|
||||
* **delete** \<kitName>
|
||||
* Remove a kit
|
||||
* **edit** \<kitName>
|
||||
* Edit a kit's contents in a GUI
|
||||
* **setkillitem** \<kitName>
|
||||
* Set the killitem to the item in your hand
|
||||
|
||||
* **/purekitpvp resetkit**
|
||||
* Reset your kit (dying will also reset your kit)
|
||||
* **/purekitpvp resetkit**
|
||||
* Resets kit, if the executor has the sufficient permission.
|
||||
|
||||
* **/purekitpvp setkillitem \<kitName>**
|
||||
* Set the killitem to the item in your hand
|
||||
|
||||
* **/purekitpvp createloottable \<name> \<lore> \<displayName>**
|
||||
* **/purekitpvp createloottable** **\<name> \<lore> \<displayName>**
|
||||
* Create a loottable of the chest you are looking at
|
||||
* \<lore> - _The lore on the item chest that will be right clicked for the random items_
|
||||
* \<displayName> -_The displayname on the item chest that will be right clicked for the random items_
|
||||
@@ -55,35 +59,47 @@ All commands can be seen in-game via _/purekitpvp help_.
|
||||
* \<custom_mob> requires a custom mob name
|
||||
|
||||
* **/purekitpvp custommob \<create/set/delete>**
|
||||
* \<create> \<name> \<type>
|
||||
* **create** \<name> \<type>
|
||||
* Creates custom mob with a certain type, can be any entity (mobs are officially supported)
|
||||
* \<set \<name> \<mainhand/offhand/boots/leggings/chestplate/helmet/child>
|
||||
* **set** \<name> \<mainhand/offhand/boots/leggings/chestplate/helmet/child>
|
||||
* Sets a property of a mob to the item in hand, or with the child property; true or false must be specified
|
||||
* \<delete> \<name>
|
||||
* **delete** \<name>
|
||||
* Deletes a custom mob
|
||||
|
||||
* **/purekitpvp event \<start/stop/pause>**
|
||||
* **start** \<eventName>
|
||||
* You may only start one event at a time. Timer can be skipped to the end of the event timer.
|
||||
* **stop** \<eventName>
|
||||
* Stops current event.
|
||||
* **pause**
|
||||
* Pauses the global event loop timer. Events already active stay active. If you want the global event loop to stop, you may disable it in the config, or pause when no event is active to keep any events from triggering.
|
||||
|
||||
* **/purekitpvp getkitstats**
|
||||
* Outputs kit usage stats to see what kit is most popular (for balancing)
|
||||
|
||||
* **/purekitpvp \<help/info/reload>**
|
||||
* Self explanatory
|
||||
* Reload does not fully reload the config file; any settings pertaining to the event loop are not updated, because the event loop is continuous.
|
||||
|
||||
### Player commands
|
||||
* **/kit**
|
||||
* Show Kit GUI
|
||||
![\[IMG\]](https://i.imgur.com/JLFvel3.png)
|
||||
Kits can be customized per player; see video:
|
||||
Per Player Preferences feature showcase - https://youtu.be/wVQJzBPUlQU
|
||||
|
||||
|
||||
* **/perks**
|
||||
* Show Perk GUI, click on a slot to change the perk in that slot (see img2)
|
||||
* Show Perk GUI, click on a slot to change the perk in that slot (see image)
|
||||
![\[IMG\]](https://i.imgur.com/Yau99d1.png)
|
||||
![\[IMG\]](https://i.imgur.com/DB81qVL.png)
|
||||
* **/cosmetics**
|
||||
* Brings up cosmetics menu
|
||||
* In this menu, the kill effect, death/kill message and projectile trail can be changed
|
||||
|
||||
* **/getkit <kitName>**
|
||||
* **/getkit \<kitName>**
|
||||
* Get a kit directly
|
||||
|
||||
* **/stats <player>**
|
||||
* **/stats \<player>**
|
||||
* Show stats of any player
|
||||
|
||||

|
||||
@@ -93,9 +109,11 @@ All commands can be seen in-game via _/purekitpvp help_.
|
||||
* Enabling this improves accuracy of death messages
|
||||
|
||||
## Files
|
||||
There are several files, most are used internally to track stats and such. The config has some feature toggles that are explained there.
|
||||
I would recommend not editing the kits.yml unless you know how to check if your YAML is valid, because the file may reset when wrong YAML is parsed (don't ask me why).
|
||||
For the loottables.yml, follow the format that is provided in the example in the file. Write lore bare, and the displayname with single apostrophes (like so: '&6Lootchest').
|
||||
There are several files, most are used internally to track stats and such. The **config.yml** has some feature toggles that are explained there.
|
||||
I would recommend not editing the **kits.yml** unless you know how to check if your YAML is valid, because the file may reset when wrong YAML is parsed (don't ask me why).
|
||||
For the **loottables.yml**, follow the format that is provided in the example in the file. Write lore bare, and the displayname with single apostrophes (like so: '&6Lootchest').
|
||||
The **lang.yml** file has a plethora of language keys, each of which corresponds with a single or more instances of text in-game. Most text that is visible to a default player - that is a non-admin - is customizable. Item tooltips in GUI's, scoreboard text, all perk explanations et cetera. Be sure to follow the format of each key individually, since some are made for single-line text (such as a display name of an item), and others for multiple lines of lore (think perk explanations). Resetting a value is as easy as deleting it from the file and reloading: missing values are always added back in with their default values. Text that pertains to the kill messages is currently not customizable; the system is not made for this and I question whether the two systems can live side-by-side.
|
||||
If you have any questions please reach out via Discord (see #Support).
|
||||
|
||||
## How to create a kit
|
||||
*Also see the video that covers this topic below.*
|
||||
@@ -123,8 +141,11 @@ https://youtu.be/wZcZ4DcRfgU - Create Kits and Loot tables
|
||||
|
||||
https://youtu.be/tLelKptr6wA - Custom Mobs and how to use them
|
||||
|
||||
## Known issues
|
||||
https://youtu.be/wVQJzBPUlQU - Per Player Kit Preferences feature showcase
|
||||
|
||||
## Known issues & Support
|
||||
Issues can be found [here](https://github.com/LifelessNerd/PureKitPvP/issues).
|
||||
I am sure there will be issues, but finding all of them takes a lot of testing time. Please submit any problems!
|
||||
|
||||
If there are any problems, create a message on [Spigot](https://bit.ly/PureKitPvPSpigotMC), add them on GitHub, [here](https://github.com/LifelessNerd/PureKitPvP), or DM me on [Twitter](https://twitter.com/lukadevrij).
|
||||
If there are any problems, create a message on [Spigot](https://bit.ly/PureKitPvPSpigotMC), add them on GitHub, [here](https://github.com/LifelessNerd/PureKitPvP), or DM me on [Twitter](https://twitter.com/lukadevrij). For direct support you may also join the support [Discord server](https://discord.com/invite/8n65jSEkVf).
|
||||
|
||||
Reference in new issue
Block a user