Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/master' into Unfinished_Model_Stuff
Browse files Browse the repository at this point in the history
# Conflicts:
#	src/main/java/me/jakedadream/ParadisuPlugin/modelmanager/modelcommands.java
#	src/main/java/me/jakedadream/ParadisuPlugin/modelmanager/modelitemmanager.java
#	src/main/java/me/jakedadream/ParadisuPlugin/paradisumain.java
  • Loading branch information
cytocracy committed Jul 29, 2021
2 parents 68f1006 + f5aa8bc commit 72688fd
Show file tree
Hide file tree
Showing 6 changed files with 97 additions and 17 deletions.
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,4 +23,8 @@ mvn clean package
* Limited item NBT editing
* Obtain player skulls

### Reporting Bugs
* Minor bugs may be reported with Issues
* Please report any Major/Game-breaking bugs privately to any of the devs

Contributions are welcomed & appreciated!
Original file line number Diff line number Diff line change
@@ -0,0 +1,78 @@
package me.jakedadream.ParadisuPlugin.commands;

import org.bukkit.ChatColor;
import org.bukkit.command.Command;
import org.bukkit.command.CommandExecutor;
import org.bukkit.command.CommandSender;
import org.bukkit.entity.Player;

public class modelcommands implements CommandExecutor {

private String getParsedName(String[] args) {
String name = "";
for (int i = 0; i < args.length; i++) {
name = name.concat(args[i]);
name = name.concat(" ");
}
return ChatColor.translateAlternateColorCodes('&', name);
}



@Override
public boolean onCommand(CommandSender sender, Command cmd, String label, String[] args) {
if (!(sender instanceof Player)) {
sender.sendMessage(ChatColor.RED + "Only players can use that command!");
return true;
}
Player player = (Player) sender;

switch (cmd.getName().toLowerCase()) {

case "mgive":
if (player.hasPermission("snw.model")) {

// model menu
player.sendMessage("§3[§dParadisu §f§lMODELS §bツ§3] §fOpening the Catalog of Default Models!");
} else { player.sendMessage("§3[§dParadisu §bツ§3] §7You do not have permission to use that command."); }
return true;


case "hgive":
if (player.hasPermission("snw.model")) {

// hat menu
player.sendMessage("§3[§dParadisu §f§lMODELS §bツ§3] §fOpening the Catalog of Hat Models!");
} else { player.sendMessage("§3[§dParadisu §bツ§3] §7You do not have permission to use that command."); }
return true;


case "mhat":
if (player.hasPermission("snw.model")) {

// model on head

player.sendMessage("§3[§dParadisu §f§lMODELS §bツ§3] §fPlaced the model <display name> on your head!");
} else { player.sendMessage("§3[§dParadisu §bツ§3] §7You do not have permission to use that command."); }
return true;


case "createmodelcfsection":
if (player.hasPermission("snw.model")) {

// create new default model section in config file

player.sendMessage("§3[§dParadisu §f§lMODELS §bツ§3] §fNew Model Section created!");
} else { player.sendMessage("§3[§dParadisu §bツ§3] §7You do not have permission to use that command."); }
return true;




default:
return false;
}
}
}


Original file line number Diff line number Diff line change
Expand Up @@ -745,31 +745,31 @@ public boolean onCommand(CommandSender sender, Command cmd, String label, String

String name = player.getName();

name.concat(", ");
name = name.concat(", ");

if (player.hasPermission("meta.rank.owner")) {
owners.concat(name);
owners = owners.concat(name);
} else if (player.hasPermission("meta.rank.dev")) {
devs.concat(name);
devs = devs.concat(name);
} else if (player.hasPermission("meta.rank.builders")) {
builders.concat(name);
builders = builders.concat(name);
} else if (player.hasPermission("meta.rank.staff")) {
staff.concat(name);
staff = staff.concat(name);
} else if (player.hasPermission("meta.rank.supporters")) {
supporters.concat(name);
supporters = supporters.concat(name);
} else {
visitors.concat(name);
visitors = visitors.concat(name);
}

}


owners = owners.substring(0, owners.length());
devs = devs.substring(0, devs.length());
builders = builders.substring(0, builders.length());
staff = staff.substring(0, staff.length());
supporters = supporters.substring(0, supporters.length());
visitors = visitors.substring(0, visitors.length());
owners = owners.substring(0, owners.length() -2);
devs = devs.substring(0, devs.length() -2);
builders = builders.substring(0, builders.length() -2);
staff = staff.substring(0, staff.length() -2);
supporters = supporters.substring(0, supporters.length() -2);
visitors = visitors.substring(0, visitors.length() -2);

player.sendMessage("§3§l============= §f" + onlineammount + " §d§oOnline Players §3§l=============\n" +
" \n");
Expand Down
1 change: 0 additions & 1 deletion src/main/resources/hatmodels.yml

This file was deleted.

4 changes: 2 additions & 2 deletions src/main/resources/plugin.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: ParadisuPlugin
version: 2.5.0
authors: [JakeDaDream, RealInstantRamen, andyinnie, _Kastle]
version: 2.5.1
authors: [JakeDaDream, RealInstantRamen, andyinnie, _Kastle, cytocracy]
main: me.jakedadream.ParadisuPlugin.paradisumain
api-version: 1.16
commands:
Expand Down
1 change: 0 additions & 1 deletion src/main/resources/propmodels.yml

This file was deleted.

0 comments on commit 72688fd

Please sign in to comment.