Skip to content

Latest commit

 

History

History
210 lines (148 loc) · 3.72 KB

README.md

File metadata and controls

210 lines (148 loc) · 3.72 KB

Stuff (Minecraft Plugin)

Plugin adding general minecraft features.

Language:

Default: German Config to edit the Language available.

Features:

Optionally you can enable to only use the API Everything can be enabled/disabled in config 01.Debug command (Disabled by default)

  • Some information about blocks and Items
  • give event and recive all listener for that event
  1. Calculator
  2. Broadcast
  3. Command executing Commands
  4. Fly
  5. Gamemodecommand
  6. InfoComamnds
  7. MSG
  8. Ping
  9. Playtime
  10. Portableinventories
  11. Speed
  12. Chat channel
  13. Use Minimagge(<green>TEXt</green>) or Lagasy(&7Text) chat formatter (editable in Config, defautl: Minimessage)
  14. First Join Text and Title
  15. TAB Prefix/Suffix (Luckperms)
  16. TAB Sorting (Luckperms Weight)
  17. Sudo command

API

  1. Chatinput capture
  2. ItemStack creator
    1. Name
    2. Lore
    3. Glint
    4. When(Left/Right/Both)Clicked action
    5. WhenPlaced action
    6. WhenBroken action
  3. GUI created out of List<ItemStack> (Pagenation)

ITemStack creator usage

Stuff API: ClickEvent

public class ClassName implements InventoryHolder{

	private static final ClickEvent event = ClassName::eventI;
	private static final LeftClickEvent event = ClassName::eventI;
	private static final ClickEvent event = ClassName::eventI;

	Inventory inventory;

	public ClassName() {

		this.inventory = Bukkit.createInventory(this, (row * 9), Component.Text();
		// row = anzahl der reihen des Inventars (1-6)

		Stuff.INSTANCE.itemBuilderManager.addClickEvent(changeName, "Plugin:EventName");

		telepadGui.setItem(
			1, // Item index
			new ItemBuilder()
				// Weitere Argumente
				.whenClicked("Plugin:EventName")
				.whenLeftClicked("Plugin:EventName")
				.whenRightClicked("Plugin:EventName")
				.build()
		);

	}

	private static void eventI(InventoryClickEvent e) {
		// event Code
	}

	@Override
	public @NotNull Inventory getInventory() {
		return inventory;
	}

}

Stuff API: PlaceEvent

public class ClassName {

	private static final PlaceEvent event = ClassName::eventI;

	public ClassName() {

		Stuff.INSTANCE.itemBuilderManager.addPlaceEvent(changeName, "Plugin:EventName");

		Itemstack item = new ItemBuilder()
			// Weitere Argumente
			.whenPlaced("Plugin:EventName")
			.build();

	private static void eventI(BlockPlaceEvent e) {
		// event Code
	}

}

Stuff API: BreakEvent

public class ClassName {

	private static final BreakEvent event = ClassName::eventI;

	public ClassName() {

		Stuff.INSTANCE.itemBuilderManager.addBreakEvent(changeName, "Plugin:EventName");

		Itemstack item = new ItemBuilder()
			// Weitere Argumente
			.whenBroken("Plugin:EventName")
			.build();

	private static void eventI(BlockBreakEvent e) {
		// event Code
	}

}

Stuff API: BrokenWithItem

public class ClassName {

	private static final BlockBreakWithItemEvent event = ClassName::eventI;

	public ClassName() {

		Stuff.INSTANCE.itemBuilderManager.addItemBreakBlockEvent(changeName, "Plugin:EventName");

		Itemstack item = new ItemBuilder()
			// Weitere Argumente
			.whenBrokenWithItem("Plugin:EventName")
			.build();

	private static void eventI(BlockBreakEvent e) {
		// event Code
	}

}

ItemEditor: Arguments

Events can be registered in other classes

Material

** Material has to be setted**

.setMaterial(Material.Item_Material)

or the skull can be setted, this overweites the Material

.setSkull(Player_UUID)

Name

.setName(String)
.setName(Component)

Glint

.setGlint(boolean)

Lore

List<Component> lore = new ArrayList<>();
lore.add(Component);
.setLore(lore)
.addLore(String)
.addLore(Component)