Skip to content

Commit

Permalink
Merge branch 'dev/feature' into feature/block-tags
Browse files Browse the repository at this point in the history
  • Loading branch information
sovdeeth authored Nov 10, 2024
2 parents f1203b2 + 0a680d4 commit 10e0645
Show file tree
Hide file tree
Showing 125 changed files with 2,880 additions and 1,201 deletions.
7 changes: 2 additions & 5 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -30,10 +30,7 @@ dependencies {
shadow group: 'org.bstats', name: 'bstats-bukkit', version: '3.0.2'
shadow group: 'net.kyori', name: 'adventure-text-serializer-bungeecord', version: '4.3.2'

implementation group: 'io.papermc.paper', name: 'paper-api', version: '1.21-R0.1-SNAPSHOT'
implementation group: 'org.eclipse.jdt', name: 'org.eclipse.jdt.annotation', version: '2.2.700'

// Comes from Minecraft including Guava or Gson
implementation group: 'io.papermc.paper', name: 'paper-api', version: '1.21.3-R0.1-SNAPSHOT'
implementation group: 'com.google.code.findbugs', name: 'findbugs', version: '3.0.1'

// bundled with Minecraft 1.19.4+ for display entity transforms
Expand Down Expand Up @@ -247,7 +244,7 @@ void createTestTask(String name, String desc, String environments, int javaVersi
def java21 = 21
def java17 = 17

def latestEnv = 'java21/paper-1.21.0.json'
def latestEnv = 'java21/paper-1.21.3.json'
def latestJava = java21
def oldestJava = java17

Expand Down
4 changes: 2 additions & 2 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ org.gradle.parallel=true

groupid=ch.njol
name=skript
version=2.9.3
version=2.9.4
jarName=Skript.jar
testEnv=java21/paper-1.21.0
testEnv=java21/paper-1.21.3
testEnvJavaVersion=21
2 changes: 1 addition & 1 deletion skript-aliases
7 changes: 5 additions & 2 deletions src/main/java/ch/njol/skript/Skript.java
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,7 @@
import org.junit.runner.notification.Failure;
import org.skriptlang.skript.bukkit.SkriptMetrics;
import org.skriptlang.skript.bukkit.tags.TagModule;
import org.skriptlang.skript.bukkit.breeding.BreedingModule;
import org.skriptlang.skript.bukkit.displays.DisplayModule;
import org.skriptlang.skript.lang.comparator.Comparator;
import org.skriptlang.skript.lang.comparator.Comparators;
Expand Down Expand Up @@ -557,6 +558,7 @@ public void onEnable() {
// todo: become proper module once registry api is merged
DisplayModule.load();
TagModule.load();
BreedingModule.load();
} catch (final Exception e) {
exception(e, "Could not load required .class files: " + e.getLocalizedMessage());
setEnabled(false);
Expand Down Expand Up @@ -669,9 +671,10 @@ protected void afterErrors() {
debug("Early init done");

if (TestMode.ENABLED) {
Bukkit.getScheduler().runTaskLater(Skript.this, () -> info("Skript testing environment enabled, starting soon..."), 1);
// Ignore late init (scripts, etc.) in test mode
Bukkit.getScheduler().runTaskLater(Skript.this, () -> {
info("Skript testing environment enabled, starting...");

// Delay is in Minecraft ticks.
AtomicLong shutdownDelay = new AtomicLong(0);
List<Class<?>> asyncTests = new ArrayList<>();
Expand Down Expand Up @@ -780,7 +783,7 @@ protected void afterErrors() {
Bukkit.getServer().shutdown();
}, shutdownDelay.get());
});
}, 100);
}, 5);
}

Skript.metrics = new Metrics(Skript.getInstance(), 722); // 722 is our bStats plugin ID
Expand Down
9 changes: 5 additions & 4 deletions src/main/java/ch/njol/skript/SkriptCommand.java
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@
import ch.njol.skript.aliases.Aliases;
import ch.njol.skript.command.CommandHelp;
import ch.njol.skript.doc.Documentation;
import ch.njol.skript.doc.DocumentationIdProvider;
import ch.njol.skript.doc.HTMLGenerator;
import ch.njol.skript.doc.JSONGenerator;
import ch.njol.skript.localization.ArgsMessage;
Expand All @@ -36,6 +35,7 @@
import ch.njol.skript.util.ExceptionUtils;
import ch.njol.skript.util.FileUtils;
import ch.njol.skript.util.SkriptColor;
import ch.njol.skript.util.Utils;
import ch.njol.util.OpenCloseable;
import ch.njol.util.StringUtils;
import org.bukkit.Bukkit;
Expand Down Expand Up @@ -102,7 +102,8 @@ private static void reloading(CommandSender sender, String what, RedirectingLogH
Skript.info(sender, message);

// Log reloading message
logHandler.log(new LogEntry(Level.INFO, Language.format(CONFIG_NODE + ".reload." + "player reload", sender.getName(), what)));
String text = Language.format(CONFIG_NODE + ".reload." + "player reload", sender.getName(), what);
logHandler.log(new LogEntry(Level.INFO, Utils.replaceEnglishChatStyles(text)));
}


Expand All @@ -116,10 +117,10 @@ private static void reloaded(CommandSender sender, RedirectingLogHandler logHand
String message;
if (logHandler.numErrors() == 0) {
message = StringUtils.fixCapitalization(PluralizingArgsMessage.format(m_reloaded.toString(what, timeTaken)));
logHandler.log(new LogEntry(Level.INFO, message));
logHandler.log(new LogEntry(Level.INFO, Utils.replaceEnglishChatStyles(message)));
} else {
message = StringUtils.fixCapitalization(PluralizingArgsMessage.format(m_reload_error.toString(what, logHandler.numErrors(), timeTaken)));
logHandler.log(new LogEntry(Level.SEVERE, message));
logHandler.log(new LogEntry(Level.SEVERE, Utils.replaceEnglishChatStyles(message)));
}
}

Expand Down
Loading

0 comments on commit 10e0645

Please sign in to comment.