mirror of
https://gitlab.com/phoenix-dvpmt/mmoitems.git
synced 2024-12-22 04:37:42 +01:00
Proxy-based profile proof
This commit is contained in:
parent
4f88d6094a
commit
3ed8a54251
@ -99,12 +99,6 @@
|
|||||||
<url>https://hub.spigotmc.org/nexus/content/repositories/snapshots/</url>
|
<url>https://hub.spigotmc.org/nexus/content/repositories/snapshots/</url>
|
||||||
</repository>
|
</repository>
|
||||||
|
|
||||||
<!-- AdvancedEnchants -->
|
|
||||||
<repository>
|
|
||||||
<id>egg82-ninja</id>
|
|
||||||
<url>https://www.myget.org/F/egg82-java/maven/</url>
|
|
||||||
</repository>
|
|
||||||
|
|
||||||
<!-- HolographicDisplays -->
|
<!-- HolographicDisplays -->
|
||||||
<repository>
|
<repository>
|
||||||
<id>codemc-repo</id>
|
<id>codemc-repo</id>
|
||||||
@ -124,6 +118,7 @@
|
|||||||
<artifactId>spigot-api</artifactId>
|
<artifactId>spigot-api</artifactId>
|
||||||
<version>1.20.1-R0.1-SNAPSHOT</version>
|
<version>1.20.1-R0.1-SNAPSHOT</version>
|
||||||
<scope>provided</scope>
|
<scope>provided</scope>
|
||||||
|
<optional>true</optional>
|
||||||
</dependency>
|
</dependency>
|
||||||
<!-- https://mvnrepository.com/artifact/org.apache.maven.plugins/maven-clean-plugin -->
|
<!-- https://mvnrepository.com/artifact/org.apache.maven.plugins/maven-clean-plugin -->
|
||||||
<dependency>
|
<dependency>
|
||||||
@ -131,6 +126,7 @@
|
|||||||
<artifactId>maven-clean-plugin</artifactId>
|
<artifactId>maven-clean-plugin</artifactId>
|
||||||
<version>3.1.0</version>
|
<version>3.1.0</version>
|
||||||
<scope>provided</scope>
|
<scope>provided</scope>
|
||||||
|
<optional>true</optional>
|
||||||
</dependency>
|
</dependency>
|
||||||
<!-- AuthLib -->
|
<!-- AuthLib -->
|
||||||
<dependency>
|
<dependency>
|
||||||
@ -138,6 +134,7 @@
|
|||||||
<artifactId>authlib</artifactId>
|
<artifactId>authlib</artifactId>
|
||||||
<version>1.5.21</version>
|
<version>1.5.21</version>
|
||||||
<scope>provided</scope>
|
<scope>provided</scope>
|
||||||
|
<optional>true</optional>
|
||||||
</dependency>
|
</dependency>
|
||||||
<!-- MMOCore Api -->
|
<!-- MMOCore Api -->
|
||||||
<dependency>
|
<dependency>
|
||||||
@ -145,13 +142,15 @@
|
|||||||
<artifactId>MMOCore-API</artifactId>
|
<artifactId>MMOCore-API</artifactId>
|
||||||
<version>1.12-SNAPSHOT</version>
|
<version>1.12-SNAPSHOT</version>
|
||||||
<scope>provided</scope>
|
<scope>provided</scope>
|
||||||
|
<optional>true</optional>
|
||||||
</dependency>
|
</dependency>
|
||||||
<!-- MythicEnchants -->
|
<!-- MythicEnchants -->
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>io.lumine</groupId>
|
<groupId>io.lumine</groupId>
|
||||||
<artifactId>MythicEnchants</artifactId>
|
<artifactId>MythicEnchants</artifactId>
|
||||||
<version>0.0.1-SNAPSHOT</version>
|
<version>0.0.1-REUPLOAD</version>
|
||||||
<scope>provided</scope>
|
<scope>provided</scope>
|
||||||
|
<optional>true</optional>
|
||||||
</dependency>
|
</dependency>
|
||||||
<!-- PhatLoots -->
|
<!-- PhatLoots -->
|
||||||
<dependency>
|
<dependency>
|
||||||
@ -159,6 +158,7 @@
|
|||||||
<artifactId>PhatLoots</artifactId>
|
<artifactId>PhatLoots</artifactId>
|
||||||
<version>4.2.3</version>
|
<version>4.2.3</version>
|
||||||
<scope>provided</scope>
|
<scope>provided</scope>
|
||||||
|
<optional>true</optional>
|
||||||
</dependency>
|
</dependency>
|
||||||
<!-- placeholderapi -->
|
<!-- placeholderapi -->
|
||||||
<dependency>
|
<dependency>
|
||||||
@ -166,6 +166,7 @@
|
|||||||
<artifactId>placeholderapi</artifactId>
|
<artifactId>placeholderapi</artifactId>
|
||||||
<version>2.9.2</version>
|
<version>2.9.2</version>
|
||||||
<scope>provided</scope>
|
<scope>provided</scope>
|
||||||
|
<optional>true</optional>
|
||||||
</dependency>
|
</dependency>
|
||||||
<!-- Mythic -->
|
<!-- Mythic -->
|
||||||
<dependency>
|
<dependency>
|
||||||
@ -173,13 +174,6 @@
|
|||||||
<artifactId>Mythic-Dist</artifactId>
|
<artifactId>Mythic-Dist</artifactId>
|
||||||
<version>5.1.2-SNAPSHOT</version>
|
<version>5.1.2-SNAPSHOT</version>
|
||||||
<scope>provided</scope>
|
<scope>provided</scope>
|
||||||
</dependency>
|
|
||||||
<!-- Profile API -->
|
|
||||||
<dependency>
|
|
||||||
<groupId>fr.phoenixdevt</groupId>
|
|
||||||
<artifactId>Profile-API</artifactId>
|
|
||||||
<version>1.0-SNAPSHOT</version>
|
|
||||||
<scope>provided</scope>
|
|
||||||
<optional>true</optional>
|
<optional>true</optional>
|
||||||
</dependency>
|
</dependency>
|
||||||
<!-- WordGuard -->
|
<!-- WordGuard -->
|
||||||
@ -188,6 +182,7 @@
|
|||||||
<artifactId>worldguard-bukkit</artifactId>
|
<artifactId>worldguard-bukkit</artifactId>
|
||||||
<version>7.0.2-SNAPSHOT</version>
|
<version>7.0.2-SNAPSHOT</version>
|
||||||
<scope>provided</scope>
|
<scope>provided</scope>
|
||||||
|
<optional>true</optional>
|
||||||
</dependency>
|
</dependency>
|
||||||
<!-- Vault -->
|
<!-- Vault -->
|
||||||
<dependency>
|
<dependency>
|
||||||
@ -195,6 +190,7 @@
|
|||||||
<artifactId>VaultAPI</artifactId>
|
<artifactId>VaultAPI</artifactId>
|
||||||
<version>1.7</version>
|
<version>1.7</version>
|
||||||
<scope>provided</scope>
|
<scope>provided</scope>
|
||||||
|
<optional>true</optional>
|
||||||
</dependency>
|
</dependency>
|
||||||
<!-- SkillAPI -->
|
<!-- SkillAPI -->
|
||||||
<dependency>
|
<dependency>
|
||||||
@ -202,6 +198,7 @@
|
|||||||
<artifactId>SkillAPI</artifactId>
|
<artifactId>SkillAPI</artifactId>
|
||||||
<version>master</version>
|
<version>master</version>
|
||||||
<scope>provided</scope>
|
<scope>provided</scope>
|
||||||
|
<optional>true</optional>
|
||||||
</dependency>
|
</dependency>
|
||||||
<!-- AE Api -->
|
<!-- AE Api -->
|
||||||
<dependency>
|
<dependency>
|
||||||
@ -209,6 +206,7 @@
|
|||||||
<artifactId>ae.api</artifactId>
|
<artifactId>ae.api</artifactId>
|
||||||
<version>5.7.6</version>
|
<version>5.7.6</version>
|
||||||
<scope>provided</scope>
|
<scope>provided</scope>
|
||||||
|
<optional>true</optional>
|
||||||
</dependency>
|
</dependency>
|
||||||
<!-- BossShop -->
|
<!-- BossShop -->
|
||||||
<dependency>
|
<dependency>
|
||||||
@ -216,6 +214,7 @@
|
|||||||
<artifactId>BossShop</artifactId>
|
<artifactId>BossShop</artifactId>
|
||||||
<version>2.0.9</version>
|
<version>2.0.9</version>
|
||||||
<scope>provided</scope>
|
<scope>provided</scope>
|
||||||
|
<optional>true</optional>
|
||||||
</dependency>
|
</dependency>
|
||||||
<!-- Residence -->
|
<!-- Residence -->
|
||||||
<dependency>
|
<dependency>
|
||||||
@ -223,6 +222,7 @@
|
|||||||
<artifactId>Residence</artifactId>
|
<artifactId>Residence</artifactId>
|
||||||
<version>4.8.7.2</version>
|
<version>4.8.7.2</version>
|
||||||
<scope>provided</scope>
|
<scope>provided</scope>
|
||||||
|
<optional>true</optional>
|
||||||
</dependency>
|
</dependency>
|
||||||
<!-- Heroes -->
|
<!-- Heroes -->
|
||||||
<dependency>
|
<dependency>
|
||||||
@ -230,6 +230,7 @@
|
|||||||
<artifactId>Heroes</artifactId>
|
<artifactId>Heroes</artifactId>
|
||||||
<version>1.9.22</version>
|
<version>1.9.22</version>
|
||||||
<scope>provided</scope>
|
<scope>provided</scope>
|
||||||
|
<optional>true</optional>
|
||||||
</dependency>
|
</dependency>
|
||||||
<!-- ProtocolLib -->
|
<!-- ProtocolLib -->
|
||||||
<dependency>
|
<dependency>
|
||||||
@ -245,6 +246,7 @@
|
|||||||
<artifactId>mcMMO</artifactId>
|
<artifactId>mcMMO</artifactId>
|
||||||
<version>2.1.104</version>
|
<version>2.1.104</version>
|
||||||
<scope>provided</scope>
|
<scope>provided</scope>
|
||||||
|
<optional>true</optional>
|
||||||
</dependency>
|
</dependency>
|
||||||
<!-- McRPG -->
|
<!-- McRPG -->
|
||||||
<dependency>
|
<dependency>
|
||||||
@ -252,6 +254,7 @@
|
|||||||
<artifactId>McRPG</artifactId>
|
<artifactId>McRPG</artifactId>
|
||||||
<version>1.1.2</version>
|
<version>1.1.2</version>
|
||||||
<scope>provided</scope>
|
<scope>provided</scope>
|
||||||
|
<optional>true</optional>
|
||||||
</dependency>
|
</dependency>
|
||||||
<!-- Rpl -->
|
<!-- Rpl -->
|
||||||
<dependency>
|
<dependency>
|
||||||
@ -259,6 +262,7 @@
|
|||||||
<artifactId>rpl</artifactId>
|
<artifactId>rpl</artifactId>
|
||||||
<version>3.9.30</version>
|
<version>3.9.30</version>
|
||||||
<scope>provided</scope>
|
<scope>provided</scope>
|
||||||
|
<optional>true</optional>
|
||||||
</dependency>
|
</dependency>
|
||||||
<!-- Skills -->
|
<!-- Skills -->
|
||||||
<dependency>
|
<dependency>
|
||||||
@ -266,6 +270,7 @@
|
|||||||
<artifactId>skills</artifactId>
|
<artifactId>skills</artifactId>
|
||||||
<version>12.3.5</version>
|
<version>12.3.5</version>
|
||||||
<scope>provided</scope>
|
<scope>provided</scope>
|
||||||
|
<optional>true</optional>
|
||||||
</dependency>
|
</dependency>
|
||||||
<!-- SkillsPro -->
|
<!-- SkillsPro -->
|
||||||
<dependency>
|
<dependency>
|
||||||
@ -273,6 +278,7 @@
|
|||||||
<artifactId>SkillsPro</artifactId>
|
<artifactId>SkillsPro</artifactId>
|
||||||
<version>18.9.0.1</version>
|
<version>18.9.0.1</version>
|
||||||
<scope>provided</scope>
|
<scope>provided</scope>
|
||||||
|
<optional>true</optional>
|
||||||
</dependency>
|
</dependency>
|
||||||
<!-- BattleLevels -->
|
<!-- BattleLevels -->
|
||||||
<dependency>
|
<dependency>
|
||||||
@ -280,6 +286,7 @@
|
|||||||
<artifactId>BattleLevels</artifactId>
|
<artifactId>BattleLevels</artifactId>
|
||||||
<version>6.9.1</version>
|
<version>6.9.1</version>
|
||||||
<scope>provided</scope>
|
<scope>provided</scope>
|
||||||
|
<optional>true</optional>
|
||||||
</dependency>
|
</dependency>
|
||||||
<!-- TrHologram -->
|
<!-- TrHologram -->
|
||||||
<dependency>
|
<dependency>
|
||||||
@ -287,6 +294,7 @@
|
|||||||
<artifactId>TrHologram</artifactId>
|
<artifactId>TrHologram</artifactId>
|
||||||
<version>1.11</version>
|
<version>1.11</version>
|
||||||
<scope>provided</scope>
|
<scope>provided</scope>
|
||||||
|
<optional>true</optional>
|
||||||
</dependency>
|
</dependency>
|
||||||
<!-- HolographicDisplays API -->
|
<!-- HolographicDisplays API -->
|
||||||
<dependency>
|
<dependency>
|
||||||
@ -294,6 +302,7 @@
|
|||||||
<artifactId>holographicdisplays-api</artifactId>
|
<artifactId>holographicdisplays-api</artifactId>
|
||||||
<version>2.4.0</version>
|
<version>2.4.0</version>
|
||||||
<scope>provided</scope>
|
<scope>provided</scope>
|
||||||
|
<optional>true</optional>
|
||||||
</dependency>
|
</dependency>
|
||||||
<!-- RacesAndClasses -->
|
<!-- RacesAndClasses -->
|
||||||
<dependency>
|
<dependency>
|
||||||
@ -301,6 +310,7 @@
|
|||||||
<artifactId>RacesAndClasses</artifactId>
|
<artifactId>RacesAndClasses</artifactId>
|
||||||
<version>1.2.6</version>
|
<version>1.2.6</version>
|
||||||
<scope>provided</scope>
|
<scope>provided</scope>
|
||||||
|
<optional>true</optional>
|
||||||
</dependency>
|
</dependency>
|
||||||
<!-- Rpg Inventory -->
|
<!-- Rpg Inventory -->
|
||||||
<dependency>
|
<dependency>
|
||||||
@ -308,6 +318,7 @@
|
|||||||
<artifactId>rpginventory</artifactId>
|
<artifactId>rpginventory</artifactId>
|
||||||
<version>2.3.0</version>
|
<version>2.3.0</version>
|
||||||
<scope>provided</scope>
|
<scope>provided</scope>
|
||||||
|
<optional>true</optional>
|
||||||
</dependency>
|
</dependency>
|
||||||
<!-- Holograms -->
|
<!-- Holograms -->
|
||||||
<dependency>
|
<dependency>
|
||||||
@ -315,6 +326,7 @@
|
|||||||
<artifactId>Holograms</artifactId>
|
<artifactId>Holograms</artifactId>
|
||||||
<version>2.9.1</version>
|
<version>2.9.1</version>
|
||||||
<scope>provided</scope>
|
<scope>provided</scope>
|
||||||
|
<optional>true</optional>
|
||||||
</dependency>
|
</dependency>
|
||||||
<!-- Aurelium Skills -->
|
<!-- Aurelium Skills -->
|
||||||
<dependency>
|
<dependency>
|
||||||
@ -322,6 +334,7 @@
|
|||||||
<artifactId>AureliumSkills</artifactId>
|
<artifactId>AureliumSkills</artifactId>
|
||||||
<version>1.2.8</version>
|
<version>1.2.8</version>
|
||||||
<scope>provided</scope>
|
<scope>provided</scope>
|
||||||
|
<optional>true</optional>
|
||||||
</dependency>
|
</dependency>
|
||||||
<!-- Crazy Enchantments -->
|
<!-- Crazy Enchantments -->
|
||||||
<dependency>
|
<dependency>
|
||||||
@ -329,6 +342,7 @@
|
|||||||
<artifactId>crazyenchantments</artifactId>
|
<artifactId>crazyenchantments</artifactId>
|
||||||
<version>1.8-db9</version>
|
<version>1.8-db9</version>
|
||||||
<scope>provided</scope>
|
<scope>provided</scope>
|
||||||
|
<optional>true</optional>
|
||||||
</dependency>
|
</dependency>
|
||||||
<!-- Citizens -->
|
<!-- Citizens -->
|
||||||
<dependency>
|
<dependency>
|
||||||
@ -336,6 +350,7 @@
|
|||||||
<artifactId>Citizens</artifactId>
|
<artifactId>Citizens</artifactId>
|
||||||
<version>2.0.30</version>
|
<version>2.0.30</version>
|
||||||
<scope>provided</scope>
|
<scope>provided</scope>
|
||||||
|
<optional>true</optional>
|
||||||
</dependency>
|
</dependency>
|
||||||
<!-- Denizen -->
|
<!-- Denizen -->
|
||||||
<dependency>
|
<dependency>
|
||||||
@ -343,6 +358,7 @@
|
|||||||
<artifactId>denizen</artifactId>
|
<artifactId>denizen</artifactId>
|
||||||
<version>1.2.1-b1744-REL</version>
|
<version>1.2.1-b1744-REL</version>
|
||||||
<scope>provided</scope>
|
<scope>provided</scope>
|
||||||
|
<optional>true</optional>
|
||||||
</dependency>
|
</dependency>
|
||||||
<!-- Denizen -->
|
<!-- Denizen -->
|
||||||
<dependency>
|
<dependency>
|
||||||
@ -350,6 +366,7 @@
|
|||||||
<artifactId>depenizen</artifactId>
|
<artifactId>depenizen</artifactId>
|
||||||
<version>2.0.0-b709</version>
|
<version>2.0.0-b709</version>
|
||||||
<scope>provided</scope>
|
<scope>provided</scope>
|
||||||
|
<optional>true</optional>
|
||||||
</dependency>
|
</dependency>
|
||||||
</dependencies>
|
</dependencies>
|
||||||
|
|
||||||
|
@ -76,10 +76,15 @@ public class PlayerData extends SynchronizedDataHolder implements Closeable {
|
|||||||
return mmoData;
|
return mmoData;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Deprecated
|
||||||
public UUID getUniqueId() {
|
public UUID getUniqueId() {
|
||||||
return mmoData.getUniqueId();
|
return mmoData.getUniqueId();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public UUID getProfileId() {
|
||||||
|
return mmoData.getProfileId();
|
||||||
|
}
|
||||||
|
|
||||||
public boolean isOnline() {
|
public boolean isOnline() {
|
||||||
return mmoData.isOnline();
|
return mmoData.isOnline();
|
||||||
}
|
}
|
||||||
|
@ -96,7 +96,7 @@ public class MMOCoreHook implements RPGHandler, Listener {
|
|||||||
public MMOCoreRPGPlayer(PlayerData playerData) {
|
public MMOCoreRPGPlayer(PlayerData playerData) {
|
||||||
super(playerData);
|
super(playerData);
|
||||||
|
|
||||||
data = net.Indyuce.mmocore.api.player.PlayerData.get(playerData.getUniqueId());
|
data = net.Indyuce.mmocore.api.player.PlayerData.get(playerData.getPlayer());
|
||||||
}
|
}
|
||||||
|
|
||||||
public net.Indyuce.mmocore.api.player.PlayerData getData() {
|
public net.Indyuce.mmocore.api.player.PlayerData getData() {
|
||||||
|
@ -30,7 +30,7 @@ public class AttributeCondition extends Condition {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean isMet(net.Indyuce.mmoitems.api.player.PlayerData data) {
|
public boolean isMet(net.Indyuce.mmoitems.api.player.PlayerData data) {
|
||||||
return PlayerData.get(data.getUniqueId()).getAttributes().getAttribute(attribute) >= points;
|
return PlayerData.get(data.getPlayer()).getAttributes().getAttribute(attribute) >= points;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -31,8 +31,8 @@ public class ExperienceCraftingTrigger extends Trigger {
|
|||||||
@Override
|
@Override
|
||||||
public void whenCrafting(net.Indyuce.mmoitems.api.player.PlayerData data) {
|
public void whenCrafting(net.Indyuce.mmoitems.api.player.PlayerData data) {
|
||||||
if (profession == null)
|
if (profession == null)
|
||||||
PlayerData.get(data.getUniqueId()).giveExperience(amount, EXPSource.SOURCE);
|
PlayerData.get(data.getPlayer()).giveExperience(amount, EXPSource.SOURCE);
|
||||||
else
|
else
|
||||||
PlayerData.get(data.getUniqueId()).getCollectionSkills().giveExperience(profession, amount, EXPSource.SOURCE);
|
PlayerData.get(data.getPlayer()).getCollectionSkills().giveExperience(profession, amount, EXPSource.SOURCE);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -31,7 +31,7 @@ public class ProfessionCondition extends Condition {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean isMet(net.Indyuce.mmoitems.api.player.PlayerData data) {
|
public boolean isMet(net.Indyuce.mmoitems.api.player.PlayerData data) {
|
||||||
return PlayerData.get(data.getUniqueId()).getCollectionSkills().getLevel(profession) >= level;
|
return PlayerData.get(data.getPlayer()).getCollectionSkills().getLevel(profession) >= level;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -16,7 +16,7 @@ public class StelliumCondition extends Condition {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean isMet(PlayerData data) {
|
public boolean isMet(PlayerData data) {
|
||||||
return net.Indyuce.mmocore.api.player.PlayerData.get(data.getUniqueId()).getStellium() >= amount;
|
return net.Indyuce.mmocore.api.player.PlayerData.get(data.getPlayer()).getStellium() >= amount;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@ -26,6 +26,6 @@ public class StelliumCondition extends Condition {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void whenCrafting(PlayerData data) {
|
public void whenCrafting(PlayerData data) {
|
||||||
net.Indyuce.mmocore.api.player.PlayerData.get(data.getUniqueId()).giveStellium(-amount);
|
net.Indyuce.mmocore.api.player.PlayerData.get(data.getPlayer()).giveStellium(-amount);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -33,7 +33,7 @@ public class ItemTemplateDropItem extends ItemGenerationDropItem {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void collect(LootBuilder builder) {
|
public void collect(LootBuilder builder) {
|
||||||
RPGPlayer rpgPlayer = PlayerData.get(builder.getEntity().getUniqueId()).getRPG();
|
RPGPlayer rpgPlayer = PlayerData.get(builder.getEntity().getPlayer()).getRPG();
|
||||||
MMOItem mmoitem = rollMMOItem(template, rpgPlayer);
|
MMOItem mmoitem = rollMMOItem(template, rpgPlayer);
|
||||||
|
|
||||||
if (rollSoulbound())
|
if (rollSoulbound())
|
||||||
|
@ -32,7 +32,7 @@ public class MMOItemTrigger extends Trigger {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void apply(PlayerData player) {
|
public void apply(PlayerData player) {
|
||||||
ItemStack item = template.newBuilder(net.Indyuce.mmoitems.api.player.PlayerData.get(player.getUniqueId()).getRPG()).build().newBuilder().build();
|
ItemStack item = template.newBuilder(net.Indyuce.mmoitems.api.player.PlayerData.get(player.getPlayer()).getRPG()).build().newBuilder().build();
|
||||||
item.setAmount(amount);
|
item.setAmount(amount);
|
||||||
new SmartGive(player.getPlayer()).give(item);
|
new SmartGive(player.getPlayer()).give(item);
|
||||||
}
|
}
|
||||||
|
@ -52,7 +52,7 @@ public class RandomItemDropItem extends ItemGenerationDropItem {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void collect(LootBuilder builder) {
|
public void collect(LootBuilder builder) {
|
||||||
RPGPlayer rpgPlayer = PlayerData.get(builder.getEntity().getUniqueId()).getRPG();
|
RPGPlayer rpgPlayer = PlayerData.get(builder.getEntity().getPlayer()).getRPG();
|
||||||
|
|
||||||
TemplateExplorer explorer = new TemplateExplorer();
|
TemplateExplorer explorer = new TemplateExplorer();
|
||||||
if (matchClass)
|
if (matchClass)
|
||||||
|
@ -14,7 +14,7 @@ public class RacesAndClassesHook implements RPGHandler, Listener {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void refreshStats(PlayerData data) {
|
public void refreshStats(PlayerData data) {
|
||||||
RaCPlayer info = RaCPlayerManager.get().getPlayer(data.getUniqueId());
|
RaCPlayer info = RaCPlayerManager.get().getPlayer(data.getPlayer());
|
||||||
info.getManaManager().removeMaxManaBonus("MMOItems");
|
info.getManaManager().removeMaxManaBonus("MMOItems");
|
||||||
info.getManaManager().addMaxManaBonus("MMOItems", data.getStats().getStat(ItemStats.MAX_MANA));
|
info.getManaManager().addMaxManaBonus("MMOItems", data.getStats().getStat(ItemStats.MAX_MANA));
|
||||||
}
|
}
|
||||||
|
@ -35,19 +35,19 @@ public class SkillsProHook implements RPGHandler, Listener {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public int getLevel() {
|
public int getLevel() {
|
||||||
SkilledPlayer info = SkillsPro.get().getPlayerDataManager().getData(getPlayerData().getUniqueId());
|
SkilledPlayer info = SkillsPro.get().getPlayerDataManager().getData(getPlayerData().getPlayer().getUniqueId());
|
||||||
return info.getLevel();
|
return info.getLevel();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String getClassName() {
|
public String getClassName() {
|
||||||
SkilledPlayer info = SkillsPro.get().getPlayerDataManager().getData(getPlayerData().getUniqueId());
|
SkilledPlayer info = SkillsPro.get().getPlayerDataManager().getData(getPlayerData().getPlayer().getUniqueId());
|
||||||
return ChatColor.stripColor(info.getSkill().getDisplayName());
|
return ChatColor.stripColor(info.getSkill().getDisplayName());
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public double getMana() {
|
public double getMana() {
|
||||||
SkilledPlayer info = SkillsPro.get().getPlayerDataManager().getData(getPlayerData().getUniqueId());
|
SkilledPlayer info = SkillsPro.get().getPlayerDataManager().getData(getPlayerData().getPlayer().getUniqueId());
|
||||||
return info.getEnergy();
|
return info.getEnergy();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -58,7 +58,7 @@ public class SkillsProHook implements RPGHandler, Listener {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void setMana(double value) {
|
public void setMana(double value) {
|
||||||
SkilledPlayer info = SkillsPro.get().getPlayerDataManager().getData(getPlayerData().getUniqueId());
|
SkilledPlayer info = SkillsPro.get().getPlayerDataManager().getData(getPlayerData().getPlayer().getUniqueId());
|
||||||
info.setEnergy(value);
|
info.setEnergy(value);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -85,7 +85,7 @@ public class AbilityData extends Skill {
|
|||||||
@Override
|
@Override
|
||||||
public boolean getResult(SkillMetadata meta) {
|
public boolean getResult(SkillMetadata meta) {
|
||||||
|
|
||||||
PlayerData playerData = PlayerData.get(meta.getCaster().getData().getUniqueId());
|
PlayerData playerData = PlayerData.get(meta.getCaster().getPlayer());
|
||||||
RPGPlayer rpgPlayer = playerData.getRPG();
|
RPGPlayer rpgPlayer = playerData.getRPG();
|
||||||
Player player = meta.getCaster().getPlayer();
|
Player player = meta.getCaster().getPlayer();
|
||||||
|
|
||||||
@ -124,7 +124,7 @@ public class AbilityData extends Skill {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void whenCast(SkillMetadata meta) {
|
public void whenCast(SkillMetadata meta) {
|
||||||
PlayerData playerData = PlayerData.get(meta.getCaster().getData().getUniqueId());
|
PlayerData playerData = PlayerData.get(meta.getCaster().getPlayer());
|
||||||
RPGPlayer rpgPlayer = playerData.getRPG();
|
RPGPlayer rpgPlayer = playerData.getRPG();
|
||||||
|
|
||||||
// Apply mana cost
|
// Apply mana cost
|
||||||
|
@ -26,6 +26,7 @@
|
|||||||
<artifactId>spigot-api</artifactId>
|
<artifactId>spigot-api</artifactId>
|
||||||
<version>1.18-R0.1-SNAPSHOT</version>
|
<version>1.18-R0.1-SNAPSHOT</version>
|
||||||
<scope>provided</scope>
|
<scope>provided</scope>
|
||||||
|
<optional>true</optional>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
<!-- MMOItems API -->
|
<!-- MMOItems API -->
|
||||||
@ -40,7 +41,7 @@
|
|||||||
<dependency>
|
<dependency>
|
||||||
<groupId>fr.phoenixdevt</groupId>
|
<groupId>fr.phoenixdevt</groupId>
|
||||||
<artifactId>Profile-API</artifactId>
|
<artifactId>Profile-API</artifactId>
|
||||||
<version>1.0</version>
|
<version>1.1</version>
|
||||||
<scope>provided</scope>
|
<scope>provided</scope>
|
||||||
<optional>true</optional>
|
<optional>true</optional>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
package net.Indyuce.mmoitems.listener;
|
package net.Indyuce.mmoitems.listener;
|
||||||
|
|
||||||
import fr.phoenixdevt.profile.event.ProfileSelectEvent;
|
import fr.phoenixdevt.profiles.event.ProfileSelectEvent;
|
||||||
import org.bukkit.event.EventHandler;
|
import org.bukkit.event.EventHandler;
|
||||||
import org.bukkit.event.EventPriority;
|
import org.bukkit.event.EventPriority;
|
||||||
import org.bukkit.event.Listener;
|
import org.bukkit.event.Listener;
|
||||||
|
Loading…
Reference in New Issue
Block a user