Skip to content

Commit

Permalink
v1.4.2 - prepared for Bukkit 1.10
Browse files Browse the repository at this point in the history
  • Loading branch information
rlf committed Jun 22, 2016
1 parent 2eb0a51 commit 45c557e
Show file tree
Hide file tree
Showing 27 changed files with 22 additions and 8 deletions.
Empty file modified .travis.yml
100755 → 100644
Empty file.
8 changes: 4 additions & 4 deletions pom.xml
100755 → 100644
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<modelVersion>4.0.0</modelVersion>
<groupId>dk.lockfuglsang.wolfencraft</groupId>
<artifactId>holographic-scoreboard</artifactId>
<version>1.4.1</version>
<version>1.4.2</version>
<name>HolographicScoreboard</name>

<repositories>
Expand Down Expand Up @@ -74,7 +74,7 @@
<dependency>
<groupId>org.bukkit</groupId>
<artifactId>bukkit</artifactId>
<version>1.9-R0.1-SNAPSHOT</version>
<version>1.10-R0.1-SNAPSHOT</version>
<scope>provided</scope>
</dependency>
<dependency>
Expand All @@ -91,14 +91,14 @@
<dependency>
<groupId>com.gmail.filoghost</groupId>
<artifactId>holographic-displays-api</artifactId>
<version>2.0.2</version>
<version>2.1.17</version>
<scope>system</scope>
<systemPath>${basedir}/lib/HolographicDisplaysAPI.jar</systemPath>
</dependency>
<dependency>
<groupId>com.sainttx.holograms</groupId>
<artifactId>holograms</artifactId>
<version>1.8.8</version>
<version>2.3-SNAPSHOT</version>
<scope>system</scope>
<systemPath>${basedir}/lib/Holograms.jar</systemPath>
</dependency>
Expand Down
5 changes: 2 additions & 3 deletions src/main/java/dk/lockfuglsang/wolfencraft/HolographicScoreboard.java
100755 → 100644
Original file line number Diff line number Diff line change
Expand Up @@ -35,12 +35,11 @@ public final class HolographicScoreboard extends JavaPlugin {

@Override
public void onEnable() {
getCommand("holographicscoreboard").setExecutor(new HGSCommand(this));
if (!isDependenciesFulfilled()) {
getLogger().severe(rm.format("log.missing.dependencies"));
this.setEnabled(false);
return;
}
getCommand("holographicscoreboard").setExecutor(new HGSCommand(this));
try {
metrics = new Metrics(this);
cmdGraph = metrics.createGraph("Commands");
Expand Down Expand Up @@ -79,7 +78,7 @@ private void removeAllBoards() {
}
}

private boolean isDependenciesFulfilled() {
public boolean isDependenciesFulfilled() {
return Bukkit.getPluginManager().isPluginEnabled("HolographicDisplays") || Bukkit.getPluginManager().isPluginEnabled("Holograms");
}

Expand Down
Empty file.
Empty file.
16 changes: 16 additions & 0 deletions src/main/java/dk/lockfuglsang/wolfencraft/commands/HGSCommand.java
100755 → 100644
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@
import dk.lockfuglsang.minecraft.command.completion.AbstractTabCompleter;
import dk.lockfuglsang.wolfencraft.HolographicScoreboard;
import dk.lockfuglsang.wolfencraft.config.Scoreboard;
import dk.lockfuglsang.wolfencraft.util.ResourceManager;
import org.bukkit.command.Command;
import org.bukkit.command.CommandSender;

import java.util.ArrayList;
Expand All @@ -15,8 +17,11 @@
* Commands from the uSkyBlock common bukkit utils
*/
public class HGSCommand extends AbstractCommandExecutor {
private final HolographicScoreboard plugin;

public HGSCommand(final HolographicScoreboard plugin) {
super("hgs", "holographicscoreboard.admin", "main hgs command");
this.plugin = plugin;
addTab("id", new AbstractTabCompleter() {
@Override
protected List<String> getTabList(CommandSender commandSender, String s) {
Expand Down Expand Up @@ -50,4 +55,15 @@ protected List<String> getTabList(CommandSender commandSender, String s) {
add(new ReloadCommand(plugin));
add(new EditCommand(plugin));
}

@Override
public boolean onCommand(CommandSender commandSender, Command command, String alias, String[] args) {
if (!plugin.isDependenciesFulfilled()) {
if (commandSender.hasPermission(getPermission())) {
commandSender.sendMessage(ResourceManager.getRM().format("log.missing.dependencies").split("\n"));
}
return true;
}
return super.onCommand(commandSender, command, alias, args);
}
}
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
1 change: 0 additions & 1 deletion src/main/java/dk/lockfuglsang/wolfencraft/config/Scoreboard.java
100755 → 100644
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,6 @@ private BufferedSender createBufferedSender(final Plugin plugin) {
nearestPlayer = !Bukkit.getOnlinePlayers().isEmpty() ? Bukkit.getOnlinePlayers().iterator().next() : null;
}
if (nearestPlayer != null) {
// TODO: This would be "the best" solution currently, but not possible atm (1.7.9).
return new BufferedPlayerSender(nearestPlayer);
}
}
Expand Down
Empty file.
Empty file modified src/main/java/dk/lockfuglsang/wolfencraft/util/StringUtil.java
100755 → 100644
Empty file.
Empty file modified src/main/java/dk/lockfuglsang/wolfencraft/view/View.java
100755 → 100644
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file modified src/main/resources/config.yml
100755 → 100644
Empty file.
Empty file modified src/main/resources/messages.properties
100755 → 100644
Empty file.
Empty file modified src/main/resources/plugin.yml
100755 → 100644
Empty file.
Empty file.

0 comments on commit 45c557e

Please sign in to comment.