All Projects → jonbarrow → PHP-Vanilla-Buycraft

jonbarrow / PHP-Vanilla-Buycraft

Licence: AGPL-3.0 license
A basic "BuyCraft" implementation written in PHP for pure vanilla Minecraft servers.

Programming Languages

PHP
23972 projects - #3 most used programming language
HTML
75241 projects

Projects that are alternatives of or similar to PHP-Vanilla-Buycraft

morrowind-sharp
A Morrowind modding guide. New and experienced players welcomed.
Stars: ✭ 107 (+529.41%)
Mutual labels:  vanilla
rcon-cli
A little RCON cli based on james4k's RCON library for golang
Stars: ✭ 108 (+535.29%)
Mutual labels:  rcon
vanilla-jsx
Vanilla jsx without runtime. HTML Tag return DOM in js, No virtual DOM.
Stars: ✭ 70 (+311.76%)
Mutual labels:  vanilla
samp-client
GTA SA-MP API client library for Python
Stars: ✭ 21 (+23.53%)
Mutual labels:  rcon
BetterAlign
A better version of Align for Vanilla WoW
Stars: ✭ 16 (-5.88%)
Mutual labels:  vanilla
VanillaReimplementation
[Paused - Far from done] Reimplementation of Vanilla features in Minestom
Stars: ✭ 67 (+294.12%)
Mutual labels:  vanilla
pfQuest
A Questhelper and Database Addon for World of Warcraft: Vanilla & TBC
Stars: ✭ 109 (+541.18%)
Mutual labels:  vanilla
ClassicEmu
ClassicEmu is an Open Source Server for World of Warcraft (1.12.1, 2.4.3 and 3.3.5a) written in .NET6
Stars: ✭ 33 (+94.12%)
Mutual labels:  vanilla
SuperMacro
Addons for World of Warcraft 1.12.1
Stars: ✭ 21 (+23.53%)
Mutual labels:  vanilla
rconsharp
rconsharp is a Valve RCON protocol implementation written in C# targeting netstandard 2.1
Stars: ✭ 43 (+152.94%)
Mutual labels:  rcon
ElvUI
ElvUI for World of Warcraft - Vanilla (1.12.1)
Stars: ✭ 67 (+294.12%)
Mutual labels:  vanilla
tiny-editor
A tiny HTML rich text editor written in vanilla JavaScript
Stars: ✭ 58 (+241.18%)
Mutual labels:  vanilla
Shopixl
Open-source, self-hosted, Buycraft alternative
Stars: ✭ 17 (+0%)
Mutual labels:  buycraft
lazy-cache
Cache requires to be lazy-loaded when needed. Uses node's own require system with tried and true, plain-vanilla JavaScript getters.
Stars: ✭ 51 (+200%)
Mutual labels:  vanilla
drawer
A touch-enabled drawer component for the modern web.
Stars: ✭ 26 (+52.94%)
Mutual labels:  vanilla
rcon
Source RCON client for command line
Stars: ✭ 111 (+552.94%)
Mutual labels:  rcon
spunkybot
Multi-platform administration and RCON tool for Urban Terror
Stars: ✭ 19 (+11.76%)
Mutual labels:  rcon
react-typewriter-js
Simple vanilla JS script to simulate text typewriting effect.
Stars: ✭ 18 (+5.88%)
Mutual labels:  vanilla
touchMyRipple
A simple library for apply the ripple effect where you want
Stars: ✭ 19 (+11.76%)
Mutual labels:  vanilla
EasyScrollDots
Single page scroll JavaScript plugin that allows for vertical navigation of page sections
Stars: ✭ 38 (+123.53%)
Mutual labels:  vanilla

PHP-Vanilla-Buycraft

A basic "BuyCraft" implementation written in PHP for pure vanilla Minecraft servers.

demo

DISCLAIMER

This codebase has NOTHING to do with the official BuyCraft plugin or it's developers. I am simply borrowing the name to help users understand what this does, and what it's for. This is not a wrapper around BuyCraft or it's API. This is a stand-alone project with no real affiliation to BuyCraft

Requirements

  • A PayPal developer and business account (if using paypal)
  • A PayPal developer app using the REST API (if using paypal)
  • Composer
  • php7.0.9+ (This is recommended, but not required. I built this in php7.0.9, and cannot promise it will work in other versions!)

Commands and messages

In this current implementation, only one command is supported when an item is bought. This can easily be changed to be an array of commands which is looped, or by having the single command set a score/tag in-game, and then run more commands via command blocks on the server.

When a payment is successful, the script will run both the payment command as well as send a message in chat. This message is sent via tellraw targeting all players (@a) and uses JSON as it's input.

Both the command and message support several placeholders for data based on the purchase. See below for details

Placeholders

{product} -> placeholder which displays the bought product

{amount} -> placeholder which displays the amount of the product

{price} -> placeholder which displays the price of the product

{player} -> placeholder which displays the player who bought the product

Example usage (command):

give {player} stone {amount} 0

Example usage (message):

{"text":"Thank you {player} for the donation of {price}, enjoy your {product}!"}

Ports

Setup

For an explanation on the core concepts used here, refer to Soon-to-be-video-url

To build from source:

  • Clone the repo and open the root directory
  • Change any class and path namespaces as you see fit (defaults to VBCraft)
  • Install all dependencies via composer install (requires Composer)
  • Travel to the app folder
  • Edit app.php to match your PayPal app keys and database credentials
  • Travel to the public folder
  • Edit install.php to match your database credentials
  • Run install.php

To host this project as-is you must have either a shared host which gives you access to composer/SSH or a VPS and install composer in order to download the dependencies. I recommend XenonHosting, as they have very affordable shared hosting (starting at $1/m) with SSH access, and VPS hosting starting at $3/m http://xenonhosting.co.uk/

Going Live

When working with the PayPal REST api you are given 2 sets of client/secret keys. One key is for sandbox use and one is for live use. Sandbox use does NOT use real money, and does NOT accept real PayPal accounts for transactions (only test sandbox accounts, which you create). YOU SHOULD ONLY DEVELOP WHILE IN SANDBOX MODE, USING THE SANDBOX KEYS. To go live and accepting REAL payments from REAL customers, you must change the client/secret keys to the Live keys, as well as uncomment the Going Live section of app.php

Adding sections and items

This repo is NOT meant to be used as-is, though there is basic as-is support. This repo is designed to be a base with which you build your OWN application(s). That being said, if you MUST use this repo as-is, you can add sections and items very easily.

  • Open the vanillabuycraft database in any database editor
  • Edit shopsections to add new sections
  • Edit shopitems to add new items to those sections

Can I contribute?

Yes you can! If you would like to contribute to this codebase, feel free to hack away at it and make a Pull Request. If you have ported this code to another language/payment service provider, make an Issue post or a Pull Request with a change to this README linking to the port and I will add a link here.

Libraries Used

Licensing information

This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU Affero General Public License for more details.

You should have received a copy of the GNU Affero General Public License
along with this software. If not, see <http://www.gnu.org/licenses/>.

Vanilla BuyCraft is not, nor am I (Jonathan Barrow), affiliated with Mojang or the official BuyCraft service. All brands and trademarks belong to their respective owners. Vanilla BuyCraft is not a Mojang-approved software, nor is it associated with Mojang.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].