An easy-to-use Spigot library that implements a GUI interface within offhand maps.

Overview

JitPack

MiniMapGUI

An easy-to-use Spigot library that implements a GUI interface within offhand maps.

Maven/Gradle Dependencies

Replace Tag with the latest version. (Latest version is in the Releases tab.)

Gradle

repositories {
  maven { url 'https://jitpack.io' }
}

dependencies {
  implementation 'com.github.byteful:MiniMapGUI:Tag'
}

Maven

<repositories>
  <repository>
    <id>jitpack.io</id>
    <url>https://jitpack.io</url>
  </repository>
</repositories>

<dependency>
  <groupId>com.github.byteful</groupId>
  <artifactId>MiniMapGUI</artifactId>
  <version>Tag</version>
</dependency>

Example Usage

import me.byteful.lib.mmgui.MiniMapGUI;
import me.byteful.lib.mmgui.api.option.impl.ImageOption;
import me.byteful.lib.mmgui.api.stage.impl.SimpleStage;
import org.bukkit.Bukkit;
import org.bukkit.entity.Player;
import org.bukkit.plugin.java.JavaPlugin;

import java.net.MalformedURLException;
import java.net.URL;

public class WarpGUI extends MiniMapGUI {
  private final JavaPlugin plugin;

  public WarpGUI(JavaPlugin plugin, Player player) {
    super(plugin, player);
    this.plugin = plugin;

    wraparoundStages = false;
  }

  @Override
  public void setup() {
    try {
      addStage(
          0,
          SimpleStage.newBuilder()
              .wraparoundOptions(true)
              .addOption(
                  new ImageOption(
                      getPlayer().getWorld(),
                      new URL("someimgurlink.com/image.png"),
                      gui -> {
                        gui.close();
                        gui.getPlayer().teleport(Bukkit.getWorld("world").getSpawnLocation());
                      }))
              .addOption(
                  new ImageOption(
                      getPlayer().getWorld(),
                      new URL("someimgurlink.com/image2.png"),
                      gui -> {
                        gui.close();
                        gui.getPlayer()
                            .teleport(Bukkit.getWorld("world_nether").getSpawnLocation());
                      }))
              .build());
    } catch (MalformedURLException e) {
      e.printStackTrace();
    }
  }

  @Override
  public void onLeftClick() {
    if (getCurrentStage() != null) {
      getCurrentStage().nextOption();
      render();
    }
  }

  @Override
  public void onRightClick() {
    selectCurrentOption();
  }

  //  @Override
  //  public void onDrop() {
  //    if(getCurrentStageIndex() <= 0) {
  //      close();
  //    } else {
  //      previousStage();
  //      render();
  //    }
  //  }
}
You might also like...

This project contains a full example of an application developed using Spring Boot and GraphQL within the Java.

Spring boot GraphQL Example This project contains a full example of an application developed using GraphQL within the Java. The project includes a com

Jul 20, 2022

Auto-Unit-Test-Case-Generator automatically generates high-level code-coverage JUnit test suites for Java, widely used within the ANT Group.

中文README传送门 What is Auto-Unit-Test-Case-Generator Auto-Unit-Test-Case-Generator generates JUnit test suites for Java class just as its name. During te

Dec 22, 2022

Spring-Boot-Plus is a easy-to-use, high-speed, high-efficient,feature-rich, open source spring boot scaffolding

Spring-Boot-Plus is a easy-to-use, high-speed, high-efficient,feature-rich, open source spring boot scaffolding

Everyone can develop projects independently, quickly and efficiently! What is spring-boot-plus? A easy-to-use, high-speed, high-efficient, feature-ric

Dec 31, 2022

GreenMail is an open source, intuitive and easy-to-use test suite of email servers for testing purposes.

GreenMail GreenMail is an open source, intuitive and easy-to-use test suite of email servers for testing purposes. Supports SMTP, POP3, IMAP with SSL

Dec 28, 2022

A simple and easy to use personal medical notes

A simple and easy to use personal medical notes

a-medic-log A simple and easy to use personal medical notes. Easily add your medical notes Multiple profile to keep track elderly and family members m

Oct 9, 2022

A util for operating log. Easy to use.

