/*
 * MIT License
 *
 * Copyright (c) 2017-2019 RiiConnect24 and its contributors
 *
 * Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files
 * (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge,
 * publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do
 * so, subject to the following conditions:
 *
 * The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
 *
 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT
 * LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO
 * EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
 * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR
 * THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 */

package xyz.rc24.bot.core.entities;

public enum CodeType
{
    GAME(0, "🎮 **Games**", "game"),
    NNID(1, "<:NintendoNetworkID:287655797104836608> **Nintendo Network ID**", "nnid"),
    SWITCH(2, "<:Switch:287652338791874560> **Switch**", "switch"),
    THREEDS(3, "<:New3DSXL:287651327763283968> **3DS**", "3ds"),
    WII(4, "<:Wii:259081748007223296> **Wii**", "wii"),
    PSN(5, "<:psn:545097818319224832> **PlayStation Network ID**", "psn"),
    UNKNOWN(-1, "", "");

    private final int id;
    private final String displayName, name;

    CodeType(int id, String displayName, String name)
    {
        this.id = id;
        this.displayName = displayName;
        this.name = name;
    }

    public int getId()
    {
        return id;
    }

    public String getDisplayName()
    {
        return displayName;
    }

    public String getName()
    {
        return name;
    }

    public static CodeType fromId(int id)
    {
        for(CodeType type : values())
        {
            if(type.getId() == id)
                return type;
        }

        return UNKNOWN;
    }
}

@@ -1320,24 +1320,99 @@
 %22, %22nnid%22),%0A
+    PSN(2, %22%3C:psn:545097818319224832%3E **PlayStation Network ID**%22, %22psn%22),%0A
     SWITCH(2
@@ -1410,17 +1410,17 @@
  SWITCH(
-2
+3
 , %22%3C:Swi
@@ -1479,17 +1479,17 @@
 THREEDS(
-3
+4
 , %22%3C:New
@@ -1540,17 +1540,17 @@
     WII(
-4
+5
 , %22%3C:Wii
@@ -1592,82 +1592,8 @@
 %22),%0A
-    PSN(5, %22%3C:psn:545097818319224832%3E **PlayStation Network ID**%22, %22psn%22),
 %0A   

fix code type order