Overview

The Playwire Minecraft Plugin allows developers to easily integrate in-game advertising with their Minecraft servers. Our plugin streamlines the development process to reward players in Minecraft by presenting opportunities to watch video advertising. Server admins can build reward opportunities right into the worlds themselves via Command Blocks, or send an ad link to the Player at any point in the game: i.e. (upon joining the game, when a certain time has passed, etc.).

1

Set Up Environment:

Currently, the plugin works with the following Minecraft Servers: Bukkit 1.8+, CraftBukkit 1.8+ and Spigot 1.8+, Sponge 1.8+ and Cauldron 1.8+. To get started, you will need the following:
2

Install Playwire Plugin:

Please contact your Playwire Media Account Manager to obtain your customized plugin. The plugin itself is a .jar file that we will be adding to the CraftBukkit Minecraft server as a plugin.
  • Locate the Playwire Minecraft Plugin on your system
  • Move the Playwire Minecraft Plugin to the /plugins directory of the Craftbukkit Server
    $ mv ~/Downloads/playwire-ads-1.1.0.zip ~/minecraft/plugins
  • Unzip the file which will create a directory called /playwire-ads
  • Inside the /playwire-ads directory, you will find the config.yml file which we will configure later
  • Restart the server using
    $ java -jar craftbukkit-latest.jar
  • Once the server is started, join the server within the Minecraft Game Client
  • When you join the game, you will see a message from the Playwire Playwire Plugin appear in the Minecraft chat dialogue box
  • Press Click here and a dialogue box will open prompting you about the link you just clicked, click Yes and your web browser should open up and start playing a video ad
  • Once the ad is finished playing, the following message will appear in the video player – “Return to Game to Claim Reward”
  • Return to the Minecraft Game Client and you should have received a received a Diamond Sword reward for watching the video ad
  • This is the typical Player experience, a Player will be rewarded for watching a video ad
  • To test the experience with the plugin again, type T to open the chat dialogue, and type /adlink [playerName] to send yourself another adlink (Only works if you are opped Read More) or via CLI in the server console
  • As you’ll see in the last step, their are several configurable options
3

Configure Playwire Plugin:

Once you follow the previous steps to make sure everything is running properly, you are now ready to configure the plugin and develop your own implementation. The AdLink itself is a message that will appear to the Player in the Minecraft Chat Dialogue. The AdView has 4 configurable outcomes after a viewer attempts to watch a video ad. All messages in the plugins can be formatted using Minecraft’s formatting codes and many are listed in the comments of the config.yml included with the plugin.
AdLink
  • Message that is displayed to the Player when using the /adlink command
AdView
  • Counted: If a Player successfully watches and completes a video ad once during a *cool down period, messages and commands will be shown to the Player
  • Uncounted: If a Player successfully watches and completes a video ad more than once during the *cool down period, messages and commands will be shown to the Player
  • Blocked: If the Player has Ad Block in their browser, messages and commands will be shown to the Player
  • Unfilled: If a player attempts to watch an ad, but no ad is returned, messages and commands will be shown to the Player
onPlayerJoin (boolean)
  • When set to true, will display AdLink to Player when they join the game
*Cool Down Period
A cool down period is a set amount of time where a Player isn’t able to claim a reward, for example: A Player will try and claim a reward more than once an hour, but the cool down period is set to 1 hour which would prevent the user from claiming a reward again. By default, there is not a cool down period set, please contact your Playwire Media Account Manager if you wish to set a cool down period.
# -----------
# Message displayed to user when using /adblock command
# Use @link[LinkText] for clickable link
# -----------
AdLink:
  - "Displayed to Player when using the /adlink command"

# -----------
# Message displayed to Player when ad is viewed depending 
# on if it was viewed, blocked, or unfilled
# -----------
AdView:
  Counted:
    - "If a Player successfully watches and completes a video ad once during a *cool down period, messages and commands will be shown to the Player"
  Uncounted:
    - "If a Player successfully watches and completes a video ad more than once during the *cool down period, messages and commands will be shown to the Player"
  Blocked:
    - "If the Player has Ad Block in their browser, messages and commands will be shown to the Player"
  Unfilled: 
    - "If a player attempts to watch an ad, but no ad is returned, messages and commands will be shown to the Player"

# -----------
# When set to true, adlink shown to Player when joining game
# -----------
onPlayerJoin: true

4

Usage:

The plugin is easily customizable and integrates easily into your current development workflow. Within your current plugin, whenever you want to send the Player a message and link, use the command /adlink. This will send a message in the game to the Player, allowing them to click and view a video ad. Within MainText, HoverText, Viewed and Blocked, you have the full list of Minecraft Commands at your disposal as well as any custom functionality you already have. Additionally, server admins can trigger the /adlink command via Command Blocks placed in the game. Using the default config.yml file included with the plugin (shown in this section), a typical implementation might look something like this:
  • Set the MainText to read – “Click here to watch an Ad and get a reward!”
  • Set the HoverText to read – “Watch Ad”
  • After a Player watches an ad, lets display “Thanks for watching the ad” and give them a diamond sword as a reward in Counted
    /give @p diamond_sword
  • If a Player attempts to watch an ad, but has ad block in their browser, lets display “You had adblock on!” and give them a dirt in Blocked
    /give @p dirt
  • If a Player attempts to watch an ad, but no ad is returned, lets display “Well we couldn’t find you an ad to play” and give them a wooden sword as a reward in Unfilled
    /give @p wooden_sword
  • By setting onPlayerJoin:true the AdLink will appear when the Player joins the game
Demo Plugin config.yml
# -----------
# Message displayed to user when using /adblock command
# Use @link[LinkText] for clickable link
# -----------
AdLink:
  - "Here's a §6§nStick§r, @link[§a§nClick Here] to watch an ad and get a better reward!"
  - /give @p stick

# -----------
# Message displayed to Player when ad is viewed depending 
# on if it was viewed, blocked, or unfilled
# -----------
AdView:
  Counted:
    - "Thanks for watching the ad"
    - /give @p diamond_sword
  Uncounted:
    - "You have already received an award within the time limit"
  Blocked:
    - "You had adblock on!"
    - /give @p dirt
  Unfilled: 
    - "Well we couldn't find you an ad to play"
    - /give @p wooden_sword

# -----------
# When set to true, adlink shown to Player when joining game
# -----------
onPlayerJoin: true

Demo Plugin Experience
  • Was this Support Article Helpful ?
  • yes   no