A util for operating log. Easy to use.

oplog 一个便于使用的操作日志工具。 语言 : [ 英语 | 中文 ] 功能 通过表达式解析生成美观的表达式,支持解析入参、自定义变量、返回值(_ret)、错误信息(_errMsg) 可以通过条件控制是否记录日志 提供自定义函数扩展 提供自定获取上下文用户扩展 支持嵌套、支持多线程使用情景 使用

Oct 19, 2022

Extremely simple and easy to use lucky blocks plugin!

Extremely simple and easy to use lucky blocks plugin!

SimpleLuckyBlocks plugin, the new fully customisable lucky blocks plugin Ever felt the need for a free, yet simple lucky blocks plugin? Well you've fo

Jun 8, 2022

libraw4j - Java interface to the libraw library

libraw4j (1.0.0-SNAPSHOT) This is heavily W.I.P. Help is welcome! Java interface to the libraw library. Used for reading data from raw images. src/mai

Apr 18, 2022

Restler is a library that automatically generates a client for a web service at run time, by analyzing the respective annotated Spring controller interface

Restler Overview Restler is a library that automatically generates a client for a web service at run time, by analyzing the respective annotated Sprin

Oct 24, 2022
Comments
  • Add GIF support and add a text option (renderer).

    Add GIF support and add a text option (renderer).

    Add support to use .gif files. The image will be split into multiple BufferedImages with a tick delay attached to each. A global tick delay will also be available.

    enhancement 
    opened by byteful 1
  • Optimize map rendering and re-use map views.

    Optimize map rendering and re-use map views.

    Map rendering currently is continuously ran. Maybe each MiniMapGUI instance can have its own renderer instead of each option. MapViews are also created and disposed of carelessly. This can clutter up the amount of maps in the server.

    opened by byteful 0
Releases(1.0.0)
Owner
byteful
program is fun
byteful
A distributed lock that supports the use of Redis and Zookeeper, out of the box, fast and easy to use

lock-spring-boot-starter A distributed lock that supports the use of Redis and Zookeeper, out of the box, fast and easy to use 一款基于 Redis 和 Zookeeper

Pear Stack 9 Oct 15, 2022
EssentialClient is a client side mod originally forked from Carpet Client for 1.15.2 that implements new client side features

EssentialClient EssentialClient is a client side only mod originally forked from Carpet Client for 1.15.2 that implements new client side features. Th

null 62 Jan 3, 2023
A simple and lightweight Minecraft GUI API for developers to use.

Current Version: 1.0.0 Requirements: - You must be using PaperMC or a fork of it (This will not work with just Spigot/Bukkit! - Curently this API only

Sammy Aknan 2 May 14, 2022
Share food-Android- - Food donation coded in native android with firebase, google maps api and php server xampp

share_food-Android- Instructions: 1. Create a firebase account and link it with the project via google-services.json. 2. This project also uses a XAMP

Abubakar 3 Dec 28, 2021
📺 Streaming OBS video/Mjpeg into maps on item frames at a high frame rate

MakiScreen Mjpeg ?? Streaming OBS video/Mjpeg into maps on item frames at a high frame rate images taken on TotalFreedom: play.totalfreedom.me How doe

null 4 Apr 8, 2022
First experiments to try to render the Doom WAD maps using only standard libraries. Test 004 - https://youtu.be/-6mePgg7gXE

JavaDoomWADMapRendererTests Test 001 (07/set/2022) - https://youtu.be/MpY0PICdcwM First experiments to try to render the Doom WAD maps using only stan

Leo 6 Oct 17, 2022
Team project within the course of Software System Design and Analysis.

InnoBookCrossing - Application for sharing books at Innopolis Description The application is designed to help people share books with each other. All

Dariya 33 Oct 22, 2022
The ByteSkript development kit, including resources for third-party libraries that are not contained within the standard runtime.

ByteSkript Development Kit Todo. The development kit is a set of advanced resources available for library creators. These are not available within the

null 1 Jan 8, 2022
High level api to interact with maven form within the jvm

maven-utils High level api to interact with maven from within the jvm Use it by adding the dependency to your maven pom: <dependency> <groupId>se.

Alipsa 5 Sep 29, 2022