Added /np menu to allow users to access the GUI menu from anywhere. Add npcpolice.gui.command to perms for access. Credit for the request goes to IzzyVale from my discord.
Fixes:
Fixed an issue with the language file not self updating.
Users were unable to pay their own fine's even when they were given the 'npcpolice.fines.payown.always' permission.
The gold bar would show up in the menu, but upon clicking it would tell the user they couldn't pay for various reasons. This has been resolved. Credit for pointing this one out goes to @Enderslayer1938 off my discord channel.
There are load issues with Denizen and this. If you have issues with Denizen and this, contact me for some help. If I add citizens as a depends then Denizen will not detect Citizens.
There are no checks on the last player that arrested a player, so there can be balance issues with this feature if a player gets bounty and has a friend capture them over and over.
Just grant the permission: 'npcpolice.jobs.bountyhunter'
API Events (You can use them to stop NPC Police from processing the damage event)
If you are running Denzien, Depenizen, and Multiverse there was a load order issue that could cause citizens to no longer load in the correct order causing Depenizen to break. This has been resolved.
Git Issue #54 - Auto flagging was spamming users not matter what the cool down was set for. Credit goes to (Bunkky on my Discord for reporting this one)
Git Issue #50 - An issue with the LOS function for versions 1.8 > 1.12. This has been resolved. Credit for alerting me to this one comes from @nellemar.
Git Issue #42 - Killing an NPC with a bow may not return the player as the murderer. This was reported by @CodedoctorDE on github.
Git Issue #30 - Attacking someone wearing something enchanted with thorns would trigger them for PVP attacks. This was reported a bit ago by @NazzyDragon on Github.
Additions:
Git Issue #48- Added the ability to set bypass permissions to users to block them from triggering NPCPolice actions. This request came in from @ishopify.
npcignore - Command to flag an NPC to be ignored by NPC Police. All assaults and damage will not register with the plugin. The request goes to @dunem666 on my Discord.
Git Issue #37 - 1.14.2 removed the ability to pull the server name from the config. This is now utilized via BungeeCord if you are using that.
PlaceHolderAPI - Now utilizes the new PlaceHolderExpansion class.
Additions:
Random look - This feature was added purely for the future release of the minigame addon for this plugin (TheJail). You can set the maximum viewing angle that the NPC will look around. This is based on the yaw the NPC had when it stopped moving. I also allow for a min and max interval (in whole seconds).
Git Issue #21 - Invalid column data type for dates. Reported by Salt42
Git Issue #22 - Sentinel made changes in 1.7.5+ that cause the NPC's to continue attacking. I now support the old and newer versions. Credit partially goes to @NazzyDragon for letting me log onto her server and discover the changes.
API reworked, old plugins might not function right off
Command arguments fixed
Tab complete resolved
Line of sight fixes
Additions:
listjails
Added a new command that will show the distance to each jail on the server as well as the ability to click the jail for config, as well as info on the region.
Thanks to @Phela1 for pointing this one out. It seems there was a timing issue that could cause the plugin to delete your jail settings is the world was not fully loaded when I loaded the jail settings. This should be resolved by my changing the timing of the worlds getting loaded. Let me know if you run into any issues.
Thanks to @melodicaxe for pointing this one out. In one of my last updates, i removed the multiplier on the damage to bounty. So the bounty was being set the same if you punched (1hp) vs a diamond sword (7hp). This has been fixed.
The banned item system worked, unless the items were named different, enchanted, had lore, etc.. This release fixes that and add's some options for your choosing. Thanks to Boi#7744 on Discord for making me aware of this.
Minor language file cleanup
Text positioning
Moved some lines around, and other minor things
Changes:
Banned Items
You can now right click items in the banned item interface. This will cycle from 1-4 and causes the validation to review several levels on each item before saying it's a banned item.
1 = Item type
2 = Item type, and lore
3 = Item type, lore, and enchantments
4 = Item type, lore, enchantments, and the display name
The system now supports two methods for extending someone's jail time.
Seconds
You can now assign seconds to an NPC to add to a users time in jail. This isn't part of a users bounty, but an extension of their time in jail. The seconds must be exhausted before the jail starts to remove bounty. So you can add seconds to a users time in jail via command or settings on an NPC.
Expire Time
This allows you to set a hard date (in seconds) for a user to be jailed until. This is more of an expiration date/time than seconds. It's just the date you want in seconds from when the command is set. Once the hard time is passed, it will exhaust whatever seconds the user has on them, then bounty before they are freed.
NPC's can now override the bounty settings for regions, worlds, and global settings.
Commands
setjailexpires Sets a date/time in the future (in seconds) from the current date/time to allow the user to obtain a free status. This date/time has to pass before extra seconds, or bounty starts getting subtracted.
setjailseconds Sets a total amount of seconds to add to a users jailtime. They have to exhaust time before the bounty starts to be lowered
npcdamagebounty Sets the bounty modifier for an assault on a single NPC. Overrides the world and global settings.
npcmurderbounty Sets the bounty modifier for murder on a single NPC. Overrides the world and global settings.
npcdamagetime Sets the time modifier for an assault on a single NPC. Overrides the world and global settings.
npcmurdertime Sets the time modifier for murder on a single NPC. Overrides the world and global settings.
@Coolkc456 reported an issue with users being unable to traverse between WG regions. There was an issue where no jails setup it would block as it couldn't compare the jail / world settings. This should be resolved now.
With 1.9.4+ the timing of registering custom events broke this plugin. I had to do a few things to ensure people with an older beton could still use the plugin. So it took a bit more to get it resolved. This should be good now.
The system has supported wanted levels but never stored with the user records. This was because it had not been fully implemented. Not there are several items added to support wanted levels.
You can set a range on a jail to restrict users from going to a specific jail when they have a specific wanted level,
You can assign a wanted range on the world, anyone outside that range, you can setup to be kicked to a different server or world.
Commands
global This command shows the global settings screen, and allows you to set the settings for the server. This replaces the settings in config.yml.
setwanted This command allows you to set the users current wanted level. Valid values are NONE,MINIMUM, LOW, MEDIUM, HIGH
sendlocation This command allows you to configure the forced send location when a user falls outside the minimum, and maximum wanted levels configured
kicktype Sets the action type and destination for kicking a user. Valid values are onchange-server, onchange-world, onarrest-server, onarrest-world.
setminwanted Sets the lower end of the wanted range allowed in the world, or server.
setmaxwanted Sets the upper end of the wanted range allowed in the world, or server.
Changes:
Global settings are now done via the plugin, not the config.yml.
Fixes:
Wanted Status
When a player reached 0 bounty and they had a status of wanted, they would stay wanted. This has been fixed.
Language File
World and Jail settings showed maxdistance vs minbounty. So you never saw the correct setting.
Group Setting Commands
The group commands did not allow setting to blank, this is now the way to disable them from being used.
Configuration Saves
NPC Defaults for LOS attack were not getting saved upon the server shutting down.
Player storage Issue (Now with less alzheimer's!):
When a player was in jail and disconnected, they would come back in the jail and magically have all their time served, and be free to go. There was an issue upon records being loaded where I left the last calculation date as 1900. oops. Credit for alerting me to the issue goes out to @melodicaxe for reporting it to me on Discord and here!
When a player killed another player, the plugin would say you are wanted for it, but rather than saying the user's name you killed. It showed <targetrecord.name>. This has been fixed. Credit for this goes out to @melodicaxe and @Superola for reporting it to me on Discord.
If a user typed /np and did not have permissions, it would generate an error on the console and let the user know an internal error occurred. This has been resolved, though it does not give any result as to the command. Credit for this goes out to @melodicaxe for reporting it to me on the discussion board.
PVP MONITORS:
If a user attacks another user (PVP) and you had a region set use NP-MONITORS-PVP and NP-REGIONGUARD it wouldn't register that the PVP actions happened. Thus no bounty or warnings. This has been resolved. Credit to @melodicaxe for reporting this one to me as well.
np-noarrest was only working when an NPC attacked a player. Worthless really, but it was partially there. Now it functions when a player hits an NPC as well.
np-regionguard worked, but there were some message errors behind the scenes that would break it. See if this works now. Set it on a region and that region will become the guard without any NPC's around.
Credit goes to @Superola for this update. He has been requesting me to fix the flags for a while, and today I made some time for that. Huge thanks to him for poking, prodding and overall keeping in-touch with me to get this done.
Permissions issues
Some people use the default permissions inside spigot. With that, there is no group support. So the plugin was generating errors and overall not working 100%. So I have disabled all permission functions should you use the internal permissions
Major issue with WorldGuard and the "__GLOBAL__" region.
If you did not have any custom flags inside the region, worldguard would return a null, thus causing issues. Took a bit to figure this out, but it's been resolved in this release. Huge thanks to all the people posting error logs for me.
The jail config commands were not letting you know that you were not in a jail location. So sometimes you would not get notice of that. This has been fixed. This was reported several times by many people so thanks to all the users in general for this one.
MC versions less than 1.9.2 would produce errors on damage. This was due to checking for splash potion damage. Thanks to CaptainDan on Discord for letting me know.
Seems that I never took into count Arrows, Splash Potions, or Lingering Potions as a damage source. Huge wonder how the heck I missed that one. Kudo's to @zorrowu for pointing this out to me.
Console spam, as well as messages spammed users when you had users in multiple worlds. This has been fixed. Thanks go out to @Superola for the heads up!
PLEASE NOTE: This is very untested as Citizens has not updated yet. I am putting it out for when they do, and I am busy / unable to update it at that moment.
PLEASE NOTE: This is very untested as Citizens has not updated yet. I am putting it out for when they do, and I am busy / unable to update it at that moment.
If you have the player's inventory removed upon arrest, the plugin will now filter out items that have been added to the banned items list. They are destroyed and non-recoverable.
This sends a player to a jail, omit the jail option to send to the closest jail. Otherwise, it will send them to the jail you select, or are standing in.
If you omit the seconds argument, it will use whatever bounty they have. If you add seconds, the command will calculate the time based on world settings, jail etc to figure out the bounty to add to the user to equal that time.
This flag stacks onto the np-af-bounty flag, with this you can provide a cooldown for the bounty. Setting it to 60 would only apply the bounty amount every 60 seconds while in the specific region.
API
PlayerManager.releasePlayer()
Use this to release the player from jail. It will clear bounty, send them to the exit point if set, remove from all groups, and set the status to free.
PlayerManager.getBountyPerSecond()
This will return the bounty that could be awarded to a player per second for the region they are currently standing in.
There were several issues with the version 1.8.8 and the plugin working. This update fixes quite a few things to get that issue resolved. Thanks to @Dard for pointing this out to me.
The language files were loading, but having issues if you didn't have all the text from the main one in them. This has been resolved and you can add only the parts you want to change to them. Thanks to @Dard for pointing this out to me.
Changes:
I now do a more in-depth version check of world guard. If you have less than v6.1.3 it will let you know and not generate an error in the console. I would suggest that you update to the latest versions anyway.
The gui menu was borked for non-admin players. This has been fixed. Use npcpolice.gui.interact to allow your users to use it. Thanks to @sd_captain for pointing this out to me.
Players will now go back to a jailed status if they walk into the jail on their own.
Additions:
new worldguard flag:
np-extendedjail: Setting this with the shortname of a jail will cause that region to be an extended section of a jail. This is useful if your jail is not the same shape and sits on multiple levels. You can now stack the regions and the players will not be flagged as escaped.
Added a config option for the bounty notice interval. set to 9999 to really never see it. Unless you never log out. -- This is only in the config.yml and not in the world settings. So this would require editing the file.
If a world never had a jail created, it would result in the /np world command looking rather ugly. This has been fixed.
PrivatePriusfound an issue where attacking entities/NPCs can result in an error. The error should be resolved, but the reason for the error needs more research.
The help command produced an error in the console and wouldn't display the commands correctly. This has been fixed. Many thanks to @silverforte for all the log posts and pointing out where the issues were.
There was an issue with the database having a null for the lockedinventory. This has also been resolved thanks to @silverforte .
Setting your bounty to zero while wanted didn't return you to FREE. The system will fix that for the users now.
Attacking an NPC would auto add the NPCPolice trait. This is no longer the case.
Changes:
Removed some classes that were not needed and or used.
Additions:
Some items, but they will actually show up in the next release.
The help command produced an error in the console and wouldn't display the commands correctly. This has been fixed. Many thanks to @silverforte for all the log posts and pointing out where the issues were.
There was an issue with the database having a null for the lockedinventory. This has also been resolved thanks to @silverforte .
Setting your bounty to zero while wanted didn't return you to FREE. The system will fix that for the users now.
Attacking an NPC would auto add the NPCPolice trait. This is no longer the case.
Changes:
None
Additions:
Some items, but they will actually show up in the next release.
You are now able to setup the plugin to take a users inventory on an arrest. This will store it in the police system until the player escapes, or becomes free.
You can configure the fate of the locked up inventory when they escape, do nothing, return it, or destroy it.
You can configure the fate of the locked up inventory when they are set free. Do nothing, return it, or destroy it.
You may also, let them get their inventory from a configured chest in the jail as well now. (Please see the video at the end for more information about this).
The API fired the PlayerSpotted event even when they were not. This affected the BetonQuest objective NPCSpotted.
the setstatus command would generate errors if you used lowercase on the names.
Changes:
None
Additions:
New commands
setnpclosattack
This command will set the world's default for NPCs to attack players when they have a line of sight on them. They do not need to have any targets added to sentinel for this to work. They just need the sentinel trait. (Sight is limited to 48 blocks)
npclosattack
This will set the trait on the NPC to use the global setting, not to attack when it has LOS, or to attack players with a wanted or escaped status when it can see them. (Sight is limited to 48 blocks)
Seems I goofed on leaderheads and referenced the wrong plugin in getting the version. This has been fixed. Thanks to @ICEconchy for pointing this out to me.
A bunch of fixes related to the in cell / out of cell time display. Wasn't always changing based on being in the cell or out.
Changes:
The placeholder %npcpolice_user_jailtime% will now show if they are in or out of a cell as well as the jailed status if there are no settings for in or out of the cell.
Additions:
Players with a jailed status will be teleported to a jail upon joining if they are not in one. If they were in a jail on the server previously, that jail will be used. Otherwise, it will locate the first jail closest to the spawn point. This ensures if your using MySQL and bungee, they will be teleported to jail when switching servers.
The GUI showing Wanted / Jailed / Escaped users now shows the information and colors correctly.
One of the message flags was showing the wrong information.
Additions:
Added a new place holder flag %npcpolice_user_jailtime%. This shows the time a user has remaining to serve (Changes to match being in and out of cells), or when you are wanted it shows the remaining time.
Please note that this version made some large changes. So please make sure you backup your Jailer plugin folder in-case you need to roll it back. This replaces 1.6 as I had a couple issues with the Sqlite side of things, and when users quit.
When this version kicks in it will auto roll your data to a sqlite database and delete the flat files.
I have added the ability to show stats via the LeaderHeads plugin.
The board names are as follows:
jail-bounty (Top current bounties)
jail-totalbounty (Top lifetime bounties)
jail-arrests (Top arrests)
jail-murders (Top murders)
jail-escapes (Top escapes)
jail-rcntarrests (Recent Arrests)
jail-rcntescapes (Recent Escapes)
Sqlite & MySql Support
The plugin will auto migrate your data to sqlite when it starts up.
You can however select to go with MySQL. I would suggest you make a backup, then delete your config file. This will generate a new one and you can change the settings in there. Below is the section to add if you want to just update your config on your own.
You can now add or remove bounties from players. They have to be connected to the server, not offline.
/jailer addbounty {player} {Bounty#}
/jailer removebounty {player} {#}
Fixes:
Quite a few fixes were added to this. Been over a bit so i forget them all. However I would swap to Sentinel if you are on 1.9.2+ as sentry it will not jail the players (Cannot get the real amount of damage).