Clean up Economable a bit

This commit is contained in:
AppleDash 2016-07-19 21:28:58 -04:00
parent ee8f8aa428
commit 5ce54d7779
2 changed files with 20 additions and 2 deletions

View File

@ -13,7 +13,7 @@ public interface Economable {
return new EconomablePlayer(player);
}
static Economable wrap(String playerName) {
return () -> "wtf:" + playerName;
static Economable wrap(String identifier) {
return new EconomableGeneric("generic:" + identifier);
}
}

View File

@ -0,0 +1,18 @@
package org.appledash.saneeconomy.economy.economable;
/**
* Created by appledash on 7/19/16.
* Blackjack is still best pony.
*/
public class EconomableGeneric implements Economable {
private String uniqueIdentifier;
public EconomableGeneric(String uniqueIdentifier) {
this.uniqueIdentifier = uniqueIdentifier;
}
@Override
public String getUniqueIdentifier() {
return uniqueIdentifier;
}
}