edited stuff

This commit is contained in:
alisolarflare 2016-09-04 23:08:57 -04:00
parent 59d8dc791c
commit 0dd474ce86
2 changed files with 15 additions and 22 deletions

View file

@ -1,7 +1,6 @@
package iie; package iie;
import org.bukkit.Location; import org.bukkit.Location;
import org.bukkit.Sound;
import org.bukkit.World; import org.bukkit.World;
import org.bukkit.command.Command; import org.bukkit.command.Command;
import org.bukkit.command.CommandExecutor; import org.bukkit.command.CommandExecutor;

View file

@ -8,6 +8,7 @@ import org.bukkit.plugin.java.JavaPlugin;
import org.bukkit.scoreboard.Objective; import org.bukkit.scoreboard.Objective;
import org.bukkit.scoreboard.Scoreboard; import org.bukkit.scoreboard.Scoreboard;
import alisolarflare.RandomTP;
public class HelloWorldPlugin extends JavaPlugin { public class HelloWorldPlugin extends JavaPlugin {
@ -16,23 +17,16 @@ public class HelloWorldPlugin extends JavaPlugin {
public static AbstractMap<String, String> deathMap = new HashMap<String, String>(); public static AbstractMap<String, String> deathMap = new HashMap<String, String>();
public void onEnable() { public void onEnable() {
registerCommands();
getServer().getPluginManager().registerEvents(new DeathListener(this), this);
board = Bukkit.getServer().getScoreboardManager().getMainScoreboard(); board = Bukkit.getServer().getScoreboardManager().getMainScoreboard();
if (board.getObjective("hardcoreTimeDead") != null){ if (board.getObjective("hardcoreTimeDead") == null)
hardcoreTimeDead = board.getObjective("hardcoreTimeDead");
}else{
hardcoreTimeDead = board.registerNewObjective("hardcoreTimeDead", "dummy"); hardcoreTimeDead = board.registerNewObjective("hardcoreTimeDead", "dummy");
} }
registerCommands();
getServer().getPluginManager().registerEvents(new JoinListener(this), this);
getServer().getPluginManager().registerEvents(new DeathListener(this), this);
}
public void registerCommands() { public void registerCommands() {
getCommand("hardcore").setExecutor(new HelloWorld(this)); getCommand("HelloWorld").setExecutor(new HelloWorld(this));
getCommand("debugRTP").setExecutor(new RandomTP(this));
} }
} }