SteamWar/SpigotCore
Archiviert
13
0

WIP: scoreboard #12

Geschlossen
Lixfel möchte 22 Commits von scoreboard nach master mergen
Nur Änderungen aus Commit 7d78c28af5 werden angezeigt - Alle Commits anzeigen

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);
}
}