edited stuff
This commit is contained in:
parent
59d8dc791c
commit
0dd474ce86
2 changed files with 15 additions and 22 deletions
|
@ -1,7 +1,6 @@
|
|||
package iie;
|
||||
|
||||
import org.bukkit.Location;
|
||||
import org.bukkit.Sound;
|
||||
import org.bukkit.World;
|
||||
import org.bukkit.command.Command;
|
||||
import org.bukkit.command.CommandExecutor;
|
||||
|
|
|
@ -8,6 +8,7 @@ import org.bukkit.plugin.java.JavaPlugin;
|
|||
import org.bukkit.scoreboard.Objective;
|
||||
import org.bukkit.scoreboard.Scoreboard;
|
||||
|
||||
import alisolarflare.RandomTP;
|
||||
|
||||
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 void onEnable() {
|
||||
|
||||
|
||||
registerCommands();
|
||||
getServer().getPluginManager().registerEvents(new DeathListener(this), this);
|
||||
board = Bukkit.getServer().getScoreboardManager().getMainScoreboard();
|
||||
if (board.getObjective("hardcoreTimeDead") != null){
|
||||
hardcoreTimeDead = board.getObjective("hardcoreTimeDead");
|
||||
}else{
|
||||
if (board.getObjective("hardcoreTimeDead") == null)
|
||||
hardcoreTimeDead = board.registerNewObjective("hardcoreTimeDead", "dummy");
|
||||
}
|
||||
|
||||
registerCommands();
|
||||
getServer().getPluginManager().registerEvents(new JoinListener(this), this);
|
||||
getServer().getPluginManager().registerEvents(new DeathListener(this), this);
|
||||
|
||||
|
||||
}
|
||||
public void registerCommands() {
|
||||
getCommand("hardcore").setExecutor(new HelloWorld(this));
|
||||
getCommand("HelloWorld").setExecutor(new HelloWorld(this));
|
||||
getCommand("debugRTP").setExecutor(new RandomTP(this));
|
||||
}
|
||||
|
||||
}
|
Loading…
Reference in a new issue