use of sqlite.kripton209.model1.User in project Village_Defense by Plajer.
the class KitManager method checkIfIsUnlocked.
@EventHandler
public void checkIfIsUnlocked(VillagePlayerChooseKitEvent event) {
if (event.getKit().isUnlockedByPlayer(event.getPlayer())) {
User user = UserManager.getUser(event.getPlayer().getUniqueId());
user.setKit(event.getKit());
String chosenkitmessage = ChatManager.colorMessage("Kits.Choose-Message");
chosenkitmessage = ChatManager.formatMessage(chosenkitmessage, event.getKit());
event.getPlayer().sendMessage(chosenkitmessage);
} else {
String chosenKitMessageButNotUnlocked = ChatManager.colorMessage("Kits.Not-Unlocked-Message");
event.getPlayer().sendMessage(ChatManager.formatMessage(chosenKitMessageButNotUnlocked, event.getKit()));
}
}
use of sqlite.kripton209.model1.User in project actframework by actframework.
the class GHIssue353 method testPost.
@Test
public void testPost() throws Exception {
url("/gh/353").accept(H.Format.JSON).postJSON(user);
String s = resp().body().string();
User user2 = JSON.parseObject(s, User.class);
eq(user.name, user2.name);
}
Aggregations