This commit is contained in:
nossr50 2021-01-21 15:38:31 -08:00
parent 27ae7ae1a7
commit bf9bb6ffd8
3 changed files with 10 additions and 7 deletions

View File

@ -1,5 +1,6 @@
Version 2.1.172 Version 2.1.172
Added 'mcmmo.broadcast.levelup' permission node, if a player lacks this node they will not have their level up milestones broadcast to chat Updated german locale (thanks TheBusyBiscuit)
Added 'mcmmo.broadcast.levelup' permission node, if a player lacks this node they will not have their level up milestones broadcast to chat, this is a default permission node
Power Levels are now included in level up broadcasts and they have their own settings (mirroring the existing settings for skill broadcasts) Power Levels are now included in level up broadcasts and they have their own settings (mirroring the existing settings for skill broadcasts)
Added 'General.Level_Up_Chat_Broadcasts.Broadcast_Powerlevels' to config.yml Added 'General.Level_Up_Chat_Broadcasts.Broadcast_Powerlevels' to config.yml
Added 'General.Level_Up_Chat_Broadcasts.Broadcast_Powerlevels.Enabled' to config.yml Added 'General.Level_Up_Chat_Broadcasts.Broadcast_Powerlevels.Enabled' to config.yml
@ -10,19 +11,18 @@ Version 2.1.172
Added 'General.Level_Up_Chat_Broadcasts.Broadcast_Powerlevels.Broadcast_Targets.Distance_Restrictions.Restrict_Distance' to config.yml Added 'General.Level_Up_Chat_Broadcasts.Broadcast_Powerlevels.Broadcast_Targets.Distance_Restrictions.Restrict_Distance' to config.yml
Added 'General.Level_Up_Chat_Broadcasts.Broadcast_Powerlevels.Broadcast_Targets.Distance_Restrictions.Restricted_Radius' to config.yml Added 'General.Level_Up_Chat_Broadcasts.Broadcast_Powerlevels.Broadcast_Targets.Distance_Restrictions.Restricted_Radius' to config.yml
Added 'Broadcasts.PowerLevelUpMilestone' to locale Added 'Broadcasts.PowerLevelUpMilestone' to locale
You can now disable the XP orbs from being dropped when Knock On Wood triggers during Tree Feller You can now disable the XP orbs from being dropped when Knock On Wood triggers during Tree Feller
Added 'Skills.Woodcutting.TreeFeller.Knock_On_Wood.Add_XP_Orbs_To_Drops' to advanced.yml Added 'Skills.Woodcutting.TreeFeller.Knock_On_Wood.Add_XP_Orbs_To_Drops' to advanced.yml
Updated german locale (thanks TheBusyBiscuit)
Updated bStats (thanks TheBusyBiscuit)
Changed Fists to not be capitalized (en_US) when lowering/readying berserk Changed Fists to not be capitalized (en_US) when lowering/readying berserk
SkillActivationPerkEvent can now be called in async threads (thanks electronicboy) SkillActivationPerkEvent can now be called in async threads (thanks electronicboy)
Removed a few never implemented settings from Skills.Woodcutting.TreeFeller in advanced.yml Removed a few never implemented settings from Skills.Woodcutting.TreeFeller in advanced.yml
Updated bStats (thanks TheBusyBiscuit)
Fixed some incorrect reporting to bStats (I'm so dyslexic...) Fixed some incorrect reporting to bStats (I'm so dyslexic...)
NOTES: NOTES:
The new 'mcmmo.broadcast.levelup' node is a default node included under the 'mcmmo.defaults' node umbrella, you shouldn't have to give this to your players unless they don't have access to 'mcmmo.defaults' The new 'mcmmo.broadcast.levelup' node is a default node included under the 'mcmmo.defaults' node umbrella, you shouldn't have to give this to your players unless they don't have access to 'mcmmo.defaults'
If you don't have a permission plugin you don't need to worry, players will have this node by default in that case If you don't have a permission plugin you don't need to worry, players will have this node by default in that case
There are situations where level up broadcasts will be skipped, for example if you go from level 0 -> 101 via addlevels or mmmoedit, and your broadcast interval is 100, it will be skipped as 101 falls out of this interval, this kind of skip only applies to command based leveling. Players gaining levels naturally should never have their broadcasts skipped. I'll fix this particular interaction in the future so that command based leveling never skips over milestone broadcasts, but for now it does.
Version 2.1.171 Version 2.1.171
Fixed a bug where arrows shot by infinite bow enchant would duplicate Fixed a bug where arrows shot by infinite bow enchant would duplicate

