Skip to content

Commit d7e4621

Browse files
committed
Format pom.xml and plugin.yml, completely remove updater
1 parent 7e168e2 commit d7e4621

File tree

5 files changed

+43
-795
lines changed

5 files changed

+43
-795
lines changed

ProtocolLib/pom.xml

Lines changed: 7 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,11 @@
44
<groupId>com.comphenix.protocol</groupId>
55
<artifactId>ProtocolLib</artifactId>
66
<version>3.6.0-SNAPSHOT</version>
7-
<packaging>jar</packaging>
7+
<name>ProtocolLib</name>
8+
89
<description>Provides read/write access to the Minecraft protocol.</description>
10+
<url>http://www.spigotmc.org/resources/protocollib.1997/</url>
11+
<packaging>jar</packaging>
912

1013
<properties>
1114
<project.build.sourceEncoding>cp1252</project.build.sourceEncoding>
@@ -14,15 +17,10 @@
1417

1518
<distributionManagement>
1619
<repository>
17-
<id>comphenix-releases</id>
18-
<name>Comphenix Maven Releases</name>
19-
<url>http://repo.comphenix.net/content/repositories/releases/</url>
20+
<id>shadowvolt-repo</id>
21+
<name>Shadowvolt Maven Repository</name>
22+
<url>http://ci.shadowvolt.com/plugin/repository/everything/</url>
2023
</repository>
21-
<snapshotRepository>
22-
<id>comphenix-snapshots</id>
23-
<name>Comphenix Maven Snapshots</name>
24-
<url>http://repo.comphenix.net/content/repositories/snapshots/</url>
25-
</snapshotRepository>
2624
</distributionManagement>
2725

2826
<repositories>
@@ -32,7 +30,6 @@
3230
</repository>
3331
<repository>
3432
<id>comphenix-releases</id>
35-
<name>Comphenix Maven Releases</name>
3633
<url>http://repo.comphenix.net/content/repositories/releases/</url>
3734
</repository>
3835
</repositories>
@@ -94,26 +91,6 @@
9491
</configuration>
9592
</plugin>
9693

97-
<!--
98-
<plugin>
99-
<groupId>org.apache.maven.plugins</groupId>
100-
<artifactId>maven-failsafe-plugin</artifactId>
101-
<version>2.12.4</version>
102-
<configuration>
103-
<workingDirectory>${basedir}/target/server/</workingDirectory>
104-
<argLine>-Xmx1024m -Xms1024M -Dnojline=true</argLine>
105-
</configuration>
106-
<executions>
107-
<execution>
108-
<goals>
109-
<goal>integration-test</goal>
110-
<goal>verify</goal>
111-
</goals>
112-
</execution>
113-
</executions>
114-
</plugin>
115-
-->
116-
11794
<plugin>
11895
<groupId>org.apache.maven.plugins</groupId>
11996
<artifactId>maven-jar-plugin</artifactId>
@@ -202,9 +179,6 @@
202179
</profile>
203180
</profiles>
204181

205-
<url>http://dev.bukkit.org/server-mods/protocollib/</url>
206-
<name>ProtocolLib</name>
207-
208182
<scm>
209183
<connection>scm:git:git://github.com/aadnk/ProtocolLib.git</connection>
210184
<developerConnection>scm:git:[email protected]:aadnk/ProtocolLib.git</developerConnection>

ProtocolLib/src/main/java/com/comphenix/protocol/CommandProtocol.java

Lines changed: 1 addition & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,6 @@
2626

2727
import com.comphenix.protocol.error.ErrorReporter;
2828
import com.comphenix.protocol.events.PacketListener;
29-
import com.comphenix.protocol.metrics.Updater;
30-
import com.comphenix.protocol.metrics.Updater.UpdateType;
3129
import com.comphenix.protocol.timing.TimedListenerManager;
3230
import com.comphenix.protocol.timing.TimingReportGenerator;
3331

@@ -43,13 +41,11 @@ class CommandProtocol extends CommandBase {
4341
public static final String NAME = "protocol";
4442

4543
private Plugin plugin;
46-
private Updater updater;
4744
private ProtocolConfig config;
4845

49-
public CommandProtocol(ErrorReporter reporter, Plugin plugin, Updater updater, ProtocolConfig config) {
46+
public CommandProtocol(ErrorReporter reporter, Plugin plugin, ProtocolConfig config) {
5047
super(reporter, CommandBase.PERMISSION_ADMIN, NAME, 1);
5148
this.plugin = plugin;
52-
this.updater = updater;
5349
this.config = config;
5450
}
5551

@@ -60,10 +56,6 @@ protected boolean handleCommand(CommandSender sender, String[] args) {
6056
// Only return TRUE if we executed the correct command
6157
if (subCommand.equalsIgnoreCase("config") || subCommand.equalsIgnoreCase("reload"))
6258
reloadConfiguration(sender);
63-
else if (subCommand.equalsIgnoreCase("check"))
64-
checkVersion(sender);
65-
// else if (subCommand.equalsIgnoreCase("update"))
66-
// updateVersion(sender);
6759
else if (subCommand.equalsIgnoreCase("timings"))
6860
toggleTimings(sender, args);
6961
else if (subCommand.equalsIgnoreCase("listeners"))
@@ -73,14 +65,6 @@ else if (subCommand.equalsIgnoreCase("listeners"))
7365
return true;
7466
}
7567

76-
public void checkVersion(final CommandSender sender) {
77-
performUpdate(sender, UpdateType.NO_DOWNLOAD);
78-
}
79-
80-
public void updateVersion(final CommandSender sender) {
81-
performUpdate(sender, UpdateType.DEFAULT);
82-
}
83-
8468
// Display every listener on the server
8569
private void printListeners(final CommandSender sender, String[] args) {
8670
ProtocolManager manager = ProtocolLibrary.getProtocolManager();
@@ -96,26 +80,6 @@ private void printListeners(final CommandSender sender, String[] args) {
9680
}
9781
}
9882

99-
private void performUpdate(final CommandSender sender, UpdateType type) {
100-
if (updater.isChecking()) {
101-
sender.sendMessage(ChatColor.RED + "Already checking for an update.");
102-
return;
103-
}
104-
105-
// Perform on an async thread
106-
Runnable notify = new Runnable() {
107-
@Override
108-
public void run() {
109-
sender.sendMessage(ChatColor.YELLOW + "[ProtocolLib] " + updater.getResult());
110-
111-
updater.removeListener(this);
112-
updateFinished();
113-
}
114-
};
115-
updater.start(type);
116-
updater.addListener(notify);
117-
}
118-
11983
private void toggleTimings(CommandSender sender, String[] args) {
12084
TimedListenerManager manager = TimedListenerManager.getInstance();
12185
boolean state = !manager.isTiming(); // toggle

0 commit comments

Comments
 (0)