CoreAPI | Languages / Holograms / Achievements / NameTags / TellRaw - UUID+MySQl 3.0

CoreAPI Update 2.0: BungeeCord for Nicks

  1. MaveCrit
    Tested Minecraft Versions:
    • 1.8
    • 1.9
    Contributors:
    bobacadodl
    [​IMG]

    What is the CoreAPI?
    CoreAPI is a leightweight API for EVERYTHING you need!
    It comes with tons of features and own ingame functions!
    Needed: ProtocolLib



    EXAMPLE PLUGIN: HERE


    [​IMG]
    • Choose between 31 languages (more soon)
    • /language to switch between languages (Can be switched off)
    • Send TellRaw messages (with hover, click and colours)
    • Send holograms with multiple lines
    • Create achievements
    • MySQL database to save language and achievements
    • Config section to deactivate /language
    • Touch holograms (currently under construction)
    • SkinChange without loosing name
    • Send ActionBars
    • Send WorldBorders
    • Create easy scoreboards
    • Modify the tablist
    • Get the ping from a player
    • Let players glow! NEW! 1.9 FEATURE
    • Let players glow in case of their ping! NEW! 1.9 FEATURE
    • Change the player nametag! NEW!
    • More ideas? PM me!

    [​IMG]

    [​IMG]
    [​IMG]
    2016-03-26_10.41.30.png
    [​IMG]
    [​IMG]

    [​IMG]

    Holograms:

    1. Creating a hologram
    Code (Text):
    Hologram holo = new Hologram(location);
    2. Adding lines to the hologram
    Code (Text):
    holo.addLine("§eWelcome");

    holo.addLine("§6"+ p.getName());    
    3. Show the hologram to the player
    For a single player:
    Code (Text):
    holo.sendToPlayer(p);
    3.1. Show the hologram to all players
    Code (Text):
    for(Player all : Bukkit.getOnlinePlayers()){
    holo.sendToPlayer(all);  }
    4. Register the hologram
    Code (Text):
    HologramResetter.register(p, holo);
    5. Remove the hologram
    Code (Text):
    holo.remove();
    5.1. Remove the hologram from one player:
    Code (Text):
    holo.removeFromPlayer(p)
    6. Remove a single line
    Code (Text):
    holo.removeLine(1)

    TellRaw Messages:

    1. Creating unclickable section of the message
    Code (Text):
    JSONChatMessage message= new JSONChatMessage("Message: ", JSONChatColor.GRAY, null);
    2. Creating clickable/hoverable section of the message
    Code (Text):
    JSONChatExtra extra= new JSONChatExtra("Clickable", JSONChatColor.GREEN, Arrays.asList(JSONChatFormat.BOLD));
    3. Set hover event
    Code (Text):
     extra.setHoverEvent(JSONChatHoverEventType.SHOW_TEXT, "This is a hovering message");
    4. Set command when clicking the message
    Code (Text):
     extra.setClickEvent(JSONChatClickEventType.RUN_COMMAND, "/command");
    5. Bind the events to the message
    Code (Text):
    message.addExtra(extra);
    6. Send the message
    Code (Text):
    message.sendToPlayer(p);

    Languages:

    1. Getting the language of a player
    Code (Text):
    LanguageAPI.getLanguage(player);
    2. Set the language of a player
    Code (Text):
    LanguageAPI.setLanguage(player, Language.POLISH);

    Achievements:

    1. Creating a new achievement
    Code (Text):
    Achievements achievement = new Achievements("FirstDeath");
    2. Check if player has achievement
    Code (Text):
    if(achievement.hasPlayer(player)){
    3. Give player the achievement
    Code (Text):
    achievement.addToPlayer(player);
    4. Remove the achievement from player
    Code (Text):
    achievement.removeFromPlayer(player);

    Titles:

    1. Set the title
    Code (Text):
    Titles.sendTitle(player, "§6Title with color!", "Subtitle", Fade-In, Stay, Fade-Out);

    Tab Header/Footer:

    1. Send the Tab Header/Footer
    Code (Text):
    TabTitle.sendTabTitle(p, "&3&lCoreAPI", "&a is awesome!");

    Note: %player% will be replaced with the players name
    2. Send the Tab Header and Footer with multiple lines!

    Code (Text):
    TabTitle.sendTabTitle(p, "&c&lCoreAPI\n&5&lIs Awesome", "&3Welcome %player%\n&6To my server!");

    Note: "\n" will break the line to a multiple line

    Note²: %player% will be replaced with the players name

    Actionbar:

    1. Send the Actionbar
    Code (Text):
    ActionBar.sendBar(player, "Im a Actionbar for &a%player%");

    //NOTE: %player% will be replaced with the players name

    WorldBorder:

    1. Set the border
    Code (Text):
    WorldBorderAPI.setBorder(world, size, center);

    Player ping:

    1. Get the ping
    Code (Text):
    PlayerPing.getPing(player);
     
    Note: The ping will be shown in matching colors (green, orange, red)

    Skins:

    1. Set the skin
    Code (Text):
    SkinAPI.setSkinPlayer(player, skinname, see_self)
    Note: see_self can be set to true or false;

    Scoreboards:

    1. Set the scoreboard
    Code (Text):
        ScoreboardAPI.FlyScoreboard(player, title, new String[]{"§aL§da§anguage:",
                                            "§eLine1",
                                            "§9Line2" + 30,
                                            "§cLine3" + player.getHealth()
                     
                                    });

    Glow:

    1. Set the glow
    Code (Text):
    GlowAPI.set(player, color, true/false);

    Note: the true/false is for the tablist color
    2. Set the glow in case of ping
    Code (Text):
    GlowAPI.PingGlow(player, true/false);

    Note: the true/false is for the tablist color
    3. Stop glowing:
    Code (Text):
    GlowAPI.stopGlow(player);
    4. Check if player is glowing:
    Code (Text):
    GlowAPI.isGlowing(player);

    Nametags:

    1. Set the nametag
    Code (Text):
    NametagAPI.setNametag(player, name, true/false, true/false);


    First true/false: For tablist change
    Second true/false: For aboveHead change
    2. Set the nametag of OfflinePlayers:
    Code (Text):
    NametagAPI.setNametagOther(player, name, true/false, true/false);


    First true/false: For tablist change
    Second true/false: For aboveHead change
    3. Remove the Nametag from a player
    Code (Text):
    NametagAPI.removeNametag(player);
     


    ____________________________________________________

    Events:
    Called when player receives a achievement:
    Code (Text):
    AchievementReceiveEvent
    Called when player receives a language:
    Code (Text):
    LanguageReceiveEvent
    Called when player receives a skin change:
    Code (Text):
    SkinReceiveEvent
    Called when player receives a nametag:
    Code (Text):
    NametagReceiveEvent
    Called when player receives a glow:
    Code (Text):
    GlowReceiveEvent
    [​IMG]

    Code (Text):
    enable_cmd: true
    enable_scoreboard: false
    enable_animated_scoreboard: true
    enable_tab_ping: false



    Plugins using CoreAPI:
    PlayerAuras

    [​IMG]

    • With the download of the plugin you are permitted to use the plugin on ONE single BungeeCord network / server
    • You are permitted to decompile the plugin for your personal use but NOT MORE
    • Reuploading the plugin under your name or/and for free is FORBIDDEN
    • By download the plugin you are downloading the current features of CoreAPI, if there is a feature you want to see write it in the Discussion section
    • Decompiled versions are not supported by me and you will get no error-fixing help

Recent Reviews

  1. xX_Legit_YT_Xx_
    xX_Legit_YT_Xx_
    5/5,
    Version: 3.0
    Good Plugin! Pls fix the Download link 1000 zeicheeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeen
  2. Rotitys_VN
    Rotitys_VN
    5/5,
    Version: 3.0
    Good Plugin ! Upload MEGA link plz ! I cant download Mediefire link.
    Upload plzzzzzzzzzzzzzzzzzzzzz
  3. ExpDev
    ExpDev
    5/5,
    Version: 3.0
    JavaDoc your methods. Example:

    /**
    * Sends the Hologram to a player
    *
    * @param player Player to send hologram to
    */
    public void sendToPlayer(Player player) {
    // method body
    }

    IntelliJ > Tools > Generate JavaDoc > Select output directory > ok

    Upload this to a webserver and include link, or include the generated output directory in the download. I would say JavaDocs is required for any API out there, and even though this overview page and its spoilers suffice, it's much heavier than it needs to be. IntelliJ would generate a nice looking JavaDoc for you by using the javadoc comments like above.

    Other than that, very nice job on this API!
    1. MaveCrit
      Author's Response
      Hey there, thanks for your review!
      I'm working with eclipse and already tried to setup a Javadocs but I'm lost on how to do it with eclipse
  4. petko
    petko
    5/5,
    Version: 2.5
    Great API.
    The author is very friendly and helps with everything really quickly.
    Fixes bugs in literally a few minutes / hours.
  5. Endervines
    Endervines
    5/5,
    Version: 2.5
  6. timderspieler
    timderspieler
    2/5,
    Version: 2.5
    Error occurred while enabling CoreAPI v1.9 (Is it up to date?)
    java.lang.NullPointerException
    at de.mavecrit.coreAPI.SimpleConfigManager.prepareFile(SimpleConfigManager.java:106) ~[?:?]
    at de.mavecrit.coreAPI.SimpleConfigManager.prepareFile(SimpleConfigManager.java:121) ~[?:?]
    at de.mavecrit.coreAPI.SimpleConfigManager.getNewConfig(SimpleConfigManager.java:38) ~[?:?]
    at de.mavecrit.coreAPI.Main.onEnable(Main.java:143) ~[?:?]
    at org.bukkit.plugin.java.JavaPlugin.setEnabled(JavaPlugin.java:292) ~[spigot.jar:git-Spigot-2038f4a-cd36f6f]
    at org.bukkit.plugin.java.JavaPluginLoader.enablePlugin(JavaPluginLoader.java:340) [spigot.jar:git-Spigot-2038f4a-cd36f6f]
    at org.bukkit.plugin.SimplePluginManager.enablePlugin(SimplePluginManager.java:405) [spigot.jar:git-Spigot-2038f4a-cd36f6f]
    at org.bukkit.craftbukkit.v1_9_R1.CraftServer.loadPlugin(CraftServer.java:361) [spigot.jar:git-Spigot-2038f4a-cd36f6f]
    at org.bukkit.craftbukkit.v1_9_R1.CraftServer.enablePlugins(CraftServer.java:321) [spigot.jar:git-Spigot-2038f4a-cd36f6f]
    at org.bukkit.craftbukkit.v1_9_R1.CraftServer.reload(CraftServer.java:745) [spigot.jar:git-Spigot-2038f4a-cd36f6f]
    at org.bukkit.Bukkit.reload(Bukkit.java:539) [spigot.jar:git-Spigot-2038f4a-cd36f6f]
    at org.bukkit.command.defaults.ReloadCommand.execute(ReloadCommand.java:25) [spigot.jar:git-Spigot-2038f4a-cd36f6f]
    at org.bukkit.command.SimpleCommandMap.dispatch(SimpleCommandMap.java:141) [spigot.jar:git-Spigot-2038f4a-cd36f6f]
    at org.bukkit.craftbukkit.v1_9_R1.CraftServer.dispatchCommand(CraftServer.java:645) [spigot.jar:git-Spigot-2038f4a-cd36f6f]
    at net.minecraft.server.v1_9_R1.PlayerConnection.handleCommand(PlayerConnection.java:1350) [spigot.jar:git-Spigot-2038f4a-cd36f6f]
    at net.minecraft.server.v1_9_R1.PlayerConnection.a(PlayerConnection.java:1185) [spigot.jar:git-Spigot-2038f4a-cd36f6f]
    at net.minecraft.server.v1_9_R1.PacketPlayInChat.a(PacketPlayInChat.java:45) [spigot.jar:git-Spigot-2038f4a-cd36f6f]
    at net.minecraft.server.v1_9_R1.PacketPlayInChat.a(PacketPlayInChat.java:1) [spigot.jar:git-Spigot-2038f4a-cd36f6f]
    at net.minecraft.server.v1_9_R1.PlayerConnectionUtils$1.run(SourceFile:13) [spigot.jar:git-Spigot-2038f4a-cd36f6f]
    at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source) [?:1.8.0_73]
    at java.util.concurrent.FutureTask.run(Unknown Source) [?:1.8.0_73]
    at net.minecraft.server.v1_9_R1.SystemUtils.a(SourceFile:45) [spigot.jar:git-Spigot-2038f4a-cd36f6f]
    at net.minecraft.server.v1_9_R1.MinecraftServer.D(MinecraftServer.java:721) [spigot.jar:git-Spigot-2038f4a-cd36f6f]
    at net.minecraft.server.v1_9_R1.DedicatedServer.D(DedicatedServer.java:400) [spigot.jar:git-Spigot-2038f4a-cd36f6f]
    at net.minecraft.server.v1_9_R1.MinecraftServer.C(MinecraftServer.java:660) [spigot.jar:git-Spigot-2038f4a-cd36f6f]
    at net.minecraft.server.v1_9_R1.MinecraftServer.run(MinecraftServer.java:559) [spigot.jar:git-Spigot-2038f4a-cd36f6f]
    at java.lang.Thread.run(Unknown Source) [?:1.8.0_73]



    Please fix this error.
    1. MaveCrit
      Author's Response
      Please Post it in the discussion section.

      And please read the discussion Section also.
      The error fixing has been posted several times (5-6 Times)

      Just reload the Server 3 Times....:
  7. Pockie_TV
    Pockie_TV
    3/5,
    Version: 2.2
    Hey,
    erstmal ein super Plugin, Daumen hoch.
    nur leider funktioniert bei mit nichts ;C
    hier der Fehler , vielen Danke schonmal

    Caused by: java.lang.NullPointerException
    at de.mavecrit.coreAPI.Language.LanguageAPI.getLanguage(LanguageAPI.java:42) ~[?:?]
    at de.mavecrit.coreAPI.Main.scoreboard(Main.java:242) ~[?:?]
    at de.mavecrit.coreAPI.Main.onJoin(Main.java:358) ~[?:?]
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_31]
    at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_31]
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_31]
    at java.lang.reflect.Method.invoke(Unknown Source) ~[?:1.8.0_31]
  8. Krille
    Krille
    5/5,
    Version: 1.6.1
    Great plugin! Sorry about my last review, I removed it. Your link before was a sell.fy link but you changed it. Anyways, awesome plugin!
  9. Gomze
    Gomze
    5/5,
    Version: 1.4.1
    Just Report KrilleTheCoder as not true.
    You got my Support and i downloaded with the Ad (@All it is just one ad)
    Stay on bruh
    1. MaveCrit
      Author's Response
      Thank you c: ♥
  10. TimeGamerTV
    TimeGamerTV
    4/5,
    Version: 2016-03-20
    Ist die SkinAPI auch schon in der 1.8 Version drinnen weil Eclipse findet die Nicht. Schon mal Danke.
    MFG
    1. MaveCrit
      Author's Response