mirror of
https://github.com/mcMMO-Dev/mcMMO.git
synced 2025-06-28 11:44:42 +02:00
Merge branch 'master' of github.com:mcMMO-Dev/mcMMO into tridentsxbows
This commit is contained in:
@ -943,6 +943,10 @@ public class McMMOPlayer {
|
||||
}
|
||||
|
||||
public void processAbilityActivation(PrimarySkillType skill) {
|
||||
if (!skill.getPermissions(getPlayer())) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (Config.getInstance().getAbilitiesOnlyActivateWhenSneaking() && !player.isSneaking()) {
|
||||
return;
|
||||
}
|
||||
|
@ -27,7 +27,7 @@ public final class MobHealthbarUtils {
|
||||
EntityDamageEvent lastDamageCause = player.getLastDamageCause();
|
||||
String replaceString = lastDamageCause instanceof EntityDamageByEntityEvent ? StringUtils.getPrettyEntityTypeString(((EntityDamageByEntityEvent) lastDamageCause).getDamager().getType()) : "a mob";
|
||||
|
||||
return deathMessage.replaceAll("(?:\u00A7(?:[0-9A-FK-ORa-fk-or]){1}(?:[\u2764\u25A0]{1,10})){1,2}", replaceString);
|
||||
return deathMessage.replaceAll("(?:(\u00A7(?:[0-9A-FK-ORa-fk-or]))*(?:[\u2764\u25A0]{1,10})){1,2}", replaceString);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -51,20 +51,22 @@ public class CompatibilityManager {
|
||||
* For any unsupported layers, load a dummy layer
|
||||
*/
|
||||
private void initCompatibilityLayers() {
|
||||
if(nmsVersion == NMSVersion.UNSUPPORTED) {
|
||||
mcMMO.p.getLogger().info("NMS not supported for this version of Minecraft, possible solutions include updating mcMMO or updating your server software. NMS Support is not available on every version of Minecraft.");
|
||||
mcMMO.p.getLogger().info("Certain features of mcMMO that require NMS will be disabled, you can check what is disabled by running the /mmocompat command!");
|
||||
//Load dummy compatibility layers
|
||||
isFullyCompatibleServerSoftware = false;
|
||||
loadDummyCompatibilityLayers();
|
||||
} else {
|
||||
playerAttackCooldownExploitPreventionLayer = new PlayerAttackCooldownExploitPreventionLayer(nmsVersion);
|
||||
isFullyCompatibleServerSoftware = true;
|
||||
|
||||
//Mark as operational
|
||||
if(playerAttackCooldownExploitPreventionLayer.noErrorsOnInitialize()) {
|
||||
supportedLayers.put(CompatibilityType.PLAYER_ATTACK_COOLDOWN_EXPLOIT_PREVENTION, true);
|
||||
}
|
||||
}
|
||||
// if(nmsVersion == NMSVersion.UNSUPPORTED) {
|
||||
// mcMMO.p.getLogger().info("NMS not supported for this version of Minecraft, possible solutions include updating mcMMO or updating your server software. NMS Support is not available on every version of Minecraft.");
|
||||
// mcMMO.p.getLogger().info("Certain features of mcMMO that require NMS will be disabled, you can check what is disabled by running the /mmocompat command!");
|
||||
// //Load dummy compatibility layers
|
||||
// isFullyCompatibleServerSoftware = false;
|
||||
// loadDummyCompatibilityLayers();
|
||||
// } else {
|
||||
// playerAttackCooldownExploitPreventionLayer = new PlayerAttackCooldownExploitPreventionLayer(nmsVersion);
|
||||
//
|
||||
// //Mark as operational
|
||||
// if(playerAttackCooldownExploitPreventionLayer.noErrorsOnInitialize()) {
|
||||
// supportedLayers.put(CompatibilityType.PLAYER_ATTACK_COOLDOWN_EXPLOIT_PREVENTION, true);
|
||||
// }
|
||||
// }
|
||||
}
|
||||
|
||||
private void loadDummyCompatibilityLayers() {
|
||||
|
Reference in New Issue
Block a user