HeadDatabase-API icon indicating copy to clipboard operation
HeadDatabase-API copied to clipboard

setBlockSkin method always returns false

Open Cat956 opened this issue 3 years ago • 1 comments

Bug Report Template:

Required Information section:

ALL FIELDS IN THIS SECTION ARE REQUIRED, and must contain appropriate information

HeadDatabase version:

4.12.6

Server build info:

This server is running Paper version git-Paper-778 (MC: 1.16.5) (Implementing API version 1.16.5-R0.1-SNAPSHOT)
You are 10 version(s) behind
Previous version: git-Paper-771 (MC: 1.16.5)

Description of the problem:

The setBlockSkin() method always returns false despite the block containing a playerhead and the ID being accurate.

How to replicate:

Placed a regular player_head on the ground. Tried to convert to a particular hdb head using an ID, but failed.

Additional Information:

The information here is optional for you to provide, however it may help us to more readily diagnose any compatibility and bug issues.

Other plugins being used on the server:

Relevant console output, log lines, and/or screenshots:

@EventHandler
    public void PlayerRightClickBlock(PlayerInteractEvent e) {
    	if(e.getHand() == EquipmentSlot.HAND) return;
        Player p = e.getPlayer();
        Block b = e.getClickedBlock();
        if (b.getType() == Material.PLAYER_HEAD) {
			HeadDatabaseAPI hdbApi = new HeadDatabaseAPI();
			Bukkit.getLogger().info(Boolean.toString(hdbApi.isHead("29431")));
			Bukkit.getLogger().info(Boolean.toString(hdbApi.setBlockSkin(b, "29431")));
			return;
		}
}

prints true false

(using api version 1.2 maven dependency)

Additional relevant comments/remarks:

Using Shockbyte

AFFIRMATION OF COMPLETION:

  • [X] I included all information required in the sections above
  • [X] I made sure there are no duplicates of this report (Use Search)
  • [X] I made sure I am using an up-to-date version of HeadDatabase & HeadDatabaseAPI
  • [X] I made sure the bug/error is not caused by any other plugin

Cat956 avatar Aug 30 '21 06:08 Cat956