SteamWar/SpigotCore
Archiviert
13
0

untested rework of dependent scoreboard source

Dieser Commit ist enthalten in:
BuildTools 2019-12-05 20:45:46 +01:00
Ursprung 60f93d0e3f
Commit 7d78c28af5

Datei anzeigen

@ -1,6 +1,7 @@
package de.steamwar.core.events;
import de.steamwar.scoreboard.SWScoreboard;
import de.steamwar.scoreboard.ScoreboardCallback;
import de.steamwar.sql.SteamwarUser;
import org.bukkit.entity.Player;
import org.bukkit.event.EventHandler;
@ -8,6 +9,8 @@ import org.bukkit.event.Listener;
import org.bukkit.event.player.PlayerJoinEvent;
import org.bukkit.event.player.PlayerQuitEvent;
import java.util.HashMap;
public class PlayerJoinedEvent implements Listener{
@ -54,5 +57,24 @@ public class PlayerJoinedEvent implements Listener{
event.setQuitMessage("§c§l« §r" + player.getDisplayName());
SWScoreboard.getPlayerBoards().remove(player);
//TEST
SWScoreboard swScoreboard = new SWScoreboard(new ScoreboardCallback() {
@Override
public HashMap<String, Integer> getData() {
HashMap<String, Integer> data = new HashMap<>();
data.put("bla", 2);
data.put("lala", 3);
return data;
}
@Override
public String getTitle() {
return "ES GEHT!!!!";
}
});
SWScoreboard.getPlayerBoards().put(player, swScoreboard);
}
}