Compare commits

..

No commits in common. "f33ec41d0d4b8a30f4298d58be2335c92d3a2d9a" and "5655fcbd6bbca5df18713fd1071f811b1e413c45" have entirely different histories.

4 changed files with 12 additions and 14 deletions

View File

@ -42,8 +42,8 @@ dependencies {
// Fabric API. This is technically optional, but you probably want it anyway. // Fabric API. This is technically optional, but you probably want it anyway.
modImplementation "net.fabricmc.fabric-api:fabric-api:${project.fabric_version}" modImplementation "net.fabricmc.fabric-api:fabric-api:${project.fabric_version}"
implementation group: 'org.yaml', name: 'snakeyaml', version: '2.0' implementation group: 'org.yaml', name: 'snakeyaml', version: '2.3'
includedJars group: 'org.yaml', name: 'snakeyaml', version: '2.0' includedJars group: 'org.yaml', name: 'snakeyaml', version: '2.3'
implementation group: 'org.json', name: 'json', version: '20240303' implementation group: 'org.json', name: 'json', version: '20240303'
includedJars group: 'org.json', name: 'json', version: '20240303' includedJars group: 'org.json', name: 'json', version: '20240303'
} }
@ -85,16 +85,14 @@ java {
} }
jar { jar {
duplicatesStrategy = DuplicatesStrategy.EXCLUDE
from("LICENSE") { from("LICENSE") {
rename { "${it}_${project.archivesBaseName}" } rename { "${it}_${project.archivesBaseName}" }
} }
duplicatesStrategy = DuplicatesStrategy.EXCLUDE from configurations.includedJars.collect {
from {
configurations.includedJars.collect {
it.isDirectory() ? it : zipTree(it) it.isDirectory() ? it : zipTree(it)
} }
} }
}
// configure the maven publication // configure the maven publication
publishing { publishing {
publications { publications {

View File

@ -6,7 +6,7 @@ minecraft_version=1.20.1
yarn_mappings=1.20.1+build.10 yarn_mappings=1.20.1+build.10
loader_version=0.16.5 loader_version=0.16.5
# Mod Properties # Mod Properties
mod_version=1.0.1 mod_version=1.0.0
maven_group=ru.bitheaven maven_group=ru.bitheaven
archives_base_name=donpayinteg archives_base_name=donpayinteg
# Dependencies # Dependencies

View File

@ -16,7 +16,7 @@ public class DonPayInteg implements ModInitializer {
public static final String MOD_ID = "donpayinteg"; public static final String MOD_ID = "donpayinteg";
public static final String NAME = "DonatePayIntegration"; public static final String NAME = "DonatePayIntegration";
public static final Logger LOGGER = LoggerFactory.getLogger(MOD_ID); public static final Logger LOGGER = LoggerFactory.getLogger(MOD_ID);
public static List<String> commands = new ArrayList<>(); public static List<String> commands = new ArrayList<String>();
@Override @Override
public void onInitialize() { public void onInitialize() {
@ -38,10 +38,10 @@ public class DonPayInteg implements ModInitializer {
} }
} }
if(j.getAndIncrement() % (20 * 2) == 0) { if(i.getAndIncrement() % (20 * 2) == 0) {
if (!commands.isEmpty()) { if (!commands.isEmpty()) {
world.getCommandManager().executeWithPrefix(world.getCommandSource(), commands.get(0)); world.getCommandManager().executeWithPrefix(world.getCommandSource(), commands.getFirst());
commands.remove(0); commands.removeFirst();
} }
} }
}); });

View File

@ -47,8 +47,8 @@ public class DonateThread extends Thread {
lastDonate = objects.getInt("id"); lastDonate = objects.getInt("id");
DonPayInteg.commands.add("title @a title \"" + msg.replace("{username}", objects.getJSONObject("vars").getString("name")) + "\""); DonPayInteg.commands.addLast("title @a title \"" + msg.replace("{username}", objects.getJSONObject("vars").getString("name")) + "\"");
DonPayInteg.commands.add(cmd.replace("{username}", objects.getJSONObject("vars").getString("name"))); DonPayInteg.commands.addLast(cmd.replace("{username}", objects.getJSONObject("vars").getString("name")));
LOGGER.info("Exec donate #{}", lastDonate); LOGGER.info("Exec donate #{}", lastDonate);
Config config = ConfigHandler.load(); Config config = ConfigHandler.load();