Skip to content

Commit

Permalink
WIP 1.20.6 support
Browse files Browse the repository at this point in the history
  • Loading branch information
nossr50 committed May 2, 2024
1 parent 5628df9 commit 7855810
Show file tree
Hide file tree
Showing 51 changed files with 1,872 additions and 734 deletions.
7 changes: 7 additions & 0 deletions Changelog.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,13 @@
Version 2.2.007
Compatibility with the 1.20.5 MC Update
Alchemy now has more warning/errors that will print out to help debug
Fixed bug where Green Thumb did not replant if seed was in the off hand

NOTES:
I did my best to keep mcMMO compatible with older versions of Minecraft for this update.
This update to MC was quite large, with breaking changes to a lot of code relating to Alchemy, and some other things.
I expect there to be bugs, please report them on GitHub or Discord, but preferably GitHub.
I will be working on fixing these bugs as they come in, so please be patient.
Version 2.2.006
Added new config custom_item_support.yml
Added support for hex color codes in the locale file, uses the format &#RRGGBB (see notes)
Expand Down
33 changes: 30 additions & 3 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -254,8 +254,11 @@
<id>devmart-other</id>
<url>https://nexuslite.gcnt.net/repos/other/</url>
</repository>
<!-- ... -->
<!-- ... -->
<!-- MockBukkit -->
<repository>
<id>papermc</id>
<url>https://repo.papermc.io/repository/maven-public/</url>
</repository>
</repositories>
<dependencies>
<!-- https://mvnrepository.com/artifact/com.h2database/h2 -->
Expand Down Expand Up @@ -361,7 +364,7 @@
<dependency>
<groupId>org.spigotmc</groupId>
<artifactId>spigot-api</artifactId>
<version>1.20.4-R0.1-SNAPSHOT</version>
<version>1.20.5-R0.1-SNAPSHOT</version>
<scope>provided</scope>
</dependency>
<dependency>
Expand Down Expand Up @@ -435,5 +438,29 @@
<version>0.3.1</version>
<scope>compile</scope>
</dependency>
<!-- <dependency>-->
<!-- <groupId>org.apache.logging.log4j</groupId>-->
<!-- <artifactId>log4j-core</artifactId>-->
<!-- <version>2.22.1</version> &lt;!&ndash; Make sure this version matches the other log4j dependencies &ndash;&gt;-->
<!-- <scope>test</scope>-->
<!-- </dependency>-->
<!-- <dependency>-->
<!-- <groupId>org.apache.logging.log4j</groupId>-->
<!-- <artifactId>log4j-api</artifactId>-->
<!-- <version>2.22.1</version>-->
<!-- <scope>test</scope>-->
<!-- </dependency>-->
<!-- <dependency>-->
<!-- <groupId>org.apache.logging.log4j</groupId>-->
<!-- <artifactId>log4j-slf4j-impl</artifactId>-->
<!-- <version>2.22.1</version>-->
<!-- <scope>test</scope>-->
<!-- </dependency>-->
<!-- <dependency>-->
<!-- <groupId>com.github.seeseemelk</groupId>-->
<!-- <artifactId>MockBukkit-v1.19</artifactId>-->
<!-- <version>LATEST</version>-->
<!-- <scope>test</scope>-->
<!-- </dependency>-->
</dependencies>
</project>
56 changes: 56 additions & 0 deletions src/main/java/com/gmail/nossr50/commands/skills/MacesCommand.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
//package com.gmail.nossr50.commands.skills;
//
//import com.gmail.nossr50.datatypes.player.McMMOPlayer;
//import com.gmail.nossr50.datatypes.skills.PrimarySkillType;
//import com.gmail.nossr50.util.player.UserManager;
//import com.gmail.nossr50.util.skills.CombatUtils;
//import com.gmail.nossr50.util.skills.SkillUtils;
//import com.gmail.nossr50.util.text.TextComponentFactory;
//import net.kyori.adventure.text.Component;
//import org.bukkit.ChatColor;
//import org.bukkit.entity.Player;
//
//import java.util.ArrayList;
//import java.util.List;
//
//import static com.gmail.nossr50.datatypes.skills.SubSkillType.MACES_MACES_LIMIT_BREAK;
//
//public class MacesCommand extends SkillCommand {
//
// public MacesCommand() {
// super(PrimarySkillType.MACES);
// }
//
// @Override
// protected void dataCalculations(Player player, float skillValue) {}
//
// @Override
// protected void permissionsCheck(Player player) {}
//
// @Override
// protected List<String> statsDisplay(Player player, float skillValue, boolean hasEndurance, boolean isLucky) {
// List<String> messages = new ArrayList<>();
// McMMOPlayer mmoPlayer = UserManager.getPlayer(player);
// if (mmoPlayer == null) {
// return messages;
// }
//
// if(SkillUtils.canUseSubskill(player, MACES_MACES_LIMIT_BREAK)) {
// messages.add(getStatMessage(MACES_MACES_LIMIT_BREAK,
// String.valueOf(CombatUtils.getLimitBreakDamageAgainstQuality(player, MACES_MACES_LIMIT_BREAK, 1000))));
// }
//
// messages.add(ChatColor.GRAY + "The Maces skill is a work in progress and is still being developed," +
// " feedback would be appreciated in the mcMMO discord server.");
// return messages;
// }
//
// @Override
// protected List<Component> getTextComponents(Player player) {
// List<Component> textComponents = new ArrayList<>();
//
// TextComponentFactory.getSubSkillTextComponents(player, textComponents, PrimarySkillType.MACES);
//
// return textComponents;
// }
//}
17 changes: 13 additions & 4 deletions src/main/java/com/gmail/nossr50/config/LegacyConfigLoader.java
Original file line number Diff line number Diff line change
Expand Up @@ -4,31 +4,40 @@
import com.gmail.nossr50.util.LogUtils;
import org.bukkit.configuration.file.YamlConfiguration;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.VisibleForTesting;

import java.io.File;
import java.util.List;

@Deprecated
public abstract class LegacyConfigLoader {
protected final File configFile;
protected final @NotNull File configFile;
protected final @NotNull File dataFolder;
protected String fileName;
protected @NotNull String fileName;
protected YamlConfiguration config;

public LegacyConfigLoader(String relativePath, String fileName, @NotNull File dataFolder) {
public LegacyConfigLoader(@NotNull String relativePath, @NotNull String fileName, @NotNull File dataFolder) {
this.fileName = fileName;
this.dataFolder = dataFolder;
configFile = new File(dataFolder, relativePath + File.separator + fileName);
loadFile();
}

public LegacyConfigLoader(String fileName, @NotNull File dataFolder) {
public LegacyConfigLoader(@NotNull String fileName, @NotNull File dataFolder) {
this.fileName = fileName;
this.dataFolder = dataFolder;
configFile = new File(dataFolder, fileName);
loadFile();
}

@VisibleForTesting
public LegacyConfigLoader(@NotNull File file) {
this.fileName = file.getName();
this.dataFolder = file.getParentFile();
configFile = new File(dataFolder, fileName);
loadFile();
}

@Deprecated
public LegacyConfigLoader(String relativePath, String fileName) {
this.fileName = fileName;
Expand Down
Loading

0 comments on commit 7855810

Please sign in to comment.