Search in sources :

Example 66 with User

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()));
    }
}
Also used : User(pl.plajer.villagedefense3.User) EventHandler(org.bukkit.event.EventHandler)

Example 67 with User

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);
}
Also used : User(testapp.endpoint.ghissues.gh353.User) Test(org.junit.Test)

Aggregations

User (pl.plajer.villagedefense3.User)30 Player (org.bukkit.entity.Player)18 User (org.gluu.oxtrust.model.scim2.User)17 EventHandler (org.bukkit.event.EventHandler)11 GluuCustomPerson (org.gluu.oxtrust.model.GluuCustomPerson)10 ScimPatchUser (org.gluu.oxtrust.model.scim2.ScimPatchUser)10 User (org.openstack4j.model.identity.v3.User)10 DuplicateEntryException (org.gluu.site.ldap.exception.DuplicateEntryException)8 Arena (pl.plajer.villagedefense3.arena.Arena)8 ArrayList (java.util.ArrayList)7 EntryPersistenceException (org.gluu.site.ldap.persistence.exception.EntryPersistenceException)7 Date (java.util.Date)6 SimpleUser (me.zhanghai.android.douya.network.api.info.apiv2.SimpleUser)6 User (me.zhanghai.android.douya.network.api.info.apiv2.User)6 ItemStack (org.bukkit.inventory.ItemStack)5 PersonRequiredFieldsException (org.gluu.oxtrust.exception.PersonRequiredFieldsException)5 Test (org.junit.Test)5 ApiOperation (com.wordnik.swagger.annotations.ApiOperation)4 BigDecimal (java.math.BigDecimal)4 URI (java.net.URI)4