Skip to content

Instantly share code, notes, and snippets.

View MrPowerGamerBR's full-sized avatar
:shipit:
We facepalm, we shrug and we hack around it and never look back.

MrPowerGamerBR MrPowerGamerBR

:shipit:
We facepalm, we shrug and we hack around it and never look back.
View GitHub Profile
@MrPowerGamerBR
MrPowerGamerBR / data.json
Created June 25, 2017 23:08
AminoREAPI - Community Info
{
"currentUserInfo":{
"notificationsCount":1,
"unreadChatThreadsCount":0,
"userProfile":{
"status":0,
"itemsCount":0,
"consecutiveCheckInDays":null,
"uid":"cd481edf-231f-42f2-bf2b-256fde90ef54",
"modifiedTime":"2017-06-25T22:57:51Z",
@MrPowerGamerBR
MrPowerGamerBR / amino.json
Created June 25, 2017 22:50
AminoREAPI - Suggested Aminos
{
"api:statuscode":0,
"api:duration":"0.004s",
"api:message":"OK",
"communityList":[
{
"status":0,
"endpoint":"star-vs-as-forcas-do-mal-pt-br",
"name":"Star Vs As For\u00e7as Do Mal PT/BR",
"modifiedTime":"2016-11-01T01:04:54Z",
@MrPowerGamerBR
MrPowerGamerBR / online.js
Created June 17, 2017 13:53
Comando customizado para a https://loritta.website/
var json = pegarConteúdoDeUmaURL("https://mcapi.ca/query/jogar.sparklypower.net/players"); // Pegar o texto em JSON
var obj = JSON.parse(json);
var online = obj.players.online;
var max = obj.players.max;
contexto.responder("**" + online + "**/**" + max + " ** players online no SparklyPower! 🎉");
TempoParaEsperar: 15 # Em segundos, deixe em 0 para desativar
TempoParaExpirar: 120 # Em segundos, deixe em 0 para desativar
TeletransporteSeguro: true
Mensagens:
EspereSegundos: "&cVocê precisa esperar {segundos} segundos antes de poder enviar outro pedido!"
NaoExisteOuOffline: "&c{player} está offline!"
MesmoPlayer: "&cVocê não pode enviar um pedido para si mesmo!"
JaEnviou: "&cVocê já enviou um pedido de teletransporte para {pedido}"
EnviadoComSucesso: "&aPedido enviado com sucesso!"
Aceitar: "&a&lCLIQUE AQUI"
@MrPowerGamerBR
MrPowerGamerBR / ImageUtils.java
Created April 2, 2017 16:34
Write text in images (and wrap it if needed)
package com.mrpowergamerbr.loritta.utils;
import java.awt.FontMetrics;
import java.awt.Graphics;
public class ImageUtils {
/**
* Escreve um texto em um Graphics, fazendo wrap caso necessário
* @param text Texto
* @param startX X inicial
1. First, you spawn an armor stand
2. Then you spawn an shulker
3. Make the shulker ride the armor stand
4. Spawn another armor stand in the same location as the previous armor stand
5. Spawn a falling block
6. Make the falling block ride the previous armor stand
7. Success!
TL;DR: Armor Stands
@MrPowerGamerBR
MrPowerGamerBR / SunnyMercadoPago.java
Last active December 18, 2016 17:20
My own MercadoPago API implementation for Java, because the official one was using very old dependencies.
package com.mrpowergamerbr.sparklysunnyfunny.utils;
import java.io.UnsupportedEncodingException;
import java.net.URLEncoder;
import java.time.ZonedDateTime;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.Map;
import org.apache.commons.lang3.StringUtils;
@MrPowerGamerBR
MrPowerGamerBR / MercadoUtils.java
Created December 17, 2016 13:55
Small Gson wrapper (?) for MercadoPago's Java SDK. Only with payment wrapper atm.
package com.mrpowergamerbr.sparklysunnyfunny.utils;
import java.util.ArrayList;
import org.codehaus.jettison.json.JSONObject;
import com.google.gson.Gson;
import com.mercadopago.MP;
public class MercadoUtils {
{
"_id":ObjectId("58265119e4b0b2f5072ea68b"),
"owner":"xxryancallexx",
"fancyName":"§4§n§lxX§f§n§lRyanCalle§4§n§lXx§r",
"voters":[
"GameOver_HD",
"BigSmoke69",
"blokcedu",
"DaniellaMC",
"Loh209",
package com.mrpowergamerbr.sparklycore.utils.hologram;
import java.lang.ref.WeakReference;
import java.lang.reflect.Field;
import java.util.Arrays;
import java.util.List;
import org.bukkit.Bukkit;
import org.bukkit.Location;
import org.bukkit.entity.Entity;