Skip to content

Commit

Permalink
update mcmmo depend
Browse files Browse the repository at this point in the history
  • Loading branch information
mcmonkey4eva committed Apr 28, 2021
1 parent af3fdbb commit ac0611b
Show file tree
Hide file tree
Showing 6 changed files with 16 additions and 16 deletions.
2 changes: 1 addition & 1 deletion Docs/BukkitPlugins.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ Supported Plugins: (And the sources we acquired Jar files from.)
- Lib's Disguises (https://www.spigotmc.org/resources/libs-disguises.32453/)
- LuckPerms (https://www.spigotmc.org/resources/luckperms-an-advanced-permissions-plugin.28140/)
- MagicSpells (https://github.com/TheComputerGeek2/MagicSpells/releases)
- mcMMO (https://papermc.io/ci/job/mcMMO/)
- mcMMO (https://ci.mcmmo.org/job/mcMMO/job/mcMMO/)
- MobArena (http://dev.bukkit.org/bukkit-plugins/mobarena/)
- MythicMobs (https://www.spigotmc.org/resources/mythicmobs.5702/)
- NoCheatPlus (http://ci.md-5.net/job/NoCheatPlus/)
Expand Down
2 changes: 1 addition & 1 deletion lib
Submodule lib updated 1 files
+ mcMMO.jar
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,7 @@
<dependency>
<groupId>com.gmail.nossr50.mcMMO</groupId>
<artifactId>mcMMO</artifactId>
<version>2.1.148-SNAPSHOT</version>
<version>2.1.197-SNAPSHOT</version>
<scope>system</scope>
<systemPath>${basedir}/lib/mcMMO.jar</systemPath>
</dependency>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,9 @@
import com.denizenscript.denizencore.objects.Argument;
import com.gmail.nossr50.api.ExperienceAPI;
import com.gmail.nossr50.api.PartyAPI;
import com.gmail.nossr50.config.Config;
import com.gmail.nossr50.config.experience.ExperienceConfig;
import com.gmail.nossr50.database.DatabaseManagerFactory;
import com.gmail.nossr50.datatypes.skills.PrimarySkillType;
import com.gmail.nossr50.mcMMO;
import com.gmail.nossr50.party.PartyManager;
import com.denizenscript.denizen.objects.PlayerTag;
import com.denizenscript.denizen.utilities.debugging.Debug;
Expand Down Expand Up @@ -178,7 +177,7 @@ else if (player != null && player.isOnline() && party != null && PartyManager.ge
}
}
else if (player != null) {
DatabaseManagerFactory.getDatabaseManager().removeUser(player.getName(), player.getUUID());
mcMMO.getDatabaseManager().removeUser(player.getName(), player.getUUID());
}
break;
}
Expand Down Expand Up @@ -224,18 +223,18 @@ else if (player != null) {
return;
}
PrimarySkillType skillType = PrimarySkillType.getSkill(skill.asString());
boolean isEnabled = Config.getInstance().getHardcoreStatLossEnabled(skillType);
boolean isEnabled = mcMMO.p.getGeneralConfig().getHardcoreStatLossEnabled(skillType);
switch (State.valueOf(state.asString().toUpperCase())) {
case TOGGLE: {
Config.getInstance().setHardcoreStatLossEnabled(skillType, !isEnabled);
mcMMO.p.getGeneralConfig().setHardcoreStatLossEnabled(skillType, !isEnabled);
break;
}
case TRUE: {
Config.getInstance().setHardcoreStatLossEnabled(skillType, true);
mcMMO.p.getGeneralConfig().setHardcoreStatLossEnabled(skillType, true);
break;
}
case FALSE: {
Config.getInstance().setHardcoreStatLossEnabled(skillType, false);
mcMMO.p.getGeneralConfig().setHardcoreStatLossEnabled(skillType, false);
break;
}
}
Expand All @@ -246,18 +245,18 @@ else if (player != null) {
return;
}
PrimarySkillType skillType = PrimarySkillType.getSkill(skill.asString());
boolean isEnabled = Config.getInstance().getHardcoreVampirismEnabled(skillType);
boolean isEnabled = mcMMO.p.getGeneralConfig().getHardcoreVampirismEnabled(skillType);
switch (State.valueOf(state.asString().toUpperCase())) {
case TOGGLE: {
Config.getInstance().setHardcoreVampirismEnabled(skillType, !isEnabled);
mcMMO.p.getGeneralConfig().setHardcoreVampirismEnabled(skillType, !isEnabled);
break;
}
case TRUE: {
Config.getInstance().setHardcoreVampirismEnabled(skillType, true);
mcMMO.p.getGeneralConfig().setHardcoreVampirismEnabled(skillType, true);
break;
}
case FALSE: {
Config.getInstance().setHardcoreVampirismEnabled(skillType, false);
mcMMO.p.getGeneralConfig().setHardcoreVampirismEnabled(skillType, false);
break;
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
import com.denizenscript.denizencore.objects.ObjectTag;
import com.denizenscript.denizencore.objects.properties.Property;
import com.denizenscript.denizencore.tags.Attribute;
import com.gmail.nossr50.util.compat.layers.persistentdata.MobMetaFlagType;

public class McMMOEntityProperties implements Property {

Expand Down Expand Up @@ -66,7 +67,7 @@ public String getAttribute(Attribute attribute) {
// Returns whether the entity is tracked by McMMO as a 'spawned' mob (one from a spawner block or spawn egg).
// -->
if (attribute.startsWith("is_spawned_mob")) {
return new ElementTag(entity.getBukkitEntity().hasMetadata(mcMMO.entityMetadataKey))
return new ElementTag(mcMMO.getCompatibilityManager().getPersistentDataLayer().hasMobFlag(MobMetaFlagType.MOB_SPAWNER_MOB, entity.getLivingEntity()))
.getAttribute(attribute.fulfill(1));
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ public String getAttribute(Attribute attribute) {
// Returns whether the location is tracked by McMMO as a player-placed block (might only apply to certain block types).
// -->
if (attribute.startsWith("is_placed")) {
return new ElementTag(mcMMO.getPlaceStore().isTrue(location.getBlockX(), location.getBlockY(), location.getBlockZ(), location.getWorld()))
return new ElementTag(mcMMO.getPlaceStore().isTrue(location.getBlock()))
.getAttribute(attribute.fulfill(1));
}
}
Expand Down

0 comments on commit ac0611b

Please sign in to comment.