This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* Copyright (C) 2015-2016 leonardosnt | |
* | |
* This program is free software; you can redistribute it and/or modify | |
* it under the terms of the GNU General Public License as published by | |
* the Free Software Foundation; either version 2 of the License, or | |
* (at your option) any later version. | |
* | |
* This program is distributed in the hope that it will be useful, | |
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <stdlib.h> | |
#include "jni.h" | |
void nativeFoo(); | |
int main(void) { | |
JNIEnv* env; | |
JavaVM* jvm; | |
JavaVMInitArgs vm_args; | |
JavaVMOption* options = new JavaVMOption[1]; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* Copyright (C) 2016 Leonardosc | |
* | |
* This program is free software; you can redistribute it and/or modify | |
* it under the terms of the GNU General Public License as published by | |
* the Free Software Foundation; either version 2 of the License, or | |
* (at your option) any later version. | |
* | |
* This program is distributed in the hope that it will be useful, | |
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
int i = 23; | |
String str = Integer.toString(i); | |
Compilado para | |
ILOAD 1 | |
INVOKESTATIC java/lang/Integer.toString (I)Ljava/lang/String; | |
ASTORE 2 | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File origi = new File("C:\\Users\\Leonardo\\Documents\\Servers\\Eraldia\\plugins\\dtlTraders.jar"); | |
File jarFile = new File("C:\\Users\\Leonardo\\Documents\\Servers\\Eraldia\\plugins\\dtlTraders-patched.jar"); | |
java.nio.file.Files.copy(origi.toPath(), jarFile.toPath(), StandardCopyOption.REPLACE_EXISTING); | |
File patchedDir = new File("C:\\Users\\Leonardo\\Documents\\Servers\\Eraldia\\plugins\\patched"); | |
patchedDir.mkdir(); | |
JarFile jar = new JarFile(jarFile); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
searge,name,side,desc | |
func_100011_g,getIsPotionDurationMax,0, | |
func_100012_b,setPotionDurationMax,0,Toggle the isPotionDurationMax field. | |
func_100015_a,isKeyDown,0,Returns whether the specified key binding is currently being pressed. | |
func_104002_bU,isNoDespawnRequired,2, | |
func_104055_i,setForceGamemode,1, | |
func_104056_am,getForceGamemode,2, | |
func_104112_b,saveExtraData,2,"Save extra data not associated with any Chunk. Not saved during autosave, only during world unload. Currently unimplemented." | |
func_104140_m,saveChunkData,2,saves chunk data - currently only called during execution of the Save All command | |
func_110121_a,isNullOrEmpty,0, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ItemStack dummy = new ItemStack(Material.AIR); | |
Iterable<String> split = Splitter.on(',').trimResults().omitEmptyStrings().split("276:2, 10, §3Sei la, DAMAGE_ALL:5, FIRE_ASPECT:2"); | |
Spliterator<String> it = split.spliterator(); | |
/* Id e data */ | |
it.tryAdvance(raw -> { | |
String[] rawSpl = raw.split(":"); // 0 = id, 1 = data | |
dummy.setTypeId(Integer.parseInt(rawSpl[0])); | |
dummy.getData().setData(Byte.parseByte(rawSpl[1])); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// imports ... | |
import net.minecraft.server.v1_8_R3.PacketPlayOutWorldBorder; | |
import net.minecraft.server.v1_8_R3.WorldBorder; | |
import org.bukkit.craftbukkit.v1_8_R3.entity.CraftPlayer; | |
CraftPlayer cp = (CraftPlayer) p; | |
WorldBorder w = new WorldBorder(); | |
w.setSize(1); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
float f = Methods.from(this).find("xisde").invoke(); | |
//Normal | |
java.lang.reflect.Method md = getClass().getDeclaredMethod("xisde"); | |
md.setAccessible(true); | |
float x = (float) md.invoke(this); | |
int f = Methods | |
.from(this) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
overkill | |
sharpshooter | |
dexterity | |
cardio | |
exercise | |
diving | |
parkour | |
sneakybeaky | |
vitality | |
immunity |