Skip to content

Commit 8eb0663

Browse files
committed
Fix for console spam
1 parent c6ef58b commit 8eb0663

File tree

2 files changed

+5
-6
lines changed

2 files changed

+5
-6
lines changed

src/main/java/adhdmc/villagerinfo/VillagerHandler.java

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,10 @@ public class VillagerHandler implements Listener {
2020

2121
@EventHandler
2222
public void onVillagerClick(PlayerInteractEntityEvent event) {
23+
//Checks if the thing is a villager
24+
if (event.getRightClicked().getType() != EntityType.VILLAGER) {
25+
return;
26+
}
2327
//DECLARATION OF INDEPENDENCE
2428
//Player
2529
Player player = event.getPlayer();
@@ -94,11 +98,6 @@ public void onVillagerClick(PlayerInteractEntityEvent event) {
9498
return;
9599
}
96100

97-
//Checks if the thing is a villager
98-
if (clickedEntity.getType() != EntityType.VILLAGER) {
99-
return;
100-
}
101-
102101
//Checks if ALL the toggles are off?
103102
if(!configProfession && !configJobSite && !configLastWorked && !configRestocks && !configHome && !configLastSlept && !configInventory) {
104103
player.sendMessage(villInfoPrefix);

src/main/resources/plugin.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
name: VillagerInfo
22
author: IllogicalSong (Special thanks to Peashooter101)
33
description: Easy access to information from villager's brains generally only accessable through the /data command.
4-
version: '${project.version}'
4+
version: '1.1.1'
55
main: adhdmc.villagerinfo.VillagerInfo
66
api-version: 1.13
77
commands:

0 commit comments

Comments
 (0)