Home›Java›Mods›CookieClicker [API, Custom Events, MySQL, Holograms]
CookieClicker [API, Custom Events, MySQL, Holograms]
ModsJava

CookieClicker [API, Custom Events, MySQL, Holograms]

Java mod listed for Minecraft 1.8–1.13. Downloads from the MC Java Mods app on Android.

⬇ Download on Spigot
CookieClicker.jpg COOKIECLICKER [Contains API and Custom Events]
Source Code: https://github.com/michitillmanns/CookieClicker

[​IMG]

Plugin Usage:

Description:
CookieClicker is a plugin to create Cookie Blocks on your Minecraft Server with an included API.

Commands:

Permissions:
Config:

API Usage:


Get the CookieManager:
Code (Text):
CookieManager cookieManager = CookieClicker.getCookieManager();
Creating/Removing a Cookie:
Code (Text):
// Add a Cookie
cookieManager.addCookie(Location arg0);

// Remove a Cookie
cookieManager.removeCookie(Cookie arg0);


Getting a Cookie from Location:
Code (Text):
Cookie cookie = cookieManager.getCookieFromLocation(Location arg0);
Checking if a Cookie is placed on a Location:
Code (Text):
boolean existsCookie = cookieManager.getCookieFromLocation(Location arg0) != null;
Adding/Getting a Players Click Count:
Code (Text):
// Add one Click to a Players count
cookieManager.addClick(Player arg0);

// Get the amount of clicks of a Player
int clicks = cookieManager.getClicks(Player arg0);

Custom EVENT Usage:


BEFORE Clicking (Cancelable):
Code (Text):
@EventHandler
public void onCookieClick(CookieClickEvent event) {
    // Get the Player who is clicking the Cookie
    Player player = event.getPlayer();
 
    // Get the Cookie which is being clicked
    Cookie cookie = event.getCookie();

    // Get the Players Click Count BEFORE adding one more
    int clicks = event.getClicks();

    // Cancel the Event
    event.setCancelled(true);
}
AFTER Clicking:
Code (Text):
@EventHandler
public void onCookieClicked(CookieClickedEvent event) {
    // Get the Player who clicked the Cookie
    Player player = event.getPlayer();
 
    // Get the Cookie which was clicked
    Cookie cookie = event.getCookie();

    // Get the Players Click Count AFTER adding one more
    int clicks = event.getClicks();
}

Videos:

Feel free to create a Tutorial ;)

Commands

Plugin details

Read from the plugin's own plugin.yml.

Quick facts

Install steps are the general flow for this file type — How to install Minecraft Java mods & modpacks walks through it step by step.

CookieClicker [API, Custom Events, MySQL, Holograms] is a free Minecraft Java mod. Compatible with Minecraft 1.8, 1.9, 1.10, 1.11 and newer. Downloaded 422 times (via Spigot). Download it and open it directly in the game.

Explore more