summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorsnowleo <schneeleo@gmail.com>2011-06-13 15:05:11 +0200
committersnowleo <schneeleo@gmail.com>2011-06-13 15:05:11 +0200
commitfd2d2456b94dadc91d864a12e88c6228f63e928e (patch)
tree59b9fbec9ae17986c8caa171d8a41b0a349b88c3
parentadc75021158bf00651f5941c2915b95be09c55b0 (diff)
downloadEssentials-fd2d2456b94dadc91d864a12e88c6228f63e928e.tar
Essentials-fd2d2456b94dadc91d864a12e88c6228f63e928e.tar.gz
Essentials-fd2d2456b94dadc91d864a12e88c6228f63e928e.tar.lz
Essentials-fd2d2456b94dadc91d864a12e88c6228f63e928e.tar.xz
Essentials-fd2d2456b94dadc91d864a12e88c6228f63e928e.zip
Renamed the Charge class to Trade
-rw-r--r--Essentials/src/com/earth2me/essentials/EssentialsPlayerListener.java16
-rw-r--r--Essentials/src/com/earth2me/essentials/Trade.java (renamed from Essentials/src/com/earth2me/essentials/Charge.java)0
-rw-r--r--Essentials/src/com/earth2me/essentials/commands/Commandback.java4
-rw-r--r--Essentials/src/com/earth2me/essentials/commands/Commandhome.java4
-rw-r--r--Essentials/src/com/earth2me/essentials/commands/Commandjump.java4
-rw-r--r--Essentials/src/com/earth2me/essentials/commands/Commandkit.java4
-rw-r--r--Essentials/src/com/earth2me/essentials/commands/Commandtop.java4
-rw-r--r--Essentials/src/com/earth2me/essentials/commands/Commandtp.java4
-rw-r--r--Essentials/src/com/earth2me/essentials/commands/Commandtpaccept.java4
-rw-r--r--Essentials/src/com/earth2me/essentials/commands/Commandtphere.java4
-rw-r--r--Essentials/src/com/earth2me/essentials/commands/Commandtppos.java4
-rw-r--r--Essentials/src/com/earth2me/essentials/commands/Commandwarp.java4
-rw-r--r--Essentials/src/com/earth2me/essentials/commands/Commandworld.java4
-rw-r--r--Essentials/src/com/earth2me/essentials/commands/EssentialsCommand.java4
-rw-r--r--EssentialsSpawn/src/com/earth2me/essentials/spawn/Commandspawn.java4
15 files changed, 34 insertions, 34 deletions
diff --git a/Essentials/src/com/earth2me/essentials/EssentialsPlayerListener.java b/Essentials/src/com/earth2me/essentials/EssentialsPlayerListener.java
index bc63eff52..ace790c09 100644
--- a/Essentials/src/com/earth2me/essentials/EssentialsPlayerListener.java
+++ b/Essentials/src/com/earth2me/essentials/EssentialsPlayerListener.java
@@ -181,7 +181,7 @@ public class EssentialsPlayerListener extends PlayerListener
event.setTo(loc);
try
{
- user.getTeleport().now(loc, new Charge("portal", ess));
+ user.getTeleport().now(loc, new Trade("portal", ess));
}
catch (Exception ex)
{
@@ -474,13 +474,13 @@ public class EssentialsPlayerListener extends PlayerListener
{
if (sign.getLine(2).equals("ยง2Everyone"))
{
- Charge charge = chargeUserForWarp(sign, user);
+ Trade charge = chargeUserForWarp(sign, user);
user.getTeleport().warp(sign.getLine(1), charge);
return;
}
if (user.inGroup(sign.getLine(2)))
{
- Charge charge = chargeUserForWarp(sign, user);
+ Trade charge = chargeUserForWarp(sign, user);
user.getTeleport().warp(sign.getLine(1), charge);
return;
}
@@ -488,7 +488,7 @@ public class EssentialsPlayerListener extends PlayerListener
if (user.isAuthorized("essentials.signs.warp.use")
&& (!ess.getSettings().getPerWarpPermission() || user.isAuthorized("essentials.warp." + sign.getLine(1))))
{
- Charge charge = chargeUserForWarp(sign, user);
+ Trade charge = chargeUserForWarp(sign, user);
user.getTeleport().warp(sign.getLine(1), charge);
}
return;
@@ -520,7 +520,7 @@ public class EssentialsPlayerListener extends PlayerListener
}
}
- private Charge chargeUserForWarp(Sign sign, User user) throws Exception
+ private Trade chargeUserForWarp(Sign sign, User user) throws Exception
{
if (!sign.getLine(3).isEmpty())
{
@@ -533,15 +533,15 @@ public class EssentialsPlayerListener extends PlayerListener
}
if (m1)
{
- return new Charge(q1, ess);
+ return new Trade(q1, ess);
}
else
{
ItemStack i = ItemDb.get(l1[1], (int)q1);
- return new Charge(i, ess);
+ return new Trade(i, ess);
}
}
- return new Charge("warpsign", ess);
+ return new Trade("warpsign", ess);
}
@Override
diff --git a/Essentials/src/com/earth2me/essentials/Charge.java b/Essentials/src/com/earth2me/essentials/Trade.java
index a84bfa918..a84bfa918 100644
--- a/Essentials/src/com/earth2me/essentials/Charge.java
+++ b/Essentials/src/com/earth2me/essentials/Trade.java
diff --git a/Essentials/src/com/earth2me/essentials/commands/Commandback.java b/Essentials/src/com/earth2me/essentials/commands/Commandback.java
index c852a7f99..26456a5d7 100644
--- a/Essentials/src/com/earth2me/essentials/commands/Commandback.java
+++ b/Essentials/src/com/earth2me/essentials/commands/Commandback.java
@@ -1,6 +1,6 @@
package com.earth2me.essentials.commands;
-import com.earth2me.essentials.Charge;
+import com.earth2me.essentials.Trade;
import com.earth2me.essentials.User;
import com.earth2me.essentials.Util;
import org.bukkit.Server;
@@ -16,7 +16,7 @@ public class Commandback extends EssentialsCommand
@Override
protected void run(Server server, User user, String commandLabel, String[] args) throws Exception
{
- Charge charge = new Charge(this.getName(), ess);
+ Trade charge = new Trade(this.getName(), ess);
charge.isAffordableFor(user);
user.sendMessage(Util.i18n("backUsageMsg"));
user.getTeleport().back(charge);
diff --git a/Essentials/src/com/earth2me/essentials/commands/Commandhome.java b/Essentials/src/com/earth2me/essentials/commands/Commandhome.java
index c71ba4b0e..2649a9cb0 100644
--- a/Essentials/src/com/earth2me/essentials/commands/Commandhome.java
+++ b/Essentials/src/com/earth2me/essentials/commands/Commandhome.java
@@ -1,6 +1,6 @@
package com.earth2me.essentials.commands;
-import com.earth2me.essentials.Charge;
+import com.earth2me.essentials.Trade;
import org.bukkit.Server;
import com.earth2me.essentials.User;
import com.earth2me.essentials.Util;
@@ -16,7 +16,7 @@ public class Commandhome extends EssentialsCommand
@Override
public void run(Server server, User user, String commandLabel, String[] args) throws Exception
{
- Charge charge = new Charge(this.getName(), ess);
+ Trade charge = new Trade(this.getName(), ess);
charge.isAffordableFor(user);
if(args.length > 0 && user.isAuthorized("essentials.home.others"))
{
diff --git a/Essentials/src/com/earth2me/essentials/commands/Commandjump.java b/Essentials/src/com/earth2me/essentials/commands/Commandjump.java
index 42ef0d424..5cdcbb2f2 100644
--- a/Essentials/src/com/earth2me/essentials/commands/Commandjump.java
+++ b/Essentials/src/com/earth2me/essentials/commands/Commandjump.java
@@ -1,6 +1,6 @@
package com.earth2me.essentials.commands;
-import com.earth2me.essentials.Charge;
+import com.earth2me.essentials.Trade;
import org.bukkit.Location;
import org.bukkit.Server;
import com.earth2me.essentials.TargetBlock;
@@ -36,7 +36,7 @@ public class Commandjump extends EssentialsCommand
throw new Exception(Util.i18n("jumpError"), ex);
}
- Charge charge = new Charge(this.getName(), ess);
+ Trade charge = new Trade(this.getName(), ess);
charge.isAffordableFor(user);
user.getTeleport().teleport(loc, charge);
}
diff --git a/Essentials/src/com/earth2me/essentials/commands/Commandkit.java b/Essentials/src/com/earth2me/essentials/commands/Commandkit.java
index e02a6d766..849ec2398 100644
--- a/Essentials/src/com/earth2me/essentials/commands/Commandkit.java
+++ b/Essentials/src/com/earth2me/essentials/commands/Commandkit.java
@@ -1,6 +1,6 @@
package com.earth2me.essentials.commands;
-import com.earth2me.essentials.Charge;
+import com.earth2me.essentials.Trade;
import java.util.Calendar;
import java.util.HashMap;
import java.util.List;
@@ -109,7 +109,7 @@ public class Commandkit extends EssentialsCommand
items = (List<String>)kit;
}
- Charge charge = new Charge("kit-" + kitName, ess);
+ Trade charge = new Trade("kit-" + kitName, ess);
try
{
charge.isAffordableFor(user);
diff --git a/Essentials/src/com/earth2me/essentials/commands/Commandtop.java b/Essentials/src/com/earth2me/essentials/commands/Commandtop.java
index 9704d4a59..8c0c687d0 100644
--- a/Essentials/src/com/earth2me/essentials/commands/Commandtop.java
+++ b/Essentials/src/com/earth2me/essentials/commands/Commandtop.java
@@ -1,6 +1,6 @@
package com.earth2me.essentials.commands;
-import com.earth2me.essentials.Charge;
+import com.earth2me.essentials.Trade;
import org.bukkit.Location;
import org.bukkit.Server;
import com.earth2me.essentials.User;
@@ -21,7 +21,7 @@ public class Commandtop extends EssentialsCommand
int topZ = user.getLocation().getBlockZ();
int topY = user.getWorld().getHighestBlockYAt(topX, topZ);
charge(user);
- user.getTeleport().teleport(new Location(user.getWorld(), user.getLocation().getX(), topY + 1, user.getLocation().getZ()), new Charge(this.getName(), ess));
+ user.getTeleport().teleport(new Location(user.getWorld(), user.getLocation().getX(), topY + 1, user.getLocation().getZ()), new Trade(this.getName(), ess));
user.sendMessage(Util.i18n("teleportTop"));
}
}
diff --git a/Essentials/src/com/earth2me/essentials/commands/Commandtp.java b/Essentials/src/com/earth2me/essentials/commands/Commandtp.java
index 64f7f8d08..a8b805e8d 100644
--- a/Essentials/src/com/earth2me/essentials/commands/Commandtp.java
+++ b/Essentials/src/com/earth2me/essentials/commands/Commandtp.java
@@ -1,6 +1,6 @@
package com.earth2me.essentials.commands;
-import com.earth2me.essentials.Charge;
+import com.earth2me.essentials.Trade;
import com.earth2me.essentials.Console;
import org.bukkit.Server;
import com.earth2me.essentials.User;
@@ -30,7 +30,7 @@ public class Commandtp extends EssentialsCommand
throw new Exception(Util.format("teleportDisabled", p.getDisplayName()));
}
user.sendMessage(Util.i18n("teleporting"));
- Charge charge = new Charge(this.getName(), ess);
+ Trade charge = new Trade(this.getName(), ess);
charge.isAffordableFor(user);
user.getTeleport().teleport(p, charge);
break;
diff --git a/Essentials/src/com/earth2me/essentials/commands/Commandtpaccept.java b/Essentials/src/com/earth2me/essentials/commands/Commandtpaccept.java
index 1aab32cdf..0cba80020 100644
--- a/Essentials/src/com/earth2me/essentials/commands/Commandtpaccept.java
+++ b/Essentials/src/com/earth2me/essentials/commands/Commandtpaccept.java
@@ -1,6 +1,6 @@
package com.earth2me.essentials.commands;
-import com.earth2me.essentials.Charge;
+import com.earth2me.essentials.Trade;
import org.bukkit.Server;
import com.earth2me.essentials.User;
import com.earth2me.essentials.Util;
@@ -23,7 +23,7 @@ public class Commandtpaccept extends EssentialsCommand
throw new Exception(Util.i18n("noPendingRequest"));
}
- Charge charge = new Charge(this.getName(), ess);
+ Trade charge = new Trade(this.getName(), ess);
if (user.isTeleportRequestHere())
{
charge.isAffordableFor(user);
diff --git a/Essentials/src/com/earth2me/essentials/commands/Commandtphere.java b/Essentials/src/com/earth2me/essentials/commands/Commandtphere.java
index 3710b121b..036c4be27 100644
--- a/Essentials/src/com/earth2me/essentials/commands/Commandtphere.java
+++ b/Essentials/src/com/earth2me/essentials/commands/Commandtphere.java
@@ -1,6 +1,6 @@
package com.earth2me.essentials.commands;
-import com.earth2me.essentials.Charge;
+import com.earth2me.essentials.Trade;
import org.bukkit.Server;
import com.earth2me.essentials.User;
import com.earth2me.essentials.Util;
@@ -21,7 +21,7 @@ public class Commandtphere extends EssentialsCommand
{
throw new Exception(Util.format("teleportDisabled", p.getDisplayName()));
}
- p.getTeleport().teleport(user, new Charge(this.getName(), ess));
+ p.getTeleport().teleport(user, new Trade(this.getName(), ess));
user.sendMessage(Util.i18n("teleporting"));
p.sendMessage(Util.i18n("teleporting"));
}
diff --git a/Essentials/src/com/earth2me/essentials/commands/Commandtppos.java b/Essentials/src/com/earth2me/essentials/commands/Commandtppos.java
index 05f95bc40..805aefaca 100644
--- a/Essentials/src/com/earth2me/essentials/commands/Commandtppos.java
+++ b/Essentials/src/com/earth2me/essentials/commands/Commandtppos.java
@@ -1,6 +1,6 @@
package com.earth2me.essentials.commands;
-import com.earth2me.essentials.Charge;
+import com.earth2me.essentials.Trade;
import org.bukkit.Location;
import org.bukkit.Server;
import com.earth2me.essentials.User;
@@ -26,7 +26,7 @@ public class Commandtppos extends EssentialsCommand
int y = Integer.parseInt(args[1]);
int z = Integer.parseInt(args[2]);
Location l = new Location(user.getWorld(), x, y, z);
- Charge charge = new Charge(this.getName(), ess);
+ Trade charge = new Trade(this.getName(), ess);
charge.isAffordableFor(user);
user.sendMessage(Util.i18n("teleporting"));
user.getTeleport().teleport(l, charge);
diff --git a/Essentials/src/com/earth2me/essentials/commands/Commandwarp.java b/Essentials/src/com/earth2me/essentials/commands/Commandwarp.java
index f4e710aaf..50a8ff0cf 100644
--- a/Essentials/src/com/earth2me/essentials/commands/Commandwarp.java
+++ b/Essentials/src/com/earth2me/essentials/commands/Commandwarp.java
@@ -1,6 +1,6 @@
package com.earth2me.essentials.commands;
-import com.earth2me.essentials.Charge;
+import com.earth2me.essentials.Trade;
import org.bukkit.Server;
import com.earth2me.essentials.User;
import com.earth2me.essentials.Util;
@@ -73,7 +73,7 @@ public class Commandwarp extends EssentialsCommand
private void warpUser(User user, String name) throws Exception
{
- Charge charge = new Charge(this.getName(), ess);
+ Trade charge = new Trade(this.getName(), ess);
charge.isAffordableFor(user);
if (ess.getSettings().getPerWarpPermission())
{
diff --git a/Essentials/src/com/earth2me/essentials/commands/Commandworld.java b/Essentials/src/com/earth2me/essentials/commands/Commandworld.java
index bdbe83798..0a315b1d4 100644
--- a/Essentials/src/com/earth2me/essentials/commands/Commandworld.java
+++ b/Essentials/src/com/earth2me/essentials/commands/Commandworld.java
@@ -1,6 +1,6 @@
package com.earth2me.essentials.commands;
-import com.earth2me.essentials.Charge;
+import com.earth2me.essentials.Trade;
import java.util.List;
import org.bukkit.Location;
import org.bukkit.Server;
@@ -68,7 +68,7 @@ public class Commandworld extends EssentialsCommand
Location loc = user.getLocation();
loc = new Location(world, loc.getBlockX() * factor + .5, loc.getBlockY(), loc.getBlockZ() * factor + .5);
- Charge charge = new Charge(this.getName(), ess);
+ Trade charge = new Trade(this.getName(), ess);
charge.isAffordableFor(user);
user.getTeleport().teleport(loc, charge);
}
diff --git a/Essentials/src/com/earth2me/essentials/commands/EssentialsCommand.java b/Essentials/src/com/earth2me/essentials/commands/EssentialsCommand.java
index 12c9258c0..d4f509aa0 100644
--- a/Essentials/src/com/earth2me/essentials/commands/EssentialsCommand.java
+++ b/Essentials/src/com/earth2me/essentials/commands/EssentialsCommand.java
@@ -1,6 +1,6 @@
package com.earth2me.essentials.commands;
-import com.earth2me.essentials.Charge;
+import com.earth2me.essentials.Trade;
import java.util.List;
import org.bukkit.Server;
import org.bukkit.command.Command;
@@ -89,7 +89,7 @@ public abstract class EssentialsCommand implements IEssentialsCommand
{
if (sender instanceof Player)
{
- Charge charge = new Charge(this.getName(), ess);
+ Trade charge = new Trade(this.getName(), ess);
charge.charge(ess.getUser((Player)sender));
}
}
diff --git a/EssentialsSpawn/src/com/earth2me/essentials/spawn/Commandspawn.java b/EssentialsSpawn/src/com/earth2me/essentials/spawn/Commandspawn.java
index 88a7c477b..5660c3778 100644
--- a/EssentialsSpawn/src/com/earth2me/essentials/spawn/Commandspawn.java
+++ b/EssentialsSpawn/src/com/earth2me/essentials/spawn/Commandspawn.java
@@ -1,6 +1,6 @@
package com.earth2me.essentials.spawn;
-import com.earth2me.essentials.Charge;
+import com.earth2me.essentials.Trade;
import org.bukkit.Server;
import com.earth2me.essentials.Essentials;
import com.earth2me.essentials.IEssentials;
@@ -19,7 +19,7 @@ public class Commandspawn extends EssentialsCommand
public void run(Server server, User user, String commandLabel, String[] args) throws Exception
{
final IEssentials ess = Essentials.getStatic();
- final Charge charge = new Charge(this.getName(), ess);
+ final Trade charge = new Trade(this.getName(), ess);
charge.isAffordableFor(user);
user.getTeleport().respawn(ess.getSpawn(), charge);
}