Skip to content

Commit

Permalink
Merge branch 'dev/feature' into feature/abstact_class_error
Browse files Browse the repository at this point in the history
  • Loading branch information
Pikachu920 committed Jan 14, 2024
2 parents c93990b + 67c4e0e commit fe0a5f9
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 20 deletions.
14 changes: 5 additions & 9 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -295,10 +295,8 @@ task githubResources(type: ProcessResources) {
include '**'
version = project.property('version')
def channel = 'stable'
if (version.contains('alpha'))
channel = 'alpha'
else if (version.contains('beta'))
channel = 'beta'
if (version.contains('pre'))
channel = 'prerelease'
filter ReplaceTokens, tokens: [
'version' : version,
'today' : '' + LocalTime.now(),
Expand Down Expand Up @@ -330,10 +328,8 @@ task spigotResources(type: ProcessResources) {
include '**'
version = project.property('version')
def channel = 'stable'
if (version.contains('alpha'))
channel = 'alpha'
else if (version.contains('beta'))
channel = 'beta'
if (version.contains('pre'))
channel = 'prerelease'
filter ReplaceTokens, tokens: [
'version' : version,
'today' : '' + LocalTime.now(),
Expand Down Expand Up @@ -369,7 +365,7 @@ task nightlyResources(type: ProcessResources) {
'version' : version,
'today' : '' + LocalTime.now(),
'release-flavor' : 'skriptlang-nightly', // SkriptLang build, automatically done by CI
'release-channel' : 'alpha', // No update checking, but these are VERY unstable
'release-channel' : 'prerelease', // No update checking, but these are VERY unstable
'release-updater' : 'ch.njol.skript.update.NoUpdateChecker', // No autoupdates for now
'release-source' : '',
'release-download': 'null'
Expand Down
2 changes: 1 addition & 1 deletion 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.8.0-pre1
version=2.8.0-pre2
jarName=Skript.jar
testEnv=java17/paper-1.20.4
testEnvJavaVersion=17
14 changes: 6 additions & 8 deletions src/main/java/ch/njol/skript/SkriptConfig.java
Original file line number Diff line number Diff line change
Expand Up @@ -97,14 +97,15 @@ public class SkriptConfig {
.setter(t -> {
ReleaseChannel channel;
switch (t) {
case "alpha": // Everything goes in alpha channel
channel = new ReleaseChannel((name) -> true, t);
break;
case "alpha":
case "beta":
channel = new ReleaseChannel((name) -> !name.contains("alpha"), t);
Skript.warning("'alpha' and 'beta' are no longer valid release channels. Use 'prerelease' instead.");
case "prerelease": // All development builds are valid
channel = new ReleaseChannel((name) -> true, t);
break;
case "stable":
channel = new ReleaseChannel((name) -> !name.contains("alpha") && !name.contains("beta"), t);
// TODO a better option would be to check that it is not a pre-release through GH API
channel = new ReleaseChannel((name) -> !name.contains("pre"), t);
break;
case "none":
channel = new ReleaseChannel((name) -> false, t);
Expand All @@ -116,9 +117,6 @@ public class SkriptConfig {
}
SkriptUpdater updater = Skript.getInstance().getUpdater();
if (updater != null) {
if (updater.getCurrentRelease().flavor.contains("spigot") && !t.equals("stable")) {
Skript.error("Only stable Skript versions are uploaded to Spigot resources.");
}
updater.setReleaseChannel(channel);
}
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -681,7 +681,7 @@ public String toVariableNameString(final Inventory i) {
@Override
@Nullable
public Player parse(String string, ParseContext context) {
if (context == ParseContext.COMMAND) {
if (context == ParseContext.COMMAND || context == ParseContext.PARSE) {
if (string.isEmpty())
return null;
if (UUID_PATTERN.matcher(string).matches())
Expand Down
2 changes: 1 addition & 1 deletion src/main/resources/config.sk
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ update check interval: 12 hours
release channel: @release-channel@
# If 'check for new version' is enabled, this determines how stable the updates must be.
# 'stable' means that only stable releases of Skript will be considered updates.
# 'beta' and 'alpha' mean that also development releases will be checked for.
# 'prerelease' means that development releases will also be checked for.
# Initial value of this depends on the Skript version you first installed; it was '@release-channel@'.

enable effect commands: false
Expand Down

0 comments on commit fe0a5f9

Please sign in to comment.