View File

@ -2,7 +2,7 @@
<modelVersion>4.0.0</modelVersion> <modelVersion>4.0.0</modelVersion>
<groupId>com.gmail.nossr50.mcMMO</groupId> <groupId>com.gmail.nossr50.mcMMO</groupId>
<artifactId>mcMMO</artifactId> <artifactId>mcMMO</artifactId>
<version>2.1.172-SNAPSHOT</version> <version>2.1.172</version>
<name>mcMMO</name> <name>mcMMO</name>
<url>https://github.com/mcMMO-Dev/mcMMO</url> <url>https://github.com/mcMMO-Dev/mcMMO</url>
<scm> <scm>

View File

@ -267,6 +267,8 @@ public class NotificationManager {
return newArray; return newArray;
} }
//TODO: Remove the code duplication, am lazy atm
//TODO: Fix broadcasts being skipped for situations where a player skips over the milestone like with the addlevels command
public static void processLevelUpBroadcasting(@NotNull McMMOPlayer mmoPlayer, @NotNull PrimarySkillType primarySkillType, int level) { public static void processLevelUpBroadcasting(@NotNull McMMOPlayer mmoPlayer, @NotNull PrimarySkillType primarySkillType, int level) {
if(level <= 0) if(level <= 0)
return; return;
@ -295,12 +297,13 @@ public class NotificationManager {
String localeMessage = LocaleLoader.getString("Broadcasts.LevelUpMilestone", mmoPlayer.getPlayer().getDisplayName(), level, primarySkillType.getName()); String localeMessage = LocaleLoader.getString("Broadcasts.LevelUpMilestone", mmoPlayer.getPlayer().getDisplayName(), level, primarySkillType.getName());
Component message = Component.text(localeMessage).hoverEvent(levelMilestoneHover); Component message = Component.text(localeMessage).hoverEvent(levelMilestoneHover);
audience.sendMessage(Identity.nil(), message); Bukkit.getScheduler().runTaskLater(mcMMO.p, () -> {audience.sendMessage(Identity.nil(), message);}, 0);
} }
} }
} }
//TODO: Remove the code duplication, am lazy atm //TODO: Remove the code duplication, am lazy atm
//TODO: Fix broadcasts being skipped for situations where a player skips over the milestone like with the addlevels command
public static void processPowerLevelUpBroadcasting(@NotNull McMMOPlayer mmoPlayer, int powerLevel) { public static void processPowerLevelUpBroadcasting(@NotNull McMMOPlayer mmoPlayer, int powerLevel) {
if(powerLevel <= 0) if(powerLevel <= 0)
return; return;
@ -329,7 +332,7 @@ public class NotificationManager {
String localeMessage = LocaleLoader.getString("Broadcasts.PowerLevelUpMilestone", mmoPlayer.getPlayer().getDisplayName(), powerLevel); String localeMessage = LocaleLoader.getString("Broadcasts.PowerLevelUpMilestone", mmoPlayer.getPlayer().getDisplayName(), powerLevel);
Component message = Component.text(localeMessage).hoverEvent(levelMilestoneHover); Component message = Component.text(localeMessage).hoverEvent(levelMilestoneHover);
audience.sendMessage(Identity.nil(), message); Bukkit.getScheduler().runTaskLater(mcMMO.p, () -> {audience.sendMessage(Identity.nil(), message);}, 0);
} }
} }
} }