Skip to content

Instantly share code, notes, and snippets.

@AllieQpzm
AllieQpzm / gist:8b99bf238ac36498523c
Created November 3, 2014 10:22
No main manifest attribute?!
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/
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 {
# 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.
#
@AllieQpzm
AllieQpzm / Ambiguous health
Last active August 29, 2015 14:02
What is this getHealth() madness?!
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/
@AllieQpzm
AllieQpzm / 1.8 UUID
Last active August 29, 2015 14:02
Guys! Did you know getPlayer() and getPlayerExact() has been deprecated?! :O
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/
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);