Force Resourcepacks

SpigotVIP Force Resourcepacks 1.7.9

Force Resourcepacks
O6LAUDf.png
Made in Germany with love (and beer)
Purchase with NOPE on OpenBazaar!
0Ga9kU0.png



Did you ever wanted to force players to use a certain server resourcepack on one of your servers? Maybe for a minigame as part of your network? Or maybe you don't want to force the pack on the users but just want to inform the ones who do not accepted it about what they are missing out? Then this is the plugin you always searched for!

Force Resourcepacks is the enhanced version of my Bungee Resourcepacks and World Resourcepacks plugins. In addition to beeing able to set different resourcepacks per world, server or on your whole BungeeCord network you can also react on whether the user accepted downloading the pack and send them a message or even kick them if they did not do that!

It even notices when a Bukkit server behind the Bungee sends a resourcepack and applies the server's pack status rules on it! That way it is compatible with minigames plugins that manage their own server resourcepacks while still providing the ability to kick a user from the game's server when they did not download the pack!

Compatibility Note:
This plugin is currently (1.12) compatible with BungeeCords above 1.8, Spigots above 1.8.8 and clients above 1.8.
(You may need older plugin versions to run it on an outdated Bungee/Spigot)
Requires Java 8!

Features
  • Automatically generates the sha1 hashes!
  • Set different server resourcepacks per server or whole BungeeCord network
  • New: Match server/world names with regex!
  • New: Set packs via WorldGuard flags (requires WorldGuard above version 6.1.3)
  • Configurable delay before sending the pack to a player
  • Remembers which pack a user has currently applied and doesn't resend on server switch
  • Send a message or title to the player when he accepts, loads, denies or fails to download the resourcepack
  • Let the user set the pack himself New: The pack will re-apply on each login and be in place of the empty one for resets
  • Inform the user which pack the server send them if it was done automatically
  • Kick the player from the Server if he doesn't accept resourcepack or send him to a specific server (that way you can have two versions of the same server, one with resourcepacks and one without)
  • Stop the user from joining a certain server in your network if he didn't accepted an optional the resourcepack before
  • ResourcePackStatusEvent (for Bukkit use the PlayerResourcePackStatusEvent) for developers to react on the accepting or denying of a pack in their own plugins
  • Send the correct pack format depending on the client's version and kick player if he uses a version without an available pack (requires ViaVersion on Bukkit when ForceResourcepacks is used on the Bukkit server!)
  • Compatible with AuthMe Reloaded.
    Do you need it to be compatible with more plugins? Contact me!

Statistics
Commands
/frp reload [resend]
Reloads the config file; resends the packs to every online player if the 2nd argument is "resend"
/frp generatehashes
Downloads the resource pack files and generates the sha1 hashes of them
/frp version
Shows the version of this plugin
/usepack
List all packs that you can choose
/usepack <packname> [<playername>] [<temporary>]
Send a specific pack to yourself or another player, temporary accepts true or false (false is default)

Permissions
forceresourcepacks.command - Access to the /frp command
forceresourcepacks.command.reload - Access to /frp reload
forceresourcepacks.command.[/FONT]generatehashes - Access to /frp generatehashes
forceresourcepacks.command.version - Access to /frp version
forceresourcepacks.command.usepack - Access to /usepack
forceresourcepacks.command.usepack.others - Send packs to other players via the /usepack command
forceresourcepacks.command.usepack.temporary- Select whether or not the selected pack is only temporary or should be stored and re-applied
forceresourcepacks.pack.<packname> - Gives access to a pack via the /usepack command, you can define these permissions via the config.yml on per pack basis
forceresourcepacks.updatenotification - Get ingame update notifications


Statuses you can react on
ACCEPTED
The player chose "yes" on the download screen or has the server pack enabled for this server entry in his multiplayer list

DECLINED
The player chose "no" on the download screen or has the server pack disabled for this server entry in his multiplayer list

LOADED
The player finished downloading the pack and the client applied it

FAILED
The client failed to download the pack, e.g. when the pack url is wrong

TIMEOUT
The client/player failed to react on the server resourcepack sent prompt in the amount of seconds set in the config at "prompttimeout"

NO_PERMISSION
No pack can be send to a player because all that would be available on that server are restricted and the player doesn't have the permissions he would need for that pack
If no extra actionsfor NO_PERMISSION are set the DECLINED actions are used

WRONG_VERSION
No pack can be send because all packs that would be available on that server have a pack format that would be incompatible with the player's client version. Currently pre 1.9 is pack format 1, 1.9 and higher is 2
If no extra actions for WRONG_VERSION are set the DECLINED actions are used


