Skip to content

Commit

Permalink
Merge branch 'dev'
Browse files Browse the repository at this point in the history
  • Loading branch information
KAMKEEL committed Nov 8, 2023
2 parents 2948b06 + f119638 commit 687340c
Show file tree
Hide file tree
Showing 95 changed files with 2,080 additions and 826 deletions.
73 changes: 52 additions & 21 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -1,21 +1,52 @@
MIT License

Copyright (c) 2021 KAMKEEL

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
MorePlayerModels+ is distributed under a reasonably open license. You probably want to have a read through this if you want to do something with it other than just play.

You are completely free and have the right to Use, Share and Adapt the mod. These rights can not be removed from you as long as follow the license terms.
If you simply wish to play with the mod and do nothing else, go for it, this license is of no use to you.

TL;DR
> You CAN
-- Fork and modify the code.
-- Submit Pull Requests to this repository.
-- Copy portions of this code for use in other projects.
-- Write your own code that uses this code as a dependency. (addon mods!)

> You CANNOT
-- Redistribute this in its entirety as source or compiled code.
-- Create or distribute code which contains 50% or more Functionally Equivalent Statements* from this repository.

> You MUST
-- Maintain a visible repository of your code which is inspired by, derived from, or copied from this code. Basically, if you use it, pay it forward. You keep rights to your OWN code, but you still must make your source visible.

General Clauses
Clauses that apply in general to any of the uses that follow.
- Personal Permission Clause
I will only give personal permission if I, KAMKEEL, am directly asked. If personal permission is given this does not imply endorsement.
- Waive Clause
All restrictive clauses in this license can be ignored with personal permission. Read the above clause.
- Extensive Clause
This license applies to MorePlayerModels+, the MorePlayerModels+ website, the legacy MorePlayerModels+ website and all other code, assets or binaries found on this website or the github repository unless otherwise indicated.
- Informal Clause
This license will not hold up in court. I have no intention of suing anyone for breaking it, the worst that can happen to you if you do is that I'll get annoyed and ask you to rectify your mistake. If you use a public distribution platform (such as CurseForge) it's also possible your project will get taken down. Breaking the license also makes you a jerk, and you don't want to be a jerk, do you?

If you want to Distribute MorePlayerModels+
"Distribution" refers to making available binaries, assets, or source of the mod available from the original sources as part of your modpack or otherwise.
- Attribution Clause
You must give appropriate credit to KAMKEEL as the creator of MorePlayerModels+ or the parts of it you're using. Noppes can also be credit as the original Mod Author. If you do any alterations the fact that you do so should also be indicated. A link back is optional but it would be cool if you would do so.
- Redistribution Clause
You may not redistribute the enitirity of the source code provided, unless heavy modifications are made to it as a whole. More than 50% of the code cannot be redistributed unless direct permission is provided from either KAMKEEL or Noppes.
- Non-Monetary Clause
You may not charge for access to the distribution itself or gain money through it, this includes any type of inline advertisement, such as url shorteners (adf.ly or otherwise) or ads in your service slowing the download down. This includes restricting any amount of access behind a paywall. Charging for ingame goods such as mod items or cosmetic features on a server does not count as distribution and falls purely under the Mojang Terms of Service.

If you want to Feature MorePlayerModels+
"Featuring" refers to using MorePlayerModels+ in an environment where you do not distribute binaries, assets, or source. An example would be a YouTube Let's Play.
- Thief Clause
You must not claim that you made MorePlayerModels+. Giving appropriate credit to KAMKEEL as the creator of MorePlayerModels+ makes you cooler, but you don't have to do it if you don't want to.

