mirror of
https://github.com/taoneill/war.git
synced 2024-11-13 05:54:31 +01:00
Drop TagAPI support
TagAPI has been dead for several years. Also upgrade Java to 1.8, why not.
This commit is contained in:
parent
6b90371fce
commit
b24e495df7
14
war/pom.xml
14
war/pom.xml
@ -32,10 +32,6 @@
|
||||
<system>Github issues</system>
|
||||
<url>https://github.com/taoneill/war/issues</url>
|
||||
</issueManagement>
|
||||
<ciManagement>
|
||||
<system>Jenkins</system>
|
||||
<url>http://ci.tommytony.com</url>
|
||||
</ciManagement>
|
||||
<scm>
|
||||
<connection>scm:git:git://github.com/taoneill/war.git</connection>
|
||||
<developerConnection>scm:git:git@github.com:taoneill/war.git</developerConnection>
|
||||
@ -55,8 +51,8 @@
|
||||
<artifactId>maven-compiler-plugin</artifactId>
|
||||
<version>2.0.2</version>
|
||||
<configuration>
|
||||
<source>1.6</source>
|
||||
<target>1.6</target>
|
||||
<source>1.8</source>
|
||||
<target>1.8</target>
|
||||
</configuration>
|
||||
</plugin>
|
||||
<plugin>
|
||||
@ -113,12 +109,6 @@
|
||||
<artifactId>bukkit</artifactId>
|
||||
<version>1.13-R0.1-SNAPSHOT</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.kitteh</groupId>
|
||||
<artifactId>tagapi</artifactId>
|
||||
<version>2.7.1</version>
|
||||
<scope>compile</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.mockito</groupId>
|
||||
<artifactId>mockito-all</artifactId>
|
||||
|
@ -14,7 +14,6 @@ import org.bukkit.block.BlockState;
|
||||
import org.bukkit.entity.Player;
|
||||
import org.bukkit.inventory.ItemStack;
|
||||
import org.bukkit.material.Sign;
|
||||
import org.kitteh.tag.TagAPI;
|
||||
|
||||
import java.io.File;
|
||||
import java.text.MessageFormat;
|
||||
@ -368,9 +367,6 @@ public class Team {
|
||||
|
||||
public void addPlayer(Player player) {
|
||||
this.players.add(player);
|
||||
if (War.war.isTagServer()) {
|
||||
TagAPI.refreshPlayer(player);
|
||||
}
|
||||
if (this.warzone.getScoreboard() != null && this.warzone.getScoreboardType() != ScoreboardType.NONE) {
|
||||
player.setScoreboard(this.warzone.getScoreboard());
|
||||
}
|
||||
@ -428,9 +424,6 @@ public class Team {
|
||||
this.teamChatPlayers.remove(thePlayer);
|
||||
}
|
||||
this.warzone.dropAllStolenObjects(thePlayer, false);
|
||||
if (War.war.isTagServer()) {
|
||||
TagAPI.refreshPlayer(thePlayer);
|
||||
}
|
||||
thePlayer.setFireTicks(0);
|
||||
thePlayer.setRemainingAir(300);
|
||||
if (!this.warzone.getReallyDeadFighters().contains(thePlayer.getName())) {
|
||||
|
@ -5,7 +5,6 @@ import com.tommytony.war.config.*;
|
||||
import com.tommytony.war.event.WarBlockListener;
|
||||
import com.tommytony.war.event.WarEntityListener;
|
||||
import com.tommytony.war.event.WarPlayerListener;
|
||||
import com.tommytony.war.event.WarTagListener;
|
||||
import com.tommytony.war.job.CapturePointTimer;
|
||||
import com.tommytony.war.job.HelmetProtectionTask;
|
||||
import com.tommytony.war.job.ScoreboardSwitchTimer;
|
||||
@ -69,7 +68,6 @@ public class War extends JavaPlugin {
|
||||
private WarCommandHandler commandHandler = new WarCommandHandler();
|
||||
private PluginDescriptionFile desc = null;
|
||||
private boolean loaded = false;
|
||||
private boolean tagServer = false;
|
||||
// Zones and hub
|
||||
private List<Warzone> warzones = new ArrayList<Warzone>();
|
||||
private WarHub warHub;
|
||||
@ -134,15 +132,6 @@ public class War extends JavaPlugin {
|
||||
pm.registerEvents(this.entityListener, this);
|
||||
pm.registerEvents(this.blockListener, 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
|
||||
warConfig.put(WarConfig.BUILDINZONESONLY, false);
|
||||
@ -1237,10 +1226,6 @@ public class War extends JavaPlugin {
|
||||
this.warhubMaterials = warhubMaterials;
|
||||
}
|
||||
|
||||
public boolean isTagServer() {
|
||||
return tagServer;
|
||||
}
|
||||
|
||||
public KillstreakReward getKillstreakReward() {
|
||||
return killstreakReward;
|
||||
}
|
||||
|
@ -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());
|
||||
}
|
||||
}
|
||||
}
|
@ -60,9 +60,6 @@ public class RestoreYmlWarzonesJob implements Runnable {
|
||||
}
|
||||
language.addPlotter(new PlotterEnabled(langName));
|
||||
Graph plugins = metrics.createGraph("Extensions");
|
||||
if (War.war.isTagServer()) {
|
||||
plugins.addPlotter(new PlotterEnabled("TagAPI"));
|
||||
}
|
||||
if (Bukkit.getPluginManager().isPluginEnabled("WorldEdit")) {
|
||||
plugins.addPlotter(new PlotterEnabled("WorldEdit"));
|
||||
}
|
||||
|
@ -5,7 +5,7 @@ description: ${project.description}
|
||||
author: tommytony
|
||||
website: ${project.url}
|
||||
main: com.tommytony.war.War
|
||||
softdepend: [Spout, TagAPI, WorldEdit, Vault]
|
||||
softdepend: [WorldEdit, Vault]
|
||||
permissions:
|
||||
war.*:
|
||||
description: Full War permissions. Create and destroy warzones. Change War configuration.
|
||||
|
Loading…
Reference in New Issue
Block a user