Actions you can run
All actions that send some kind of message or command support usage of ampersands (&) for color and formatting codes.
In all actions you can use
%pack% to get the name of the pack and %player% for the name of the player!

MESSAGE
Sends a message to the player

TITLE
Send a title (multi-line strings don't work in titles, subtitles and action bar messages)

SUBTITLE
Send a subtitle (can be used with or without the title action)

ACTION_BAR
Send a message in the action bar chat slot above the user's inventory bar (currently only supported on Bungee)

KICK
Kick the player from the proxy or the server with the value of this action as the kick message

SEND
Send the player to a specific server (Bungee version) or world ( Bukkit version), the value of this action is the server's/world's name!

CONSOLE_COMMAND
Execute a command as the server console.

PLAYER_COMMAND
Execute a command as the player who reacted on the status.
Please note that he needs the permission to run the command!


WorldGuard Flags
If you install this plugin on Bukkit then you have access to the following WorldGuard flags:

resourcepack-on-entry
resourcepack-on-exit
String flags with the name of a configured pack as the value and will apply the pack as soon as the region is entered.

entry-without-resourcepack
exit-without-resourcepack
Boolean (allow/deny) flags. Default value is allow. You can bypass it with the same bypass permission as the normal entry and deny flags. If the entry-deny-message or exit-deny-message is set it will send it to the user.

Please note that the flags require at least WorldGuard 6.1.3!

Config
This config is for the Bunge plugin. For configuration differences on the Bukkit part please read this update note.
Code (YAML):
# Log some stuff about the players packs to the console
# (pack sending and the status, turn that off on large servers!)
debug: true
# Whether or not resourcepack file hashes should be generated on startup:
autogeneratehashes: true
# Enable or disable authme support
# If you want that on the Bungee side you have to run this plugin on the Bukkit too!
useauthme: false
# Time in seconds in which a user needs to respond to the resourcepack prompt
# This is needed as users can just ESC out of the prompt
prompttimeout: 15
# Time in seconds for which a kick is delayed that way you
# can display a title or chat message before the kick
kickdelay: 10
messages:
usepack: You now use the pack %pack%!
packlisthead: "Packs available to you:"
nopacks: No packs found!
packs:
lobby:
# The url the client should download the resourcepack from.
# Has to be a direct download link! No medifaire/mega/other oneclick-hoster!
url: http://example.com/lobbyresourcepack.zip
# The sha1 hash of the resourcepack's zip file.
# This needs to be the correct one in 1.10 and later!
hash: abcdef012345678abcdef012345678abcdef0123
# The format version of this resourcepack
# 1 is for 1.8 packs
# 2 is for 1.9
format: 1
# Whether or not this pack will only be send to players with a certain permission
# permission: forceresourcepacks.pack.<packname>
restricted: false
# If you want you can define a specific permission for this pack if you don't want
# the default forceresourcepacks.pack.<packname> permission!
permission: forceresourcepacks.pack.lobby
game:
url: http://example.com/minigameresourcepack.zip
hash: 012345678abcdef012345678abcdef012345678a
# Empty pack to reset the pack to the default one
empty:
url: https://github.com/Phoenix616/ResourcepacksPlugins/-Redacted-/master/Empty.zip?raw=true
hash: 3934d29cc6f7c271afdc477f6dd6b2ea90493825
# Name of the pack to use for resetting of the pack for servers which don't have one assigned
empty: empty
global:
pack: lobby
# Secondary is the list of packs to not replace if the user already has them
# If no main pack is set the first one also gets used to reset
# the pack if the user has a non secondary one
secondary:
- lobbypack
# Delay in ticks before sending the pack to a player after he logs in/switches to the world
send-delay: 20
actions:
# Possible pack status:
# ACCEPTED:
# The player choose "yes" on the download screen or has the server pack enabled for this server entry in his multiplayer list
# DECLINED:
# The player choose "no" on the download screen or has the server pack disabled for this server entry in his multiplayer list
# LOADED:
# The player finished downloading the pack and the client applied it
# FAILED:
# The client failed to download the pack, e.g. when the pack url is wrong
# TIMEOUT:
# The client failed to react on the server resourcepack sent prompt in the amount of seconds set at "prompttimeout"
# If no extra reaction on TIMEOUT is set the DECLINED actions are used
# NO_PERMISSION:
# No pack can be send to a player because all that would be available on that server are restricted
# and the player doesn't have the permissions he would need for that pack
# If no extra reaction on NO_PERMISSION is set the DECLINED actions are used
# WRONG_VERSION:
# No pack can be send because all packs that would be available on that server have a pack format that would be
# incompatible with the player's client version. Currently pre 1.9 is pack format 1, 1.9 and higher is 2
# If no extra reaction on WRONG_VERSION is set the DECLINED actions are used
loaded:
message: "You are now using the %pack% pack!"
# Possible actions:
# MESSAGE:
# Sends a message to the player
# TITLE:
# Send a title (multiline strings don't work in titles and action bar)
# SUBTITLE:
# Send a subtitle (can be used without the title action)
# ACTION_BAR:
# Send a message in the action bar chat slot above the user's inventory bar
# KICK:
# Kick the player from the BungeeCord proxy with the value of this action as the kick message
# SEND:
# Send the player to a specific server on your bungeecord network, the value of this action is the server's name!
# CONSOLE_COMMAND:
# Execute a command as the bungeecord server console. %player% is the player's name
# PLAYER_COMMAND:
# Execute a command as the player who reacted on the status.
# Please note that he needs the permission to run the command!
# Formatting codes with & work in all actions besides the send action
# %pack% will get replaced by the name of the pack from the packs section in all reactions
declined:
kick: "&cYou have to accept the server resource pack in order to play!\n&cVisit &ehttp://s.moep.tv/rp&c for info on how to enable it!"
# Example servers config structure below:
servers:
lobby:
pack: lobby
secondary:
- gamepack
send-delay: 20
actions:
loaded:
message: You are now using the %pack% pack!
declined:
title: "&cPlease accept the %pack% resource pack!"
subtitle: It looks a lot nicer with it!
message: "Visit &ehttp://s.moep.tv/rp&c for info on how to enable the server resource pack!"
failed:
# Kick player from your BungeeCord when he doesn't accept the pack
kick: "&ePlease try rejoining, you need the pack!"
accepted:
message: "&cDownloading server resource pack..."
action_bar: "&eDownload server resource pack..."
minigame:
# Use a regex to target all servers with a certain name
regex: 'minigame_.*'
pack: game
actions:
declined:
# Send player back to lobby when he doesn't accept the pack
send: lobby
title: "&cYou need the pack!"
subtitle: You cannot play without it!
message: "Visit &ehttp://s.moep.tv/rp&c for info on how to enable the server resource pack!"
timeout:
send: lobby
title: "&cPlease accept the pack!"
subtitle: You cannot play without it!


(Plugin versions above 1.6.5 will try to generate the sha1 hashes automatically and include a /frp generatehashes command!)

If you have any questions about this resource feel free to contact me any time! The best way is via a private message here or the discussion thread to this resource.

I should always be able to get back to you with an answer in less then 12 hours ‒ during East Coast working hours it can even be under 1 hour!
Metrics
This resource includes MetricsLite for Bukkit and StatsLite for Bungee to add some statistics via mcstats.org. You can opt-out by changing the settings in the PluginMetrics/config.properties (bungee) or PluginMetrics/config.yml (bukkit)! They are licensed under the following licenses:Because mcstats seems to be dying a new metrics site was added with version 1.7.1: bstats.org. We'll see if it stick around, if not I'll just remove it again otherwise we already have some cool data to draw graphs with! If you don't want bstats to collect info on your server then you can disable it in the bStats/config.yml file. The license the used bStats-lite class is under can be found here.
Terms
By purchasing this resource you are gaining the right to use this plugin on any server you own, manage or work for for as long as you are in contact with the actual Minecraft aspect of the server and as long as the following conditions aren't violated.
You are not allowed to distribute this plugin in any form to anyone who has not obtained the right to use the plugin himself for example by purchasing it from this resource page.
You cannot refund your purchase after already acquiring the resource. It should work as described and if you have problems contact me!
You are allowed to modify this plugin as long as you follow the previous terms.
All of the rights given to you can be revoked at any time by the author, especially in the case that the terms were violated.
By downloading you accept the previous terms and that this resource is distributed without any (not even implied) warranty or liability by the author.
My other Resources

Latest reviews

Very nice, but need updates
Hello could you please update the ressource ?
Salamuch xD , Raspy use Bungee ResourcePacks in order to work with Bungee !
No bumgee :/

Similar resources

Force Resourcepacks patatra
NOW 33.3% OFF! - Run actions when a player declines or accepts your server resource pack!
5.00 star(s) 2 ratings
Downloads
1,250
Updated
Force Resourcepacks Dekomori
[1.8-1.18.2] Send resource packs globally/per server/world. Run actions! Spigot, Bungee & Velocity
4.62 star(s) 13 ratings
Downloads
1,813
Updated
BlackSpigot General Chat
Rules Help Users
    FoxH @ FoxH: dude why so little leaks?
    Top