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,31 +8,25 @@ import org.bukkit.plugin.java.JavaPlugin;
|
|||
import org.bukkit.scoreboard.Objective;
|
||||
import org.bukkit.scoreboard.Scoreboard;
|
||||
|
||||
import alisolarflare.RandomTP;
|
||||
|
||||
public class HelloWorldPlugin extends JavaPlugin {
|
||||
|
||||
|
||||
public static Scoreboard board;
|
||||
public static Objective hardcoreTimeDead;
|
||||
public static AbstractMap<String,String> deathMap = new HashMap<String,String>();
|
||||
|
||||
public void onEnable(){
|
||||
|
||||
|
||||
board = Bukkit.getServer().getScoreboardManager().getMainScoreboard();
|
||||
if (board.getObjective("hardcoreTimeDead") != null){
|
||||
hardcoreTimeDead = board.getObjective("hardcoreTimeDead");
|
||||
}else{
|
||||
hardcoreTimeDead = board.registerNewObjective("hardcoreTimeDead", "dummy");
|
||||
}
|
||||
|
||||
public static Objective hardcoreTimeDead;
|
||||
public static AbstractMap<String, String> deathMap = new HashMap<String, String>();
|
||||
|
||||
public void onEnable() {
|
||||
registerCommands();
|
||||
getServer().getPluginManager().registerEvents(new JoinListener(this), this);
|
||||
getServer().getPluginManager().registerEvents(new DeathListener(this), this);
|
||||
|
||||
|
||||
}
|
||||
public void registerCommands(){
|
||||
getCommand("hardcore").setExecutor(new HelloWorld(this));
|
||||
board = Bukkit.getServer().getScoreboardManager().getMainScoreboard();
|
||||
if (board.getObjective("hardcoreTimeDead") == null)
|
||||
hardcoreTimeDead = board.registerNewObjective("hardcoreTimeDead", "dummy");
|
||||
}
|
||||
|
||||
}
|
||||
public void registerCommands() {
|
||||
getCommand("HelloWorld").setExecutor(new HelloWorld(this));
|
||||
getCommand("debugRTP").setExecutor(new RandomTP(this));
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue