Skip to content

Commit

Permalink
remove rating
Browse files Browse the repository at this point in the history
  • Loading branch information
Inf1nityy committed Jul 26, 2024
1 parent ddb24b6 commit d41c168
Show file tree
Hide file tree
Showing 4 changed files with 0 additions and 312 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,6 @@
import com.nexia.base.player.PlayerDataManager;
import com.nexia.core.NexiaCore;
import com.nexia.core.utilities.player.CorePlayerData;
import com.nexia.ffa.RatingUtil;
import com.nexia.ffa.classic.utilities.FfaClassicUtil;
import com.nexia.ffa.kits.utilities.FfaKitsUtil;
import com.nexia.ffa.sky.utilities.FfaSkyUtil;
import com.nexia.ffa.uhc.utilities.FfaUhcUtil;
import com.nexia.nexus.api.event.player.PlayerJoinEvent;
import com.nexia.nexus.api.world.entity.player.Player;
import com.nexia.core.games.util.LobbyUtil;
Expand Down Expand Up @@ -138,10 +133,6 @@ private static void processJoin(NexiaPlayer player) {
LobbyUtil.returnToLobby(player, true);

checkBooster(player);
RatingUtil.checkRatingRank(player, FfaClassicUtil.INSTANCE);
RatingUtil.checkRatingRank(player, FfaKitsUtil.INSTANCE);
RatingUtil.checkRatingRank(player, FfaSkyUtil.INSTANCE);
RatingUtil.checkRatingRank(player, FfaUhcUtil.INSTANCE);
sendJoinMessage(player);
}
}
227 changes: 0 additions & 227 deletions src/main/java/com/nexia/ffa/RatingUtil.java

This file was deleted.

33 changes: 0 additions & 33 deletions src/main/java/com/nexia/ffa/base/BaseFfaUtil.java
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@
import com.nexia.core.utilities.time.ServerTime;
import com.nexia.ffa.FfaGameMode;
import com.nexia.ffa.FfaUtil;
import com.nexia.ffa.RatingUtil;
import com.nexia.nexus.api.world.World;
import com.nexia.nexus.api.world.entity.player.Player;
import com.nexia.nexus.api.world.types.Minecraft;
Expand Down Expand Up @@ -43,7 +42,6 @@

public abstract class BaseFfaUtil {
public ArrayList<UUID> wasInSpawn = new ArrayList<>();
public KillTracker killTracker = new KillTracker();
public static final List<BaseFfaUtil> ffaUtils = new ArrayList<>();

public BaseFfaUtil() {
Expand All @@ -68,10 +66,6 @@ public String getNameLowercase() {

public abstract Location getRespawnLocation();

public KillTracker getKillTracker() {
return killTracker;
}

public boolean isFfaPlayer(NexiaPlayer player) {
CorePlayerData data = (CorePlayerData) PlayerDataManager.getDataManager(NexiaCore.CORE_DATA_MANAGER).get(player);
return data.gameMode == PlayerGameMode.FFA && data.ffaGameMode == getGameMode();
Expand Down Expand Up @@ -130,9 +124,6 @@ public void calculateKill(NexiaPlayer attacker, NexiaPlayer player){

SavedPlayerData data = getDataManager().get(attacker).savedData;

RatingUtil.calculateRating(attacker, player, this);
RatingUtil.updateLeaderboard(this);

data.incrementInteger("killstreak");
int killstreak = data.get(Integer.class, "killstreak");
if (killstreak > data.get(Integer.class, "bestKillstreak"))
Expand All @@ -142,9 +133,6 @@ public void calculateKill(NexiaPlayer attacker, NexiaPlayer player){
killHeal(attacker);
giveKillLoot(attacker, player);

// Increment kill count for attacker
getKillTracker().incrementKillCount(attacker.getUUID(), player.getUUID());

if (killstreak % 5 == 0) {
for (ServerPlayer serverPlayer : getFfaWorld().players()) {
new NexiaPlayer(serverPlayer).sendMessage(
Expand Down Expand Up @@ -218,28 +206,7 @@ public void setDeathMessage(@NotNull NexiaPlayer player, @Nullable DamageSource
Component component = FfaUtil.returnClassicDeathMessage(player, nexiaAttacker);
if(component != null) msg = component;

double attackerOldRating = getDataManager().get(nexiaAttacker).savedData.get(Double.class, "rating");
double victimOldRating = getDataManager().get(player).savedData.get(Double.class, "rating");

calculateKill(nexiaAttacker, player);

double attackerNewRating = getDataManager().get(nexiaAttacker).savedData.get(Double.class, "rating");
double victimNewRating = getDataManager().get(player).savedData.get(Double.class, "rating");

if(component != null) {
msg = msg.append(Component.text(" (")
.color(ChatFormat.chatColor2))
.append(Component.text(String.format("%.2f", RatingUtil.calculateRatingDifference(victimNewRating, victimOldRating) * 100))
.color(ChatFormat.failColor))
.append(Component.text(" / ")
.color(ChatFormat.chatColor2))
.append(Component.text("+")
.color(ChatFormat.greenColor))
.append(Component.text(String.format("%.2f", RatingUtil.calculateRatingDifference(attackerNewRating, attackerOldRating) * 100))
.color(ChatFormat.greenColor))
.append(Component.text(")")
.color(ChatFormat.chatColor2));
}
}
}

Expand Down
43 changes: 0 additions & 43 deletions src/main/java/com/nexia/ffa/base/KillTracker.java

This file was deleted.

0 comments on commit d41c168

Please sign in to comment.