If you want to Use MorePlayerModels+ Code or Assets
Usage of code or assets falls under the Extensive Clause.
- External Clause
Certain parts of the codebase are indicated to be licensed under alternative licenses. You must obey those licenses.
- Attribution Clause
You must give appropriate credit to KAMKEEL as the creator of MorePlayerModels+ or the parts of it you're using. Noppes can also be credit as the original Mod Author. If you do any alterations the fact that you do so should also be indicated. A link back is optional but it would be cool if you would do so.
- Copyleft Clause
Your project must be open source (have its source visible and allow for redistribution and modification) and include a clause similar to this one in its license.
33 changes: 22 additions & 11 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,14 +1,28 @@

## 👋 Welcome to the MorePlayerModels+ Repository.
![](images/logo.png)
![](images/new_logo.png)

> ModePlayerModels+ is a [Minecraft](https://minecraft.net/) mod that allows you to customize your player with different body parts. ModePlayerModels+ is only a branch version of the **1.7.10** Forge version of the original (down below) and has no plans to add or update any other version. This is not an official version of ModePlayerModels.
Link to CurseForge: [HERE](https://www.curseforge.com/minecraft/mc-mods/moreplayermodels-plus)
[![Discord](https://github.com/KAMKEEL/CustomNPC-Plus/blob/dev/images/Discord.png?raw=true)](https://discord.gg/pQqRTvFeJ5)
[![Kofi](https://github.com/KAMKEEL/CustomNPC-Plus/blob/dev/images/Kofi.png?raw=true)](https://ko-fi.com/kamkeel)

[![Download CustomNPC+](https://img.shields.io/badge/CustomNPC+-0081CB?style=for-the-badge&logo=material-ui&logoColor=white)](https://modrinth.com/mod/customnpc-plus)
[![Download MPM+](https://img.shields.io/badge/MorePlayerModels+-0081CB?style=for-the-badge&logo=material-ui&logoColor=white)](https://www.curseforge.com/minecraft/mc-mods/moreplayermodels-plus)
[![Download PluginMod](https://img.shields.io/badge/Plugin_Mod-0081CB?style=for-the-badge&logo=material-ui&logoColor=white)](https://www.curseforge.com/minecraft/mc-mods/the-plugin-mod)
[![ResistanceX (SOON)](https://img.shields.io/badge/Resistance_X-0081CB?style=for-the-badge&logo=material-ui&logoColor=white)]()

### ❗ Notice
I am not the original creator of MorePlayerModels. The original creator is @[Noppes](https://github.com/Noppes). I have been permitted to update the 1.7.10 and post my results on GitHub. The original mod that is updated to the latest versions of Minecraft can be found on these links: [CurseForge](https://www.curseforge.com/minecraft/mc-mods/more-player-models), [kodevelopment](http://www.kodevelopment.nl/minecraft/moreplayermodels/)

----------------

### ⬇️ Downloads

- **Modrinth**: [SOON]()
- **CurseForge**: [LINK](https://www.curseforge.com/minecraft/mc-mods/moreplayermodels-plus).


### 🔹 Installation
This mod is an ***update*** to MorePlayerModels and not an add-on. Do not install MorePlayerModels with MorePlayerModels-Plus. MorePlayerModels-Plus does not remove any functional features from the original mod. It expands upon MorePlayerModels with original features and backported features from newer versions. Simply drag MorePlayerModels-Plus into any client/server mods folder to utilize. Please **backup** before using as this could still have unforeseen errors. Report any bugs if found, thank you and enjoy.

Expand All @@ -21,6 +35,7 @@ This mod is an ***update*** to MorePlayerModels and not an add-on. Do not instal
- Backported GUI Features
- Backported New Part Models
- Custom Part Disabling
- Permission Support

--- Please Suggest New Features!

Expand All @@ -38,16 +53,12 @@ This mod is an ***update*** to MorePlayerModels and not an add-on. Do not instal


## 🔗 Want to check out my other projects?
[CustomNPC+](https://github.com/KAMKEEL/CustomNPC-Plus) is a mod designed to continue the 1.7.10 branch of CustomNpcs. It is intended to be used with MorePlayerModels+.

[Plugin Mod](https://github.com/KAMKEEL/Plugin-Mod) is a mod designed to add more aesthetic items for RPG and storytelling. It is compatible with CustomNPC+ and has many items intended to be used and wielded by created NPCs.

[RPG Messenger](https://github.com/KAMKEEL/RPGMessenger) is a bukkit plugin designed to allow operators to create messagable NPCs for RPG Servers. Allows a 'RPG Controller' to reply quickly as NPCs, form groupchats, and messagable parties.
[CustomNPC+](https://www.curseforge.com/minecraft/mc-mods/customnpc-plus) is a continuation mod of the famous CustomNpcs Mod for 1.7.10 Featuring various new qualities such as flight, 1.8 Skin Support, enhanced scripting GUIs, and backported features.

[CustomNPC+ Dark Mode](https://github.com/KAMKEEL/CustomNPC-Plus-Dark-Mode) is a resource pack for CustomNPC+ that alters all GUIs within the mod to a dark variant that is both clean and pleasing to look at.

[![Discord Badge](https://img.shields.io/badge/CustomNPC+-7289DA?style=for-the-badge&logo=discord&logoColor=white)](https://discord.gg/pQqRTvFeJ5)
[![Download CustomNPC+](https://img.shields.io/badge/Download⠀CustomNPC⠀Plus!-0081CB?style=for-the-badge&logo=material-ui&logoColor=white)](https://www.curseforge.com/minecraft/mc-mods/customnpc-plus)
[![Download PluginMod](https://img.shields.io/badge/Download⠀Plugin⠀Mod!-0081CB?style=for-the-badge&logo=material-ui&logoColor=white)](https://github.com/KAMKEEL/Plugin-Mod)
<a href="https://ko-fi.com/kamkeel"> <img src="https://i.imgur.com/zvdVbeW.png" alt="Support Me on Kofi" width="180" height="27"> </a>
[MorePlayerModels+](https://www.curseforge.com/minecraft/mc-mods/moreplayermodels-plus) is a continuation mod of the famous MorePlayerModels Mod for 1.7.10. Featuring backported GUIs, original parts and customizations, permission support and more!

[Plugin Mod](https://legacy.curseforge.com/minecraft/mc-mods/the-plugin-mod) is a mod designed to add more aesthetic items for RPG and storytelling. It is compatible with CustomNPC+ and has many items intended to be used and wielded by created NPCs.

[RPG Messenger](https://github.com/KAMKEEL/RPGMessenger) is a bukkit plugin designed to allow operators to create messagable NPCs for RPG Servers. Allows a 'RPG Controller' to reply quickly as NPCs, form groupchats, and messagable parties.
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ buildscript {

apply plugin: 'forge'

version = "2.0"
version = "3.0"
group= "kamkeel.mpmplus" // http://maven.apache.org/guides/mini/guide-naming-conventions.html
archivesBaseName = "MorePlayerModels-Plus"

Expand Down
Binary file added images/logo_new.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/new_logo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
124 changes: 124 additions & 0 deletions src/main/java/kamkeel/MorePlayerModelsPermissions.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,124 @@
package kamkeel;

import net.minecraft.entity.player.EntityPlayer;
import noppes.mpm.MorePlayerModels;
import noppes.mpm.config.ConfigMain;
import org.apache.logging.log4j.LogManager;

import java.lang.reflect.InvocationTargetException;
import java.lang.reflect.Method;
import java.util.ArrayList;
import java.util.Collections;
import java.util.List;


public class MorePlayerModelsPermissions {
public static final Permission CONFIG_SKIN = new Permission("mpm.config.skin");
public static final Permission CONFIG_SOUND = new Permission("mpm.config.sound");
public static final Permission CONFIG_ENTITY = new Permission("mpm.config.entity");
public static final Permission CONFIG_SCALE = new Permission("mpm.config.scale");
public static final Permission CONFIG_HIDE = new Permission("mpm.config.hide");
public static final Permission CONFIG_SAVE = new Permission("mpm.config.save");
public static final Permission CONFIG_LOAD = new Permission("mpm.config.load");

public static final Permission PARTS = new Permission("mpm.parts");
public static final Permission PARTS_BEARD = new Permission("mpm.parts.beard");
public static final Permission PARTS_BREAST = new Permission("mpm.parts.breast");
public static final Permission PARTS_CAPE = new Permission("mpm.parts.cape");
public static final Permission PARTS_CLAWS = new Permission("mpm.parts.claws");
public static final Permission PARTS_EARS = new Permission("mpm.parts.ears");
public static final Permission PARTS_FIN = new Permission("mpm.parts.fin");
public static final Permission PARTS_HAIR = new Permission("mpm.parts.hair");
public static final Permission PARTS_HORNS = new Permission("mpm.parts.horns");
public static final Permission PARTS_LEGS = new Permission("mpm.parts.legs");
public static final Permission PARTS_MOHAWK = new Permission("mpm.parts.mohawk");
public static final Permission PARTS_PARTICLES = new Permission("mpm.parts.particles");
public static final Permission PARTS_SKIRT = new Permission("mpm.parts.skirt");
public static final Permission PARTS_SNOUT = new Permission("mpm.parts.snout");
public static final Permission PARTS_TAIL = new Permission("mpm.parts.tail");
public static final Permission PARTS_WINGS = new Permission("mpm.parts.wings");

public static MorePlayerModelsPermissions Instance;
private Class<?> bukkit;
private Method getPlayer;
private Method hasPermission;
public MorePlayerModelsPermissions(){
Instance = this;
try {
bukkit = Class.forName("org.bukkit.Bukkit");
getPlayer = bukkit.getMethod("getPlayer", String.class);
hasPermission = Class.forName("org.bukkit.entity.Player").getMethod("hasPermission", String.class);
LogManager.getLogger(MorePlayerModels.class).info("Bukkit permissions enabled");
LogManager.getLogger(MorePlayerModels.class).info("Permissions available:");
Collections.sort(Permission.permissions, String.CASE_INSENSITIVE_ORDER);
for(String p : Permission.permissions){
LogManager.getLogger(MorePlayerModels.class).info(p);
}
} catch (ClassNotFoundException e) {
// bukkit/mcpc+ is not loaded
} catch (NoSuchMethodException e) {
e.printStackTrace();
} catch (SecurityException e) {
e.printStackTrace();
}
}

public static boolean hasPermission(EntityPlayer player, Permission permission){
if(!ConfigMain.EnablePermissions){
return true;
}
if(player != null){
if(permission != null){
if(Instance.bukkit != null){
return Instance.bukkitPermission(player.getCommandSenderName(), permission.name);
}
}
}
return true;
}

public static boolean hasPermission(EntityPlayer player, String permission){
if(!ConfigMain.EnablePermissions){
return true;
}
if(player != null){
if(permission != null){
if(Instance.bukkit != null){
return Instance.bukkitPermission(player.getCommandSenderName(), permission);
}
}
}
return true;
}

private boolean bukkitPermission(String username, String permission) {
try {
Object player = getPlayer.invoke(null, username);
return (Boolean) hasPermission.invoke(player, permission);
} catch (IllegalAccessException e) {
e.printStackTrace();
} catch (IllegalArgumentException e) {
e.printStackTrace();
} catch (InvocationTargetException e) {
e.printStackTrace();
}
return false;
}

public static class Permission{
public static final List<Permission> permissionNode = new ArrayList<Permission>();
public static final List<String> permissions = new ArrayList<String>();
public String name;
public Permission(String name){
this.name = name;
if(!permissions.contains(name)){
permissions.add(name);
permissionNode.add(this);
}
}
}

public static boolean enabled() {
return Instance.bukkit != null;
}
}
Loading

0 comments on commit 687340c

Please sign in to comment.