Skip to content

Commit

Permalink
INSERT VERSION replace failed, fix it
Browse files Browse the repository at this point in the history
  • Loading branch information
bensku committed Aug 25, 2017
1 parent f64e186 commit 10cd79a
Show file tree
Hide file tree
Showing 10 changed files with 45 additions and 162 deletions.
2 changes: 1 addition & 1 deletion insertversion.sh
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
#!/bin/bash
find src/main/java -type f -exec sed -i 's/INSERT VERSION/$1/g' {} \;
find src/main/java -type f -exec sed -i "s/INSERT VERSION/$1/g" {} \;
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
@Name("Is Script Loaded")
@Description("Check if the current script or another script, is current loaded")
@Examples({"script is loaded","script \"example.sk\" is loaded"})
@Since("$1")
@Since("2.2-dev31")
public class CondScriptLoaded extends Condition{
static {
Skript.registerCondition(CondScriptLoaded.class, "script[s] [%-strings%] (is|are) loaded", "script[s] [%-strings%] (isn't|is not|aren't|are not) loaded");
Expand Down
12 changes: 6 additions & 6 deletions src/main/java/ch/njol/skript/doc/Documentation.java
Original file line number Diff line number Diff line change
Expand Up @@ -155,19 +155,19 @@ private final static String convertRegex(final String regex) {
if (StringUtils.containsAny(regex, ".[]\\*+"))
Skript.error("Regex '" + regex + "' contains unconverted Regex syntax");
return escapeHTML("" + regex
.replaceAll("\\((.+?)\\)\\?", "[$1]")
.replaceAll("(.)\\?", "[$1]"));
.replaceAll("\\((.+?)\\)\\?", "[2.2-dev31]")
.replaceAll("(.)\\?", "[2.2-dev31]"));
}

private final static String cleanPatterns(final String patterns) {
final String s = StringUtils.replaceAll("" +
escapeHTML(patterns) // escape HTML
.replaceAll("(?<=[\\(\\|])[-0-9]+?¦", "") // remove marks
.replace("()", "") // remove empty mark setting groups (mark¦)
.replaceAll("\\(([^|]+?)\\|\\)", "[$1]") // replace (mark¦x|) groups with [x]
.replaceAll("\\(\\|([^|]+?)\\)", "[$1]") // dito
.replaceAll("\\((.+?)\\|\\)", "[($1)]") // replace (a|b|) with [(a|b)]
.replaceAll("\\(\\|(.+?)\\)", "[($1)]") // dito
.replaceAll("\\(([^|]+?)\\|\\)", "[2.2-dev31]") // replace (mark¦x|) groups with [x]
.replaceAll("\\(\\|([^|]+?)\\)", "[2.2-dev31]") // dito
.replaceAll("\\((.+?)\\|\\)", "[(2.2-dev31)]") // replace (a|b|) with [(a|b)]
.replaceAll("\\(\\|(.+?)\\)", "[(2.2-dev31)]") // dito
, "(?<!\\\\)%(.+?)(?<!\\\\)%", new Callback<String, Matcher>() { // link & fancy types
@Override
public String run(final Matcher m) {
Expand Down
8 changes: 4 additions & 4 deletions src/main/java/ch/njol/skript/doc/HTMLGenerator.java
Original file line number Diff line number Diff line change
Expand Up @@ -399,10 +399,10 @@ final static String cleanPatterns(final String patterns) {
Documentation.escapeHTML(patterns) // escape HTML
.replaceAll("(?<=[\\(\\|])[-0-9]+?¦", "") // remove marks
.replace("()", "") // remove empty mark setting groups (mark¦)
.replaceAll("\\(([^|]+?)\\|\\)", "[$1]") // replace (mark¦x|) groups with [x]
.replaceAll("\\(\\|([^|]+?)\\)", "[$1]") // dito
.replaceAll("\\((.+?)\\|\\)", "[($1)]") // replace (a|b|) with [(a|b)]
.replaceAll("\\(\\|(.+?)\\)", "[($1)]") // dito
.replaceAll("\\(([^|]+?)\\|\\)", "[2.2-dev31]") // replace (mark¦x|) groups with [x]
.replaceAll("\\(\\|([^|]+?)\\)", "[2.2-dev31]") // dito
.replaceAll("\\((.+?)\\|\\)", "[(2.2-dev31)]") // replace (a|b|) with [(a|b)]
.replaceAll("\\(\\|(.+?)\\)", "[(2.2-dev31)]") // dito
, "(?<!\\\\)%(.+?)(?<!\\\\)%", new Callback<String, Matcher>() { // link & fancy types
@Override
public String run(final Matcher m) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
@Description("The author of a book")
@Examples({"on book sign:",
" message \"Book Title: %author of event-item%\""})
@Since("$1")
@Since("2.2-dev31")
public class ExprBookAuthor extends SimplePropertyExpression<ItemStack,String> {

static {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@
@Examples({"on book sign:",
" message \"Book Pages: %pages of event-item%\"",
" message \"Book Page 1: %page 1 of event-item%\""})
@Since("$1")
@Since("2.2-dev31")
public class ExprBookPages extends SimpleExpression<String> {

static {
Expand Down
29 changes: 29 additions & 0 deletions src/main/java/ch/njol/skript/expressions/ExprBookRecipes.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
/*
* This file is part of Skript.
*
* Skript is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* Skript is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with Skript. If not, see <http://www.gnu.org/licenses/>.
*
*
* Copyright 2011-2016 Peter Güttinger and contributors
*
*/

package ch.njol.skript.expressions;

/**
*
*/
public class ExprBookRecipes {

}
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
@Description("The title of a book")
@Examples({"on book sign:",
" message \"Book Title: %title of event-item%\""})
@Since("$1")
@Since("2.2-dev31")
public class ExprBookTitle extends SimplePropertyExpression<ItemStack,String> {

static {
Expand Down
146 changes: 0 additions & 146 deletions src/main/java/ch/njol/skript/expressions/ExprItemsIn.java

This file was deleted.

2 changes: 1 addition & 1 deletion src/main/java/ch/njol/skript/expressions/ExprVelocity.java
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@
@Name("Vectors - Velocity")
@Description("Gets, sets, adds or removes velocity to/from/of an entity")
@Examples({"set player's velocity to {_v}"})
@Since("$1")
@Since("2.2-dev31")
public class ExprVelocity extends SimplePropertyExpression<Entity, Vector> {
static {
register(ExprVelocity.class, Vector.class, "velocity", "entities");
Expand Down

0 comments on commit 10cd79a

Please sign in to comment.