Giter VIP home page Giter VIP logo

clickvillagers's People

Contributors

clickism avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar

Forkers

sentryoz qartho

clickvillagers's Issues

[0.1] Expected Villager not retrieved if Chunk 0,0 in overworld is not loaded (new villager created instead)

Picked up villagers are stored at a hard-coded location in the Overworld (1,-70,1). If this location is not currently loaded when a villager head is placed then the stored villager will not be retrieved and a new one is spawned in and placed instead.

This can happen if the server's spawn is far enough away from chunk 0,0.

This means that you lose the villager with the profession and trades you were expecting.

@Nullable
public static Villager getVillagerFromHead(ItemStack head) {
ItemMeta meta = head.getItemMeta();
PersistentDataContainer dataContainer = meta.getPersistentDataContainer();
if (dataContainer.has(new NamespacedKey(plugin, "villager_uuid"), PersistentDataType.STRING)) {
UUID uuid = UUID.fromString(dataContainer.get(new NamespacedKey(plugin, "villager_uuid"), PersistentDataType.STRING));
if (Bukkit.getEntity(uuid) != null) {
return (Villager) Bukkit.getEntity(uuid);
}
return (Villager) Bukkit.getWorlds().get(0).spawnEntity(new Location(Bukkit.getWorlds().get(0), 1, -70, 1), EntityType.VILLAGER);
}
return null;
}

Bukkit.getEntity(uuid) appears to only get an entity if it is loaded, otherwise it returns null.

Possible ways to fix:

  • Ensure the chunk is loaded when you try to get the villager
  • Use a method to get the Villager that doesn't rely on the chunk being loaded
  • Store villagers inside the chunk where the spawn is located
  • Store villagers at a location that is set in a config file

Current workaround is to force load the chunk: /forceload add 0 0

Dupe Hoppers!

Players on server is duping hoppers in 0.4.1.

Placing villager hopper and braking them spits out 2 hoppers.

Villager data gone

i put this plugin in my friend server and first off it was normal but then when i try to put my villager back on to the overworld theres a message saying their data its gone so is there a fix?

Villager hopper incompatibility with hoppersorter

the Villager Hopper creates an incompatibility with the HopperSorter plugin.
If you deactivate the Villager hopper, you can no longer place a HopperSorter and if you activate this function, place a HopperSorter and remove it again, the Armorstand with the emerald edge of the Villagerhopper remains.

It would be cool if the function can be completely disabled directly, so that the Villagerhopper does not interfere with the functions of the HopperSorter.

Link: HopperSorter
https://www.spigotmc.org/resources/hoppersorter-1-8-1-20-1-upgradable-item-filter-transfer-item-smelt-multiple-block-linking.80528/

Request: Permission

It would be great if a permission is added that you can not steal the Villager from other players.
Maybe as Bentobox, Plotsquared and RedProtect flag.

Greetings

Bug

Getting this in console:

