markhughes / FactionsPlus

FactionsPlus extends on-top of Factions to provide more features.
http://ma.rkhugh.es/factionsplus
GNU Affero General Public License v3.0
15 stars 16 forks source link

Ability for areas not claimed to be automatically regenerated over time? #189

Open StargateMC opened 8 years ago

StargateMC commented 8 years ago

Hi Mark,

It'd be really cool for anywhere in the wilderness to automatically reset back to the default block from the world seed over time...

Just a feature request/suggestion :)

StargateMC commented 8 years ago

@MarkehMe

Can you please review the config ideas I have for the regen?

Reason: This is for Server build worlds, obviously :)

Reason: I ask for this is World generation causes a stargate to build on the spawn block for us, and I am worried your plugin will overwrite it if it isnt claimed with a factoin, because its a forge mod placing the gate in generation there. This would render the world inaccessible until replaced by an admin. There is a high chance this will actually regenerate the gate as its part of world gen, however, so I am not 100% on whether or not this will get triggered by a bukkit plugin.

Reason: This could be for places defined by admin as 'mining areas' when they cant necessarily break blocks in wilderness

Reason: Terrain changes will result in players potentially being disoriented - world spawns are not generally changing much. If you wanted, you could add a 'send to bed' as a third option :D

Not being annoying I hope :(

StargateMC commented 8 years ago

@MarkehMe Hows this one going bud?

markhughes commented 8 years ago

@DraksterAU working on it, will need it to be properly tested soon enough!

StargateMC commented 8 years ago

:D

Sent from my iPhone

On 27 Jan 2016, at 1:22 PM, Mark Hughes notifications@github.com wrote:

@DraksterAU working on it, will need it to be properly tested soon enough!

— Reply to this email directly or view it on GitHub.

StargateMC commented 8 years ago

@MarkehMe Any chance you've been able to crack the regeneration code bud? :P

markhughes commented 8 years ago

It's actually in the latest source, just needs to be tested :)

StargateMC commented 8 years ago

Tried compiling... Not willing to buy factionsuuid to do it lol

Sent from my iPhone

On 4 Feb 2016, at 1:46 PM, Mark Hughes notifications@github.com wrote:

It's actually in the latest source, just needs to be tested :)

— Reply to this email directly or view it on GitHub.

StargateMC commented 8 years ago

@MarkehMe Happy to test for you if you're up for compiling a build :P

markhughes commented 8 years ago

Compiling is a bit of a handful (.. ugh) here it is. I haven't looked at it in a few days - i've been away on a holiday, it should be ok though..

FactionsPlus.jar.zip

StargateMC commented 8 years ago

Hi @MarkehMe Thanks for that! All good.. holidays are needed haha! I'm getting an exception as soon as I enable Regen :/ see below

org.bukkit.event.EventException
        at org.bukkit.plugin.java.JavaPluginLoader$1.execute(JavaPluginLoader.java:338) ~[JavaPluginLoader$1.class:1.7.10-1614.184]
        at org.bukkit.plugin.RegisteredListener.callEvent(RegisteredListener.java:62) ~[RegisteredListener.class:1.7.10-1614.184]
        at org.bukkit.plugin.SimplePluginManager.fireEvent(SimplePluginManager.java:507) [SimplePluginManager.class:1.7.10-1614.184]
        at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.java:492) [SimplePluginManager.class:1.7.10-1614.184]
        at me.markeh.factionsframework.events.listeners.FFListenerFactions2_X.onFactionDisband(FFListenerFactions2_X.java:89) [FactionsPlus.jar:?]
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_71]
        at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_71]
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_71]
        at java.lang.reflect.Method.invoke(Unknown Source) ~[?:1.8.0_71]
        at org.bukkit.plugin.java.JavaPluginLoader$1.execute(JavaPluginLoader.java:334) [JavaPluginLoader$1.class:1.7.10-1614.184]
        at org.bukkit.plugin.RegisteredListener.callEvent(RegisteredListener.java:62) [RegisteredListener.class:1.7.10-1614.184]
        at org.bukkit.plugin.SimplePluginManager.fireEvent(SimplePluginManager.java:507) [SimplePluginManager.class:1.7.10-1614.184]
        at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.java:492) [SimplePluginManager.class:1.7.10-1614.184]
        at com.massivecraft.massivecore.event.EventMassiveCore.run(EventMassiveCore.java:30) [massivecore.jar:?]
        at com.massivecraft.factions.cmd.CmdFactionsDisband.perform(CmdFactionsDisband.java:60) [factions.jar:?]
        at com.massivecraft.massivecore.command.MassiveCommand.execute(MassiveCommand.java:828) [massivecore.jar:?]
        at com.massivecraft.massivecore.command.MassiveCommand.execute(MassiveCommand.java:785) [massivecore.jar:?]
        at com.massivecraft.massivecore.command.MassiveCommand.execute(MassiveCommand.java:869) [massivecore.jar:?]
        at com.massivecraft.massivecore.command.MassiveCoreBukkitCommand.execute(MassiveCoreBukkitCommand.java:61) [massivecore.jar:?]
        at org.bukkit.command.SimpleCommandMap.dispatch(SimpleCommandMap.java:181) [SimpleCommandMap.class:1.7.10-1614.184]
        at org.bukkit.craftbukkit.v1_7_R4.CraftServer.dispatchCommand(CraftServer.java:717) [CraftServer.class:1.7.10-1614.184]
        at net.minecraft.network.NetHandlerPlayServer.func_147361_d(NetHandlerPlayServer.java:1317) [nh.class:?]
        at net.minecraft.network.NetHandlerPlayServer.func_147354_a(NetHandlerPlayServer.java:1099) [nh.class:?]
        at net.minecraft.network.play.client.C01PacketChatMessage.func_148833_a(C01PacketChatMessage.java:38) [ir.class:?]
        at net.minecraft.network.play.client.C01PacketChatMessage.func_148833_a(C01PacketChatMessage.java:53) [ir.class:?]
        at net.minecraft.network.NetworkManager.func_74428_b(NetworkManager.java:245) [ej.class:?]
        at net.minecraft.network.NetworkSystem.func_151269_c(NetworkSystem.java:173) [nc.class:?]
        at net.minecraft.server.MinecraftServer.func_71190_q(MinecraftServer.java:991) [MinecraftServer.class:?]
        at net.minecraft.server.dedicated.DedicatedServer.func_71190_q(DedicatedServer.java:431) [lt.class:?]
        at net.minecraft.server.MinecraftServer.func_71217_p(MinecraftServer.java:809) [MinecraftServer.class:?]
        at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:669) [MinecraftServer.class:?]
        at java.lang.Thread.run(Unknown Source) [?:1.8.0_71]
