fixed item drps on death and gamebeddestroed
This commit is contained in:
parent
78fd1587eb
commit
3a9fa0c0f7
@ -99,6 +99,7 @@ public class DamageListener implements Listener {
|
|||||||
playerData.setLastDamager(damager);
|
playerData.setLastDamager(damager);
|
||||||
double health = player.getHealth() - event.getFinalDamage();
|
double health = player.getHealth() - event.getFinalDamage();
|
||||||
if (health < 0) {
|
if (health < 0) {
|
||||||
|
event.setCancelled(true);
|
||||||
this.plugin.getServer().getPluginManager().callEvent(new PlayerKillEvent(player, damager));
|
this.plugin.getServer().getPluginManager().callEvent(new PlayerKillEvent(player, damager));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -33,6 +33,7 @@ public class GameEndListener implements Listener {
|
|||||||
PlayerData playerData = this.plugin.getPlayerDataManager().getPlayerData(player.getUniqueId());
|
PlayerData playerData = this.plugin.getPlayerDataManager().getPlayerData(player.getUniqueId());
|
||||||
playerData.setLastDamager(null);
|
playerData.setLastDamager(null);
|
||||||
playerData.setGameKills(0);
|
playerData.setGameKills(0);
|
||||||
|
playerData.setGameBedsDestroyed(0);
|
||||||
|
|
||||||
String winnerTitle = CC.translate("&aVICTORY!");
|
String winnerTitle = CC.translate("&aVICTORY!");
|
||||||
String losingTitle = CC.translate("&cDEFEAT!");
|
String losingTitle = CC.translate("&cDEFEAT!");
|
||||||
|
@ -13,7 +13,6 @@ import rip.tilly.bedwars.BedWars;
|
|||||||
import rip.tilly.bedwars.playerdata.PlayerData;
|
import rip.tilly.bedwars.playerdata.PlayerData;
|
||||||
import rip.tilly.bedwars.utils.CC;
|
import rip.tilly.bedwars.utils.CC;
|
||||||
|
|
||||||
import java.text.DecimalFormat;
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
public class TablistProvider implements TabAdapter {
|
public class TablistProvider implements TabAdapter {
|
||||||
@ -58,7 +57,6 @@ public class TablistProvider implements TabAdapter {
|
|||||||
Property property = skin.getProperties().get("textures").stream().findFirst().orElse(null);
|
Property property = skin.getProperties().get("textures").stream().findFirst().orElse(null);
|
||||||
|
|
||||||
PlayerData playerData = this.plugin.getPlayerDataManager().getPlayerData(player.getUniqueId());
|
PlayerData playerData = this.plugin.getPlayerDataManager().getPlayerData(player.getUniqueId());
|
||||||
DecimalFormat decimalFormat = new DecimalFormat("0.00");
|
|
||||||
|
|
||||||
lines.add(new TabEntry(3, 2, CC.translate("&d&lYour Profile")).setPing(-1).setSkin(new Skin(property.getValue(), property.getSignature())));
|
lines.add(new TabEntry(3, 2, CC.translate("&d&lYour Profile")).setPing(-1).setSkin(new Skin(property.getValue(), property.getSignature())));
|
||||||
lines.add(new TabEntry(3, 3, CC.translate(" &fKills: &d" + playerData.getKills())).setPing(-1));
|
lines.add(new TabEntry(3, 3, CC.translate(" &fKills: &d" + playerData.getKills())).setPing(-1));
|
||||||
|
Loading…
Reference in New Issue
Block a user