Skip to content

Commit 3b35763

Browse files
committed
Fix warp sign costs.
1 parent 2d5c1fd commit 3b35763

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

Essentials/src/com/earth2me/essentials/Teleport.java

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
import static com.earth2me.essentials.I18n._;
44
import com.earth2me.essentials.utils.DateUtil;
55
import com.earth2me.essentials.utils.LocationUtil;
6+
import java.math.BigDecimal;
67
import java.util.Calendar;
78
import java.util.GregorianCalendar;
89
import net.ess3.api.IEssentials;
@@ -171,8 +172,8 @@ private void teleport(IUser teleportee, ITarget target, Trade chargeFor, Telepor
171172
{
172173
double delay = ess.getSettings().getTeleportDelay();
173174

174-
Trade cashCharge = null;
175-
if (chargeFor != null)
175+
Trade cashCharge = chargeFor;
176+
if (chargeFor != null && !chargeFor.getCommandCost(teleportOwner).equals(BigDecimal.ZERO))
176177
{
177178
chargeFor.isAffordableFor(teleportOwner);
178179
cashCharge = new Trade(chargeFor.getCommandCost(teleportOwner), ess);

Essentials/src/com/earth2me/essentials/signs/EssentialsSign.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
import java.util.HashSet;
88
import java.util.Locale;
99
import java.util.Set;
10+
import java.util.logging.Level;
1011
import net.ess3.api.IEssentials;
1112
import net.ess3.api.MaxMoneyException;
1213
import net.ess3.api.events.SignBreakEvent;
@@ -600,7 +601,7 @@ public final String getLine(final int index)
600601
return builder.toString();
601602
//return event.getLine(index); // Above code can be removed and replaced with this line when https://github.com/Bukkit/Bukkit/pull/982 is merged.
602603
}
603-
604+
604605
@Override
605606
public final void setLine(final int index, final String text)
606607
{

0 commit comments

Comments
 (0)