[02:54:38 ERROR]: Could not pass event InventoryClickEvent to ClickVillagers v0.4.1
java.lang.NullPointerException: Cannot invoke "org.bukkit.entity.LivingEntity.getPersistentDataContainer()" because "entity" is null
at me.clickism.clickvillagers.managers.VillagerData.getOwner(VillagerData.java:34) ~[ClickVillagers-0.4.1.jar:?]
at me.clickism.clickvillagers.menu.EditVillagerMenu.getTitle(EditVillagerMenu.java:24) ~[ClickVillagers-0.4.1.jar:?]
at me.clickism.clickvillagers.events.ClickEvent.onClick(ClickEvent.java:60) ~[ClickVillagers-0.4.1.jar:?]
at com.destroystokyo.paper.event.executor.asm.generated.GeneratedEventExecutor473.execute(Unknown Source) ~[?:?]
at org.bukkit.plugin.EventExecutor$2.execute(EventExecutor.java:77) ~[paper-api-1.20.1-R0.1-SNAPSHOT.jar:?]
at co.aikar.timings.TimedEventExecutor.execute(TimedEventExecutor.java:81) ~[paper-api-1.20.1-R0.1-SNAPSHOT.jar:git-Paper-194]
at org.bukkit.plugin.RegisteredListener.callEvent(RegisteredListener.java:70) ~[paper-api-1.20.1-R0.1-SNAPSHOT.jar:?]
at io.papermc.paper.plugin.manager.PaperEventManager.callEvent(PaperEventManager.java:54) ~[paper-1.20.1.jar:git-Paper-194]
at io.papermc.paper.plugin.manager.PaperPluginManagerImpl.callEvent(PaperPluginManagerImpl.java:126) ~[paper-1.20.1.jar:git-Paper-194]
at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.java:615) ~[paper-api-1.20.1-R0.1-SNAPSHOT.jar:?]
at net.minecraft.server.network.ServerGamePacketListenerImpl.handleContainerClick(ServerGamePacketListenerImpl.java:3237) ~[?:?]
at net.minecraft.network.protocol.game.ServerboundContainerClickPacket.handle(ServerboundContainerClickPacket.java:58) ~[?:?]
at net.minecraft.network.protocol.game.ServerboundContainerClickPacket.handle(ServerboundContainerClickPacket.java:23) ~[?:?]
at net.minecraft.network.protocol.PacketUtils.lambda$ensureRunningOnSameThread$0(PacketUtils.java:51) ~[?:?]
at net.minecraft.server.TickTask.run(TickTask.java:18) ~[paper-1.20.1.jar:git-Paper-194]
at net.minecraft.util.thread.BlockableEventLoop.doRunTask(BlockableEventLoop.java:153) ~[?:?]
at net.minecraft.util.thread.ReentrantBlockableEventLoop.doRunTask(ReentrantBlockableEventLoop.java:24) ~[?:?]
at net.minecraft.server.MinecraftServer.doRunTask(MinecraftServer.java:1338) ~[paper-1.20.1.jar:git-Paper-194]
at net.minecraft.server.MinecraftServer.d(MinecraftServer.java:197) ~[paper-1.20.1.jar:git-Paper-194]
at net.minecraft.util.thread.BlockableEventLoop.pollTask(BlockableEventLoop.java:126) ~[?:?]
at net.minecraft.server.MinecraftServer.pollTaskInternal(MinecraftServer.java:1315) ~[paper-1.20.1.jar:git-Paper-194]
at net.minecraft.server.MinecraftServer.pollTask(MinecraftServer.java:1308) ~[paper-1.20.1.jar:git-Paper-194]
at net.minecraft.util.thread.BlockableEventLoop.managedBlock(BlockableEventLoop.java:136) ~[?:?]
at net.minecraft.server.MinecraftServer.waitUntilNextTick(MinecraftServer.java:1286) ~[paper-1.20.1.jar:git-Paper-194]
at net.minecraft.server.MinecraftServer.runServer(MinecraftServer.java:1174) ~[paper-1.20.1.jar:git-Paper-194]
at net.minecraft.server.MinecraftServer.lambda$spin$0(MinecraftServer.java:317) ~[paper-1.20.1.jar:git-Paper-194]
at java.lang.Thread.run(Unknown Source) ~[?:?]

Issue with Villager Hoppers

Discovered this plugin yesterday and been playing around with it for a bit.
I found an issue where if you break a Villager Hopper that contains villagers, the villagers are gone/voided.

Request : Lands integration

I need land integration, or at least worldguard, for my server. Anyone can take villagers anywhere in any claim... no need to explain the problem ^^.

Is integration with the Lands faction plugin possible?

[Request] Stop using inventory titles

In your code, you're using inventory titles to check if the villager is a clickvillager. This should be avoided as it can easily be exploitable, (players can easily rename inventories and trick your plugin into thinking it was a click villager)

You should look into inventory holders, and then check if the inventory is an instanceof your custom inventory holder

GriefPreventions

I'm not sure if you're able to fix this but when I have a villager in my inventory and I place the villager in someone else's claim, it spawns the mob and also puts the villager back into my inventory essentially duping the villager.

Request: WorldGuard Integration

Is it possible to add a WorldGuard flag to disable and enable people to kidnap the villagers, players are able to steal villager NPCs from hubs and stuff due to this

[Suggestion]/[Feature Request]

For the past two days, I've been experimenting with the plugin. One idea I'd like to explore is incorporating zombie villagers into it, or enabling the ability to place a villager in a minecart using shift right-click. So that they won't run away while getting their brains eaten.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.