Skip to content

Commit

Permalink
Update to CH build #3603
Browse files Browse the repository at this point in the history
  • Loading branch information
PseudoKnight committed Apr 28, 2019
1 parent 8b69ce1 commit ad24f7e
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 11 deletions.
4 changes: 2 additions & 2 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<modelVersion>4.0.0</modelVersion>
<groupId>me.pseudoknight</groupId>
<artifactId>chspigot</artifactId>
<version>2.0.1</version>
<version>2.0.2</version>
<name>CHSpigot</name>
<description>Gives access to methods available in Spigot but not Bukkit</description>

Expand Down Expand Up @@ -132,7 +132,7 @@
<dependency>
<groupId>org.spigotmc</groupId>
<artifactId>spigot-api</artifactId>
<version>1.13.2-R0.1-SNAPSHOT</version>
<version>1.14-R0.1-SNAPSHOT</version>
</dependency>
</dependencies>
</project>
4 changes: 2 additions & 2 deletions src/main/java/me/pseudoknight/chspigot/Events.java
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
import com.laytonsmith.PureUtilities.Version;
import com.laytonsmith.abstraction.MCEntity;
import com.laytonsmith.annotations.api;
import com.laytonsmith.core.CHLog;
import com.laytonsmith.core.MSLog;
import com.laytonsmith.core.MSVersion;
import com.laytonsmith.core.ObjectGenerator;
import com.laytonsmith.core.Static;
Expand Down Expand Up @@ -71,7 +71,7 @@ public Version since() {
public void bind(BoundEvent event) {
Map<String, Mixed> prefilters = event.getPrefilter();
if(prefilters.containsKey("item")) {
CHLog.GetLogger().w(CHLog.Tags.DEPRECATION, "The \"item\" prefilter here is no longer supported."
MSLog.GetLogger().w(MSLog.Tags.DEPRECATION, "The \"item\" prefilter here is no longer supported."
+ " Use \"itemname\" instead.", event.getTarget());
}
}
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/me/pseudoknight/chspigot/Extension.java
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
public class Extension extends AbstractExtension {

public Version getVersion() {
return new SimpleVersion(2,0,1);
return new SimpleVersion(2,0,2);
}

@Override
Expand Down
14 changes: 8 additions & 6 deletions src/main/java/me/pseudoknight/chspigot/Functions.java
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
import com.laytonsmith.abstraction.MCLocation;
import com.laytonsmith.abstraction.entities.MCArrow;
import com.laytonsmith.annotations.api;
import com.laytonsmith.core.CHLog;
import com.laytonsmith.core.MSLog;
import com.laytonsmith.core.MSVersion;
import com.laytonsmith.core.ObjectGenerator;
import com.laytonsmith.core.Optimizable;
Expand Down Expand Up @@ -197,7 +197,7 @@ public Mixed exec(Target t, Environment environment, Mixed... args) throws Conf
try {
particle = OldEffect.valueOf(args[1].val().toUpperCase()).getParticle();
} catch(IllegalArgumentException ex2) {
CHLog.GetLogger().e(CHLog.Tags.GENERAL, "Invalid particle: " + args[1].val(), t);
MSLog.GetLogger().e(MSLog.Tags.GENERAL, "Invalid particle: " + args[1].val(), t);
return CVoid.VOID;
}
}
Expand All @@ -213,7 +213,7 @@ public Mixed exec(Target t, Environment environment, Mixed... args) throws Conf
try {
particle = OldEffect.valueOf(args[2].val().toUpperCase()).getParticle();
} catch(IllegalArgumentException ex2) {
CHLog.GetLogger().e(CHLog.Tags.GENERAL, "Invalid particle: " + args[2].val(), t);
MSLog.GetLogger().e(MSLog.Tags.GENERAL, "Invalid particle: " + args[2].val(), t);
return CVoid.VOID;
}
}
Expand Down Expand Up @@ -251,7 +251,7 @@ public Mixed exec(Target t, Environment environment, Mixed... args) throws Conf
radius = Static.getInt32(options.get("radius", t), t);
}
if(options.containsKey("id") || options.containsKey("data")) {
CHLog.GetLogger().w(CHLog.Tags.DEPRECATION, "Particle id and data is deprecated in play_effect()."
MSLog.GetLogger().w(MSLog.Tags.DEPRECATION, "Particle id and data is deprecated in play_effect()."
+ " Consider using spawn_particle().", t);
}

Expand Down Expand Up @@ -300,7 +300,9 @@ public Version since() {
}

@Override
public ParseTree optimizeDynamic(Target t, List<ParseTree> children, FileOptions fileOptions) throws ConfigCompileException, ConfigRuntimeException {
public ParseTree optimizeDynamic(Target t, Environment env, List<ParseTree> children, FileOptions fileOptions)
throws ConfigCompileException, ConfigRuntimeException {

if(children.size() < 2) {
return null;
}
Expand All @@ -313,7 +315,7 @@ public ParseTree optimizeDynamic(Target t, List<ParseTree> children, FileOptions
if(c != null) {
try {
OldEffect e = OldEffect.valueOf(c.val().toUpperCase());
CHLog.GetLogger().w(CHLog.Tags.DEPRECATION, "The particle " + c.val() + " is deprecated for " + e.getParticle().name(), t);
MSLog.GetLogger().w(MSLog.Tags.DEPRECATION, "The particle " + c.val() + " is deprecated for " + e.getParticle().name(), t);
} catch(IllegalArgumentException ex) {
// not deprecated
}
Expand Down

0 comments on commit ad24f7e

Please sign in to comment.