untested rework of dependent scoreboard source
Dieser Commit ist enthalten in:
Ursprung
60f93d0e3f
Commit
7d78c28af5
@ -1,6 +1,7 @@
|
|||||||
package de.steamwar.core.events;
|
package de.steamwar.core.events;
|
||||||
|
|
||||||
import de.steamwar.scoreboard.SWScoreboard;
|
import de.steamwar.scoreboard.SWScoreboard;
|
||||||
|
import de.steamwar.scoreboard.ScoreboardCallback;
|
||||||
import de.steamwar.sql.SteamwarUser;
|
import de.steamwar.sql.SteamwarUser;
|
||||||
import org.bukkit.entity.Player;
|
import org.bukkit.entity.Player;
|
||||||
import org.bukkit.event.EventHandler;
|
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.PlayerJoinEvent;
|
||||||
import org.bukkit.event.player.PlayerQuitEvent;
|
import org.bukkit.event.player.PlayerQuitEvent;
|
||||||
|
|
||||||
|
import java.util.HashMap;
|
||||||
|
|
||||||
|
|
||||||
public class PlayerJoinedEvent implements Listener{
|
public class PlayerJoinedEvent implements Listener{
|
||||||
|
|
||||||
@ -54,5 +57,24 @@ public class PlayerJoinedEvent implements Listener{
|
|||||||
event.setQuitMessage("§c§l« §r" + player.getDisplayName());
|
event.setQuitMessage("§c§l« §r" + player.getDisplayName());
|
||||||
|
|
||||||
SWScoreboard.getPlayerBoards().remove(player);
|
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);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
In neuem Issue referenzieren
Einen Benutzer sperren