Drop TagAPI support

TagAPI has been dead for several years. Also upgrade Java to 1.8, why not.
This commit is contained in:
Connor Monahan 2018-11-19 20:06:06 -06:00
parent 6b90371fce
commit b24e495df7
6 changed files with 3 additions and 57 deletions

View File

@ -32,10 +32,6 @@
<system>Github issues</system> <system>Github issues</system>
<url>https://github.com/taoneill/war/issues</url> <url>https://github.com/taoneill/war/issues</url>
</issueManagement> </issueManagement>
<ciManagement>
<system>Jenkins</system>
<url>http://ci.tommytony.com</url>
</ciManagement>
<scm> <scm>
<connection>scm:git:git://github.com/taoneill/war.git</connection> <connection>scm:git:git://github.com/taoneill/war.git</connection>
<developerConnection>scm:git:git@github.com:taoneill/war.git</developerConnection> <developerConnection>scm:git:git@github.com:taoneill/war.git</developerConnection>
@ -55,8 +51,8 @@
<artifactId>maven-compiler-plugin</artifactId> <artifactId>maven-compiler-plugin</artifactId>
<version>2.0.2</version> <version>2.0.2</version>
<configuration> <configuration>
<source>1.6</source> <source>1.8</source>
<target>1.6</target> <target>1.8</target>
</configuration> </configuration>
</plugin> </plugin>
<plugin> <plugin>
@ -113,12 +109,6 @@
<artifactId>bukkit</artifactId> <artifactId>bukkit</artifactId>
<version>1.13-R0.1-SNAPSHOT</version> <version>1.13-R0.1-SNAPSHOT</version>
</dependency> </dependency>
<dependency>
<groupId>org.kitteh</groupId>
<artifactId>tagapi</artifactId>
<version>2.7.1</version>
<scope>compile</scope>
</dependency>
<dependency> <dependency>
<groupId>org.mockito</groupId> <groupId>org.mockito</groupId>
<artifactId>mockito-all</artifactId> <artifactId>mockito-all</artifactId>

View File

