Debug attempt

This commit is contained in:
Magnus Ulf 2019-06-17 15:49:32 +02:00
parent 32f4fe0c33
commit 2a865e9968

View File

@ -10,7 +10,7 @@ import org.bukkit.plugin.RegisteredServiceProvider;
import java.util.Collection; import java.util.Collection;
public class MoneyMixinVault extends MoneyMixinAbstract public class MoneyMixinVault extends MoneyMixinAbstract
{ {
// -------------------------------------------- // // -------------------------------------------- //
// INSTANCE & CONSTRUCT // INSTANCE & CONSTRUCT
@ -184,10 +184,12 @@ public class MoneyMixinVault extends MoneyMixinAbstract
Object objectFrom = getEconomyObject(fromId); Object objectFrom = getEconomyObject(fromId);
OfflinePlayer opFrom = objectFrom instanceof OfflinePlayer ? (OfflinePlayer) objectFrom : null; OfflinePlayer opFrom = objectFrom instanceof OfflinePlayer ? (OfflinePlayer) objectFrom : null;
String nameFrom = objectFrom instanceof String ? (String) objectFrom : null; String nameFrom = objectFrom instanceof String ? (String) objectFrom : null;
if (fromId != null && opFrom == null && nameFrom == null) throw new RuntimeException("fromId not convertable: " + fromId);
Object objectTo = getEconomyObject(toId); Object objectTo = getEconomyObject(toId);
OfflinePlayer opTo = objectTo instanceof OfflinePlayer ? (OfflinePlayer) objectTo : null; OfflinePlayer opTo = objectTo instanceof OfflinePlayer ? (OfflinePlayer) objectTo : null;
String nameTo = objectTo instanceof String ? (String) objectTo : null; String nameTo = objectTo instanceof String ? (String) objectTo : null;
if (toId != null && opTo == null && nameTo == null) throw new RuntimeException("toId not convertable: " + toId);
// Ensure the accounts exist // Ensure the accounts exist
if (fromId != null) this.ensureExists(fromId); if (fromId != null) this.ensureExists(fromId);