mirror of
https://github.com/mcMMO-Dev/mcMMO.git
synced 2024-11-26 07:06:45 +01:00
2.1.32
This commit is contained in:
parent
c6d055cb48
commit
ae551e17cd
@ -7,6 +7,11 @@ Key:
|
|||||||
! Change
|
! Change
|
||||||
- Removal
|
- Removal
|
||||||
|
|
||||||
|
Version 2.1.32
|
||||||
|
Completely removed Fireworks from mcMMO because they lag
|
||||||
|
Added 'General.AprilFoolsEvent' setting to config.yml to turn off April Fools
|
||||||
|
NOTE: April Fools event has been in mcMMO for a long time, I did not write it so I didn't know it spawned fireworks like crazy.
|
||||||
|
|
||||||
Version 2.1.31
|
Version 2.1.31
|
||||||
Fixed a bug where certain SubSkills did not properly send unlock or rank up notifications
|
Fixed a bug where certain SubSkills did not properly send unlock or rank up notifications
|
||||||
Fixed a bug where unlock notifications would send simultaneously for a specific skill (still happens if mmoedit changes all skill levels on a player at once)
|
Fixed a bug where unlock notifications would send simultaneously for a specific skill (still happens if mmoedit changes all skill levels on a player at once)
|
||||||
|
2
pom.xml
2
pom.xml
@ -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.32-SNAPSHOT</version>
|
<version>2.1.32</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>
|
||||||
|
@ -245,6 +245,8 @@ public class Config extends AutoUpdateConfigLoader {
|
|||||||
* GENERAL SETTINGS
|
* GENERAL SETTINGS
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
public boolean isAprilFoolsAllowed() { return config.getBoolean("General.AprilFoolsEvent", true); }
|
||||||
|
|
||||||
/* General Settings */
|
/* General Settings */
|
||||||
public boolean getIsMetricsEnabled() { return config.getBoolean("Metrics.bstats", true); }
|
public boolean getIsMetricsEnabled() { return config.getBoolean("Metrics.bstats", true); }
|
||||||
|
|
||||||
|
@ -1,6 +1,7 @@
|
|||||||
package com.gmail.nossr50.util;
|
package com.gmail.nossr50.util;
|
||||||
|
|
||||||
import com.gmail.nossr50.commands.skills.AprilCommand;
|
import com.gmail.nossr50.commands.skills.AprilCommand;
|
||||||
|
import com.gmail.nossr50.config.Config;
|
||||||
import com.gmail.nossr50.datatypes.interactions.NotificationType;
|
import com.gmail.nossr50.datatypes.interactions.NotificationType;
|
||||||
import com.gmail.nossr50.datatypes.skills.PrimarySkillType;
|
import com.gmail.nossr50.datatypes.skills.PrimarySkillType;
|
||||||
import com.gmail.nossr50.locale.LocaleLoader;
|
import com.gmail.nossr50.locale.LocaleLoader;
|
||||||
@ -310,6 +311,9 @@ public final class HolidayManager {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public boolean isAprilFirst() {
|
public boolean isAprilFirst() {
|
||||||
|
if(!Config.getInstance().isAprilFoolsAllowed())
|
||||||
|
return false;
|
||||||
|
|
||||||
GregorianCalendar aprilFirst = new GregorianCalendar(currentYear, Calendar.APRIL, 1);
|
GregorianCalendar aprilFirst = new GregorianCalendar(currentYear, Calendar.APRIL, 1);
|
||||||
GregorianCalendar aprilSecond = new GregorianCalendar(currentYear, Calendar.APRIL, 2);
|
GregorianCalendar aprilSecond = new GregorianCalendar(currentYear, Calendar.APRIL, 2);
|
||||||
GregorianCalendar day = new GregorianCalendar();
|
GregorianCalendar day = new GregorianCalendar();
|
||||||
@ -317,6 +321,9 @@ public final class HolidayManager {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public boolean nearingAprilFirst() {
|
public boolean nearingAprilFirst() {
|
||||||
|
if(!Config.getInstance().isAprilFoolsAllowed())
|
||||||
|
return false;
|
||||||
|
|
||||||
GregorianCalendar start = new GregorianCalendar(Calendar.getInstance().get(Calendar.YEAR), Calendar.MARCH, 28);
|
GregorianCalendar start = new GregorianCalendar(Calendar.getInstance().get(Calendar.YEAR), Calendar.MARCH, 28);
|
||||||
GregorianCalendar end = new GregorianCalendar(Calendar.getInstance().get(Calendar.YEAR), Calendar.APRIL, 2);
|
GregorianCalendar end = new GregorianCalendar(Calendar.getInstance().get(Calendar.YEAR), Calendar.APRIL, 2);
|
||||||
GregorianCalendar day = new GregorianCalendar();
|
GregorianCalendar day = new GregorianCalendar();
|
||||||
@ -357,6 +364,9 @@ public final class HolidayManager {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public void levelUpApril(Player player, FakeSkillType fakeSkillType) {
|
public void levelUpApril(Player player, FakeSkillType fakeSkillType) {
|
||||||
|
if(!Config.getInstance().isAprilFoolsAllowed())
|
||||||
|
return;
|
||||||
|
|
||||||
int levelTotal = Misc.getRandom().nextInt(1 + UserManager.getPlayer(player).getSkillLevel(PrimarySkillType.MINING)) + 1;
|
int levelTotal = Misc.getRandom().nextInt(1 + UserManager.getPlayer(player).getSkillLevel(PrimarySkillType.MINING)) + 1;
|
||||||
SoundManager.sendSound(player, player.getLocation(), SoundType.LEVEL_UP);
|
SoundManager.sendSound(player, player.getLocation(), SoundType.LEVEL_UP);
|
||||||
NotificationManager.sendPlayerInformation(player, NotificationType.HOLIDAY, "Holiday.AprilFools.Levelup", StringUtils.getCapitalized(fakeSkillType.toString()), String.valueOf(levelTotal));
|
NotificationManager.sendPlayerInformation(player, NotificationType.HOLIDAY, "Holiday.AprilFools.Levelup", StringUtils.getCapitalized(fakeSkillType.toString()), String.valueOf(levelTotal));
|
||||||
@ -364,6 +374,9 @@ public final class HolidayManager {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public void registerAprilCommand() {
|
public void registerAprilCommand() {
|
||||||
|
if(!Config.getInstance().isAprilFoolsAllowed())
|
||||||
|
return;
|
||||||
|
|
||||||
PluginCommand command = mcMMO.p.getCommand("mcfools");
|
PluginCommand command = mcMMO.p.getCommand("mcfools");
|
||||||
command.setExecutor(new AprilCommand());
|
command.setExecutor(new AprilCommand());
|
||||||
}
|
}
|
||||||
|
@ -14,6 +14,7 @@ General:
|
|||||||
RetroMode:
|
RetroMode:
|
||||||
Enabled: false
|
Enabled: false
|
||||||
Locale: en_US
|
Locale: en_US
|
||||||
|
AprilFoolsEvent: true
|
||||||
MOTD_Enabled: true
|
MOTD_Enabled: true
|
||||||
# Send a message to the player when his profile was successfully loaded
|
# Send a message to the player when his profile was successfully loaded
|
||||||
Show_Profile_Loaded: false
|
Show_Profile_Loaded: false
|
||||||
|
Loading…
Reference in New Issue
Block a user