@ -14,7 +14,6 @@ import org.bukkit.block.BlockState;
import org.bukkit.entity.Player; import org.bukkit.entity.Player;
import org.bukkit.inventory.ItemStack; import org.bukkit.inventory.ItemStack;
import org.bukkit.material.Sign; import org.bukkit.material.Sign;
import org.kitteh.tag.TagAPI;
import java.io.File; import java.io.File;
import java.text.MessageFormat; import java.text.MessageFormat;
@ -368,9 +367,6 @@ public class Team {
public void addPlayer(Player player) { public void addPlayer(Player player) {
this.players.add(player); this.players.add(player);
if (War.war.isTagServer()) {
TagAPI.refreshPlayer(player);
}
if (this.warzone.getScoreboard() != null && this.warzone.getScoreboardType() != ScoreboardType.NONE) { if (this.warzone.getScoreboard() != null && this.warzone.getScoreboardType() != ScoreboardType.NONE) {
player.setScoreboard(this.warzone.getScoreboard()); player.setScoreboard(this.warzone.getScoreboard());
} }
@ -428,9 +424,6 @@ public class Team {
this.teamChatPlayers.remove(thePlayer); this.teamChatPlayers.remove(thePlayer);
} }
this.warzone.dropAllStolenObjects(thePlayer, false); this.warzone.dropAllStolenObjects(thePlayer, false);
if (War.war.isTagServer()) {
TagAPI.refreshPlayer(thePlayer);
}
thePlayer.setFireTicks(0); thePlayer.setFireTicks(0);
thePlayer.setRemainingAir(300); thePlayer.setRemainingAir(300);
if (!this.warzone.getReallyDeadFighters().contains(thePlayer.getName())) { if (!this.warzone.getReallyDeadFighters().contains(thePlayer.getName())) {

View File

@ -5,7 +5,6 @@ import com.tommytony.war.config.*;
import com.tommytony.war.event.WarBlockListener; import com.tommytony.war.event.WarBlockListener;
import com.tommytony.war.event.WarEntityListener; import com.tommytony.war.event.WarEntityListener;
import com.tommytony.war.event.WarPlayerListener; import com.tommytony.war.event.WarPlayerListener;
import com.tommytony.war.event.WarTagListener;
import com.tommytony.war.job.CapturePointTimer; import com.tommytony.war.job.CapturePointTimer;
import com.tommytony.war.job.HelmetProtectionTask; import com.tommytony.war.job.HelmetProtectionTask;
import com.tommytony.war.job.ScoreboardSwitchTimer; import com.tommytony.war.job.ScoreboardSwitchTimer;
@ -69,7 +68,6 @@ public class War extends JavaPlugin {
private WarCommandHandler commandHandler = new WarCommandHandler(); private WarCommandHandler commandHandler = new WarCommandHandler();
private PluginDescriptionFile desc = null; private PluginDescriptionFile desc = null;
private boolean loaded = false; private boolean loaded = false;
private boolean tagServer = false;
// Zones and hub // Zones and hub
private List<Warzone> warzones = new ArrayList<Warzone>(); private List<Warzone> warzones = new ArrayList<Warzone>();
private WarHub warHub; private WarHub warHub;
@ -134,15 +132,6 @@ public class War extends JavaPlugin {
pm.registerEvents(this.entityListener, this); pm.registerEvents(this.entityListener, this);
pm.registerEvents(this.blockListener, this); pm.registerEvents(this.blockListener, this);
pm.registerEvents(this.UIManager, this); pm.registerEvents(this.UIManager, this);
if (pm.isPluginEnabled("TagAPI")) {
try {
Class.forName("org.kitteh.tag.TagAPI");
pm.registerEvents(new WarTagListener(), this);
this.tagServer = true;
} catch (ClassNotFoundException e) {
this.tagServer = false;
}
}
// Add defaults // Add defaults
warConfig.put(WarConfig.BUILDINZONESONLY, false); warConfig.put(WarConfig.BUILDINZONESONLY, false);
@ -1237,10 +1226,6 @@ public class War extends JavaPlugin {
this.warhubMaterials = warhubMaterials; this.warhubMaterials = warhubMaterials;
} }
public boolean isTagServer() {
return tagServer;
}
public KillstreakReward getKillstreakReward() { public KillstreakReward getKillstreakReward() {
return killstreakReward; return killstreakReward;
} }

View File

@ -1,19 +0,0 @@
package com.tommytony.war.event;
import com.tommytony.war.Team;
import org.bukkit.ChatColor;
import org.bukkit.event.EventHandler;
import org.bukkit.event.EventPriority;
import org.bukkit.event.Listener;
import org.kitteh.tag.PlayerReceiveNameTagEvent;
public class WarTagListener implements Listener {
@EventHandler(priority = EventPriority.HIGHEST)
public void onNameTag(PlayerReceiveNameTagEvent event) {
Team team = Team.getTeamByPlayerName(event.getNamedPlayer().getName());
if (team != null) {
ChatColor teamColor = team.getKind().getColor();
event.setTag(teamColor + event.getNamedPlayer().getName());
}
}
}

View File

@ -60,9 +60,6 @@ public class RestoreYmlWarzonesJob implements Runnable {
} }
language.addPlotter(new PlotterEnabled(langName)); language.addPlotter(new PlotterEnabled(langName));
Graph plugins = metrics.createGraph("Extensions"); Graph plugins = metrics.createGraph("Extensions");
if (War.war.isTagServer()) {
plugins.addPlotter(new PlotterEnabled("TagAPI"));
}
if (Bukkit.getPluginManager().isPluginEnabled("WorldEdit")) { if (Bukkit.getPluginManager().isPluginEnabled("WorldEdit")) {
plugins.addPlotter(new PlotterEnabled("WorldEdit")); plugins.addPlotter(new PlotterEnabled("WorldEdit"));
} }

View File

@ -5,7 +5,7 @@ description: ${project.description}
author: tommytony author: tommytony
website: ${project.url} website: ${project.url}
main: com.tommytony.war.War main: com.tommytony.war.War
softdepend: [Spout, TagAPI, WorldEdit, Vault] softdepend: [WorldEdit, Vault]
permissions: permissions:
war.*: war.*:
description: Full War permissions. Create and destroy warzones. Change War configuration. description: Full War permissions. Create and destroy warzones. Change War configuration.