Skip to content

fix querying warp using wrong name #34

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Mar 15, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions src/main/java/shukaro/warptheory/handlers/WarpHandler.java
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ public static void purgeWarpMinor(EntityPlayer player) {

public static void removeWarp(EntityPlayer player, int amount) {
if (amount <= 0) return;
String name = player.getDisplayName();
String name = player.getCommandSenderName();
int wp = Knowledge.getWarpPerm(name);
int wn = Knowledge.getWarpSticky(name);
int wt = Knowledge.getWarpTemp(name);
Expand All @@ -128,15 +128,15 @@ public static void removeWarp(EntityPlayer player, int amount) {
}

public static int getTotalWarp(EntityPlayer player) {
String name = player.getDisplayName();
String name = player.getCommandSenderName();
int innerWarp = Knowledge.getWarpTotal(name);
int extraPerm = Knowledge.getWarpPerm(name) * (int) Math.max(0, ConfigHandler.permWarpMult - 1);
int outerWarp = getWarpFromGear(player);
return innerWarp + extraPerm + outerWarp;
}

public static int[] getIndividualWarps(EntityPlayer player) {
String userName = player.getDisplayName();
String userName = player.getCommandSenderName();
int[] totals = new int[] { Knowledge.getWarpPerm(userName), Knowledge.getWarpSticky(userName),
Knowledge.getWarpTemp(userName) };
return totals;
Expand Down