Giter Club home page Giter Club logo

fabulouscore's Introduction

FabulousCore

FabulousCore

The FabulousCore gives to you create a SignGUI, WorldBorder, cooldowns, minigame, interactable objects, chain based item creating and send sound & colored/timed message(s) to player(s) with easy way.

Discord Patreon
Latest quality Last Updated
Stars Maintained

How to use (Bukkit)

<repositories>
  <repository>
    <id>jitpack</id>
    <url>https://jitpack.io/</url>
  </repository>
</repositories>
<dependencies>
	<dependency>
	    <groupId>com.github.FabulousProject.FabulousCore</groupId>
	    <artifactId>bukkit</artifactId> 
	    <version>${version}</version>
	</dependency>
</dependencies>

<builds>
  <plugins>
    <plugin>
      <groupId>org.apache.maven.plugins</groupId>
      <artifactId>maven-shade-plugin</artifactId>
      <version>3.3.1-SNAPSHOT</version>
      <executions>
        <execution>
          <phase>package</phase>
          <goals>
            <goal>shade</goal>
          </goals>
          <configuration>
            <minimizeJar>true</minimizeJar>
            <createDependencyReducedPom>false</createDependencyReducedPom>
            <!-- Relocations(Optional)
            <relocations>
              <relocation>
                <pattern>me.alpho320.fabulous.core</pattern>
                <shadedPattern>[YOUR_PLUGIN_PACKAGE].shade</shadedPattern>
              </relocation>
            </relocations>
            -->
          </configuration>
        </execution>
      </executions>
    </plugin>
  </plugins>
</builds>

Gradle

plugins {
  id "com.github.johnrengelman.shadow" version "7.0.0"
}
repositories {
  maven {
    url "https://jitpack.io"
  }
}
dependencies {
  implementation("com.github.FabulousProject.FabulousCore:${version}")
}

Getting Started

Registering the library

final class MyPlugin extends JavaPlugin {

  private BukkitCore core;

  @Override
  public void onEnable() {
    this.core = new BukkitCore(this);
    this.core.init(); //then you can access with BukkitCore.instance().foo();
    
    new SomeClassesThatNeedBukkitCore(this.core).foo();
    new SomeOtherClasses(this.core).foo();
  }
}

Creating a SignGUI

SignGUI sign = BukkitCore.instance().sign()
	.create() // creates a new instance.
	.setType(SignGUI.SignType.OAK) // Types: OAK, ACACIA, BIRCH, SPRUCE, CRIMSON, DARK_OAK, JUNGLE.
	.withLines("Hi!", "how are u?", "must be four", "lines!")
	.whenOpen(strings -> {			
		player.sendMessage("opened!");
	    }
	)
	.whenClose(strings -> {
		player.sendMessage("closed!");
	    }
	)
	.open(player);

Creating a ItemStack

ItemStack item = new BukkitItemCreator()
        .type(Material.IRON_SWORD)
        .name(BukkitCore.instance().message().colored("&6&lAMAZING SWORD!"))
        .amount(3)
        .damage(1)
        .lore(
                "awsome lore",
                "really!"
        )
        .enchant(Enchantment.DAMAGE_ALL, 10)
        .modelData(20)
        .flag(ItemFlag.HIDE_ATTRIBUTES)
        .glow()
        .create();   

Sending a Sound

BukkitCore.instance().sound().send(
        player,
        Sound.ENTITY_PLAYER_LEVELUP
);  

Serialize a Location

BukkitCore.instance().location().serialize(
        player.getLocation()
); 

Deserialize a Location

BukkitCore.instance().location().deserialize(
        mySerializedString
); 

Getting a Random Element From List

T randomElement = new RandomSelect<>(myList).choose();

Player target = new RandomSelect<>(playerList).choose();

NOTICE: If you have any questions, suggestions or issues with the core, please contact me on GitHub Issues section or Alpho320#9202 (Discord)

fabulouscore's People

Contributors

alpho320 avatar

Stargazers

Oğuz Can Yılmazlar avatar Emirhan Erdem avatar İbrahim B. Demirok avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.