Skip to content

Instantly share code, notes, and snippets.

View noobmobile's full-sized avatar

Luiz Eduardo noobmobile

  • Fortaleza, Ceará
View GitHub Profile
@noobmobile
noobmobile / ProgressBar.java
Created September 16, 2019 23:38
Barra de progresso em java com padrão builder
package com.dont.trade.utils;
import org.apache.commons.lang3.StringUtils;
/**
* author: don't
**/
public class ProgressBar {
@noobmobile
noobmobile / Scroller.java
Last active May 31, 2021 17:16
Crie inventários com páginas infinitas, utilizando o pattern builder
package com.dont.testes.utils;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collection;
import java.util.HashMap;
import java.util.List;
import java.util.function.BiConsumer;
import java.util.function.Consumer;
@noobmobile
noobmobile / EntityHead.java
Created September 17, 2019 00:13
Enum de cabeça de mob com conversão direta do EntityType do bukkit
import org.bukkit.Material;
import org.bukkit.entity.EntityType;
import org.bukkit.inventory.ItemStack;
/**
* author: don't
* */
public enum EntityHead {
BAT("Morcego", "MHF_Bat"), BLAZE("Blaze", "MHF_Blaze"), CAVE_SPIDER("Aranha da Caverna", "MHF_CaveSpider"),
CHICKEN("Galinha", "MHF_Chicken"), COW("Vaca", "MHF_Cow"), CREEPER("Creeper", "MHF_Creeper"),
@noobmobile
noobmobile / Confirmar.java
Last active February 23, 2020 15:07
Crie um inventário para confirmar a ação de um player, utilizando o pattern builder
import com.dont.empregos.Terminal;
import org.bukkit.Bukkit;
import org.bukkit.Material;
import org.bukkit.entity.Player;
import org.bukkit.event.EventHandler;
import org.bukkit.event.Listener;
import org.bukkit.event.inventory.InventoryClickEvent;
import org.bukkit.inventory.Inventory;
import org.bukkit.inventory.InventoryHolder;
@noobmobile
noobmobile / CommandManager.java
Created October 12, 2019 01:21
Evento CommandManager, sistema de top 10 comandos mais executados
package com.dont.commandmanager;
import java.util.ArrayList;
import java.util.Comparator;
import java.util.HashMap;
import java.util.LinkedHashMap;
import java.util.List;
import java.util.Map;
import java.util.Map.Entry;
@noobmobile
noobmobile / ItemComposer.java
Last active May 31, 2021 17:16
Classe para facilitar a criação de itens, incluindo itens com listeners
package com.dont.modelo.utils;
import java.lang.reflect.Constructor;
import java.lang.reflect.Field;
import java.lang.reflect.InvocationTargetException;
import java.util.Arrays;
import java.util.HashMap;
import java.util.List;
import java.util.UUID;
import java.util.function.Consumer;
@noobmobile
noobmobile / CalcCommand.java
Created October 15, 2019 13:43
Evento matemático, realizar expressões aritméticas por comando. Feito usando engine do javascript e em async
package com.cloudcraft.beta;
import java.util.concurrent.ExecutionException;
import org.bukkit.command.Command;
import org.bukkit.command.CommandExecutor;
import org.bukkit.command.CommandSender;
import org.bukkit.craftbukkit.libs.joptsimple.internal.Strings;
import com.cloudcraft.beta.Calculator.CalculadoraException;
@noobmobile
noobmobile / InventoryHandler.java
Last active July 2, 2020 14:00
Classe para facilitar criação de menus com listeners
package com.dont.modelo.utils;
import com.dont.modelo.Terminal;
import org.bukkit.Bukkit;
import org.bukkit.entity.Player;
import org.bukkit.event.EventHandler;
import org.bukkit.event.Listener;
import org.bukkit.event.inventory.InventoryClickEvent;
import org.bukkit.event.inventory.InventoryType.SlotType;
import org.bukkit.inventory.Inventory;
package com.dont.testes.utils;
import org.bukkit.Bukkit;
import java.lang.reflect.Constructor;
import java.lang.reflect.Field;
import java.lang.reflect.InvocationTargetException;
import java.lang.reflect.Method;
import java.util.HashMap;
@noobmobile
noobmobile / Reflections.java
Created January 7, 2020 17:08
Métodos para alterar a velocidade e a distância que um mob te enxerga.
package com.dont.theend.utils;
import net.minecraft.server.v1_8_R3.EntityZombie;
import org.bukkit.Bukkit;
import org.bukkit.craftbukkit.v1_8_R3.entity.CraftLivingEntity;
import org.bukkit.entity.Entity;
import java.lang.reflect.Field;
import java.lang.reflect.Method;