mirror of
https://github.com/EssentialsX/Essentials.git
synced 2024-11-02 17:09:58 +01:00
/eco offline players
This commit is contained in:
parent
cb5ab32be6
commit
7ed57bc291
@ -2,7 +2,6 @@ package com.earth2me.essentials.commands;
|
||||
|
||||
import org.bukkit.Server;
|
||||
import org.bukkit.command.CommandSender;
|
||||
import com.earth2me.essentials.Essentials;
|
||||
import org.bukkit.entity.Player;
|
||||
import com.earth2me.essentials.User;
|
||||
|
||||
@ -56,28 +55,28 @@ public class Commandeco extends EssentialsCommand
|
||||
}
|
||||
else
|
||||
{
|
||||
for (Player p : server.matchPlayer(args[1]))
|
||||
User u = ess.getUser(args[1]);
|
||||
if (u == null)
|
||||
{
|
||||
User u = ess.getUser(p);
|
||||
switch (cmd)
|
||||
{
|
||||
case GIVE:
|
||||
u.giveMoney(amount);
|
||||
break;
|
||||
u = ess.getOfflineUser(args[0]);
|
||||
}
|
||||
switch (cmd)
|
||||
{
|
||||
case GIVE:
|
||||
u.giveMoney(amount);
|
||||
break;
|
||||
|
||||
case TAKE:
|
||||
u.takeMoney(amount);
|
||||
break;
|
||||
case TAKE:
|
||||
u.takeMoney(amount);
|
||||
break;
|
||||
|
||||
case RESET:
|
||||
u.setMoney(amount == 0 ? ess.getSettings().getStartingBalance() : amount);
|
||||
break;
|
||||
}
|
||||
case RESET:
|
||||
u.setMoney(amount == 0 ? ess.getSettings().getStartingBalance() : amount);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
private enum EcoCommands
|
||||
{
|
||||
GIVE, TAKE, RESET
|
||||
|
Loading…
Reference in New Issue
Block a user