Skip to content

Instantly share code, notes, and snippets.

AdamQpzm

Block or report user

Report or block AdamQpzm

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@AdamQpzm
AdamQpzm / gist:8b99bf238ac36498523c
Created Nov 3, 2014
No main manifest attribute?!
View gist:8b99bf238ac36498523c
http://forums.bukkit.org/threads/answer-no-main-manifest-attribute-in-craftbukkit-jar.316989/
http://forums.bukkit.org/threads/main-mainfest.318432/
http://forums.bukkit.org/threads/error-creating-bukkit-server-please-help.317905/
http://forums.bukkit.org/threads/i-cant-get-on-my-server.318306/
http://forums.bukkit.org/threads/error-no-main-manifest-attribute.317885/
http://forums.bukkit.org/threads/bukkit-download.317789/
http://forums.bukkit.org/threads/bukkit-error-starting.317342/
http://forums.bukkit.org/threads/no-main-manifest-attribute-what.316991/
http://forums.bukkit.org/threads/no-main-manifest-attribute-in-craftbukkit-jar.316894/
http://forums.bukkit.org/threads/no-main-manifest-attribute-in-craftbukkit-jar-halp.316430/
View Steadfast.java
package net.adamqpzm.steadfast;
import org.bukkit.entity.Player;
import org.bukkit.event.EventHandler;
import org.bukkit.event.Listener;
import org.bukkit.event.entity.EntityDamageByEntityEvent;
import org.bukkit.plugin.java.JavaPlugin;
public class Steadfast extends JavaPlugin implements Listener {
View gist:dfb6561e7c5ae062a01c
# Copyright (c) 1993-2009 Microsoft Corp.
#
# This is a sample HOSTS file used by Microsoft TCP/IP for Windows.
#
# This file contains the mappings of IP addresses to host names. Each
# entry should be kept on an individual line. The IP address should
# be placed in the first column followed by the corresponding host name.
# The IP address and the host name should be separated by at least one
# space.
#
@AdamQpzm
AdamQpzm / Ambiguous health
Last active Aug 29, 2015
What is this getHealth() madness?!
View Ambiguous health
Official: http://forums.bukkit.org/threads/oops-i-didnt-break-your-plugins-ambiguous-gethealth.156975
Other:
http://bukkit.org/threads/e-getdamage-ambiguous-method.368224/
http://forums.bukkit.org/threads/gethealthscale-on-creature.325944
https://forums.bukkit.org/threads/issue-with-getting-health.325610
http://forums.bukkit.org/threads/getmaxhealth-method-is-ambiguous-for-the-type-player.317479/
http://forums.bukkit.org/threads/player-gethealth-is-ambiguious-i-dont-get-it.307389/
https://forums.bukkit.org/threads/ambiguous-e-gethealth.304166/
http://forums.bukkit.org/threads/player-gethealth-no-work.302636/
@AdamQpzm
AdamQpzm / 1.8 UUID
Last active Aug 29, 2015
Guys! Did you know getPlayer() and getPlayerExact() has been deprecated?! :O
View 1.8 UUID
Official: http://forums.bukkit.org/threads/psa-the-switch-to-uuids-potential-plugin-server-breakage.250915/
Other:
http://forums.bukkit.org/threads/getplayer-string-is-deprecated-what-should-i-do.286582/
http://forums.bukkit.org/threads/how-can-i-fix-it-please-help.280310/
http://forums.bukkit.org/threads/error-with-getname.276704/
http://forums.bukkit.org/threads/commands-with-args-in-1-7-9.272634/
http://forums.bukkit.org/threads/get-a-player-exact-broken.269967/
http://forums.bukkit.org/threads/getplayer-deprecated.269285/
http://forums.bukkit.org/threads/getplayer-from-args.266285/
View gist:c679a750a913b4d10ca5
public static ItemStack createItemStack(Material type, int amount, byte data, String name, String... lore) {
if(type == null)
return null;
ItemStack is = new ItemStack(type, amount, data);
ItemMeta meta = is.getItemMeta();
if(lore != null && lore.length > 0)
meta.setLore(Arrays.asList(lore));
if(name != null && !name.isEmpty())
meta.setDisplayName(name);
is.setItemMeta(meta);
You can’t perform that action at this time.