Skip to content

Commit

Permalink
Remove deprecated functions and prefilter
Browse files Browse the repository at this point in the history
  • Loading branch information
PseudoKnight committed May 23, 2020
1 parent dc318fe commit 26c0655
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 351 deletions.
27 changes: 1 addition & 26 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.3</version>
<version>2.0.4</version>
<name>CHSpigot</name>
<description>Gives access to methods available in Spigot but not Bukkit</description>

Expand Down Expand Up @@ -101,38 +101,13 @@
<id>enginehub-maven</id>
<url>https://maven.enginehub.org/repo/</url>
</repository>

<repository>
<id>spigot-repo</id>
<url>https://hub.spigotmc.org/nexus/content/repositories/snapshots/</url>
</repository>

<repository>
<id>maven-central</id>
<url>https://repo.maven.apache.org/maven2/</url>
</repository>
</repositories>

<dependencies>
<dependency>
<groupId>com.sk89q</groupId>
<artifactId>commandhelper</artifactId>
<version>3.3.4-SNAPSHOT</version>
<exclusions>
<exclusion>
<artifactId>bukkit</artifactId>
<groupId>org.bukkit</groupId>
</exclusion>
<exclusion>
<artifactId>bukkit</artifactId>
<groupId>com.sk89q.spigot</groupId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>org.spigotmc</groupId>
<artifactId>spigot-api</artifactId>
<version>1.15.2-R0.1-SNAPSHOT</version>
</dependency>
</dependencies>
</project>
18 changes: 0 additions & 18 deletions src/main/java/me/pseudoknight/chspigot/Events.java
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
import com.laytonsmith.PureUtilities.Version;
import com.laytonsmith.abstraction.MCEntity;
import com.laytonsmith.annotations.api;
import com.laytonsmith.core.MSLog;
import com.laytonsmith.core.MSVersion;
import com.laytonsmith.core.ObjectGenerator;
import com.laytonsmith.core.Static;
Expand Down Expand Up @@ -67,15 +66,6 @@ public Version since() {
return MSVersion.V3_3_1;
}

@Override
public void bind(BoundEvent event) {
Map<String, Mixed> prefilters = event.getPrefilter();
if(prefilters.containsKey("item")) {
MSLog.GetLogger().w(MSLog.Tags.DEPRECATION, "The \"item\" prefilter here is no longer supported."
+ " Use \"itemname\" instead.", event.getTarget());
}
}

@Override
public boolean matches(Map<String, Mixed> prefilter, BindableEvent e) throws PrefilterNonMatchException {
if (e instanceof MCPlayerItemDamageEvent) {
Expand Down Expand Up @@ -117,14 +107,6 @@ public boolean modifyEvent(String key, Mixed value, BindableEvent e) {

return false;
}

@Override
public void cancel(BindableEvent o, boolean state) {
super.cancel(o, state);
MCPlayerItemDamageEvent e = (MCPlayerItemDamageEvent)o;
e.getPlayer().updateInventory();
}

}

@api
Expand Down
9 changes: 6 additions & 3 deletions src/main/java/me/pseudoknight/chspigot/Extension.java
Original file line number Diff line number Diff line change
Expand Up @@ -9,19 +9,22 @@
@MSExtension("CHSpigot")
public class Extension extends AbstractExtension {

private final SimpleVersion VERSION = new SimpleVersion(2,0,4);

@Override
public Version getVersion() {
return new SimpleVersion(2,0,3);
return VERSION;
}

@Override
public void onStartup() {
SpigotListeners.register();
System.out.println("CHSpigot " + getVersion() + " loaded.");
System.out.println("CHSpigot " + VERSION + " loaded.");
}

@Override
public void onShutdown() {
SpigotListeners.unregister();
System.out.println("CHSpigot " + getVersion() + " unloaded.");
System.out.println("CHSpigot " + VERSION + " unloaded.");
}
}
Loading

0 comments on commit 26c0655

Please sign in to comment.