Caused by: java.lang.NullPointerException
        at me.markeh.factionsplus.listeners.CoreListener.onDisbandRemoveFromScoreboard(CoreListener.java:79) ~[?:?]
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_71]
        at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_71]
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_71]
        at java.lang.reflect.Method.invoke(Unknown Source) ~[?:1.8.0_71]
        at org.bukkit.plugin.java.JavaPluginLoader$1.execute(JavaPluginLoader.java:334) ~[JavaPluginLoader$1.class:1.7.10-1614.184]
        ... 31 more
markhughes commented 8 years ago

This has to do with one of the scoreboard events on disband. Shouldn't even be running it yet.

I've just started making a huge change so I can't compile it right now either - yikes, try disabling scoreboard features.. not sure if it will help though

StargateMC commented 8 years ago

The events also don't kick in at all... I travelled 500 blocks in one direction and came back and the chunk hadn't done anything.... I set the ms to 50.. Haha

Sent from my iPhone

On 9 Feb 2016, at 11:13 PM, Mark Hughes notifications@github.com wrote:

This has to do with one of the scoreboard events on disband. Shouldn't even be running it yet, let me turn it off

— Reply to this email directly or view it on GitHub.

StargateMC commented 8 years ago

@MarkehMe Is it possible KCauldron isn't registering your regeneration events?

markhughes commented 8 years ago

50ms.. jeeze. Try setting it to 5000ms :)

StargateMC commented 8 years ago

haha... Okay :P

@markehme Is this anything to worry about? Happens on start with Regen enabled.... 5000ms doesn't help either :(

java.lang.NullPointerException at me.markeh.factionsplus.FactionsPlus$1.run(FactionsPlus.java:163) ~[?:?] at org.bukkit.craftbukkit.v1_7_R4.scheduler.CraftTask.run(CraftTask.java:71) ~[CraftTask.class:1.7.10-1614.184] at org.bukkit.craftbukkit.v1_7_R4.scheduler.CraftScheduler.mainThreadHeartbeat(CraftScheduler.java:346) [CraftScheduler.class:1.7.10-1614.184] at net.minecraft.server.MinecraftServer.func_71190_q(MinecraftServer.java:873) [MinecraftServer.class:?] at net.minecraft.server.dedicated.DedicatedServer.func_71190_q(DedicatedServer.java:431) [lt.class:?] at net.minecraft.server.MinecraftServer.func_71217_p(MinecraftServer.java:809) [MinecraftServer.class:?] at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:669) [MinecraftServer.class:?] at java.lang.Thread.run(Unknown Source) [?:1.8.0_71]

markhughes commented 8 years ago

Yep :( i'll look into this more later. We're close though!

StargateMC commented 8 years ago

@MarkehMe no worries man! Happy to help in anyway I can.. lol!

StargateMC commented 8 years ago

@markehme I know your busy with the Cauldron stuff at the moment, but is there any chance you have an ETA for this guy ? : P

StargateMC commented 8 years ago

@markehme whoops I closed it my bad

StargateMC commented 8 years ago

@markehme I'd be tempted to make this into its own plugin hey. You could easily make $5-10 a hit imo... As a premium resource.

markhughes commented 8 years ago

No problem. It should be working in-source now though, I need to do further testing

StargateMC commented 8 years ago

@markehme compile a copy and I'll happily help ;)

StargateMC commented 8 years ago

@MarkehMe This any closer to completion bro? The Code is not working in source, the task /scheduled job you run for wilderness throws NPEs and never executes.

StargateMC commented 8 years ago

Any luck man? I really wish I knew Bukkit haha Just spent the last 3 months learning Java and basic forge

markhughes commented 8 years ago

I've been sick all week unfortunately and haven't gotten around to my side projects much

StargateMC commented 8 years ago

No worries bud. GWS!

StargateMC commented 8 years ago

@MarkehMe Hey Man, hope you're well. Has there been an update on this one?

markhughes commented 8 years ago

I've been changing a lot inside FactionsFramework to make this a bit easier to work with, I'll let you know. :smile:

StargateMC commented 8 years ago

Hi @MarkehMe

I decided to learn bukkit.... https://www.spigotmc.org/resources/regenerator.21470/ Thought it is better to stop hounding you :P

markhughes commented 8 years ago

@DraksterAU awesome :) I'm actually abandoning the FactionsPlus project for FactionsFramework and creating all the features into modules instead. That info will come in the future though :smile:

StargateMC commented 8 years ago

Awesome to hear man, modular stuff is better... plus some of those modules can be premium paid stuff! Earn some coin for your work!