Merge branch 'master' of ssh://184.154.0.242:7999/min/Mineplex
This commit is contained in:
commit
55d028d706
@ -131,7 +131,7 @@ public class FriendsGUI implements Listener
|
|||||||
ItemBuilder builder = new ItemBuilder(Material.SKULL_ITEM, 1, (short) (friend.Online ? 3 : 0));
|
ItemBuilder builder = new ItemBuilder(Material.SKULL_ITEM, 1, (short) (friend.Online ? 3 : 0));
|
||||||
|
|
||||||
builder.setTitle(C.cWhite + C.Bold + friend.Name);
|
builder.setTitle(C.cWhite + C.Bold + friend.Name);
|
||||||
builder.setPlayerHead(friend.Name);
|
// builder.setPlayerHead(friend.Name);
|
||||||
|
|
||||||
builder.addLore(C.cGray + C.Bold + "Status: " + (friend.Online ? C.cDGreen + "Online" : C.cRed + "Offline"));
|
builder.addLore(C.cGray + C.Bold + "Status: " + (friend.Online ? C.cDGreen + "Online" : C.cRed + "Offline"));
|
||||||
|
|
||||||
@ -276,7 +276,7 @@ public class FriendsGUI implements Listener
|
|||||||
ItemBuilder builder = new ItemBuilder(Material.SKULL_ITEM, 1, (short) (friend.Online ? 3 : 0));
|
ItemBuilder builder = new ItemBuilder(Material.SKULL_ITEM, 1, (short) (friend.Online ? 3 : 0));
|
||||||
|
|
||||||
builder.setTitle(C.cWhite + C.Bold + friend.Name);
|
builder.setTitle(C.cWhite + C.Bold + friend.Name);
|
||||||
builder.setPlayerHead(friend.Name);
|
// builder.setPlayerHead(friend.Name);
|
||||||
|
|
||||||
builder.addLore(C.cGray + C.Bold + "Status: " + (friend.Online ? C.cDGreen + "Online" : C.cRed + "Offline"));
|
builder.addLore(C.cGray + C.Bold + "Status: " + (friend.Online ? C.cDGreen + "Online" : C.cRed + "Offline"));
|
||||||
|
|
||||||
|
@ -11,6 +11,7 @@ import org.bukkit.event.player.PlayerInteractEvent;
|
|||||||
import org.bukkit.event.player.PlayerQuitEvent;
|
import org.bukkit.event.player.PlayerQuitEvent;
|
||||||
|
|
||||||
import mineplex.core.MiniPlugin;
|
import mineplex.core.MiniPlugin;
|
||||||
|
import mineplex.core.common.Rank;
|
||||||
import mineplex.core.common.util.UtilEvent;
|
import mineplex.core.common.util.UtilEvent;
|
||||||
import mineplex.core.common.util.UtilGear;
|
import mineplex.core.common.util.UtilGear;
|
||||||
import mineplex.core.common.util.UtilMath;
|
import mineplex.core.common.util.UtilMath;
|
||||||
@ -73,6 +74,9 @@ public class HubVisibilityManager extends MiniPlugin
|
|||||||
if (player.equals(other))
|
if (player.equals(other))
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
|
if(Manager.GetClients().Get(other).GetRank().has(Rank.MODERATOR))
|
||||||
|
hideMe = false;
|
||||||
|
|
||||||
if (hideMe ||
|
if (hideMe ||
|
||||||
!Manager.getPreferences().Get(other).ShowPlayers ||
|
!Manager.getPreferences().Get(other).ShowPlayers ||
|
||||||
Manager.GetTutorial().InTutorial(other))
|
Manager.GetTutorial().InTutorial(other))
|
||||||
|
@ -901,34 +901,84 @@ public class MapParser extends JavaPlugin implements Listener
|
|||||||
event.getPlayer().setVelocity(vel);
|
event.getPlayer().setVelocity(vel);
|
||||||
}
|
}
|
||||||
|
|
||||||
@EventHandler
|
@EventHandler(priority = EventPriority.LOWEST)
|
||||||
public void signChangeLog(SignChangeEvent event)
|
public void signChangeLog(SignChangeEvent event)
|
||||||
{
|
{
|
||||||
if (GetData(event.getPlayer().getWorld().getName()).HasAccess(event.getPlayer()))
|
if (GetData(event.getPlayer().getWorld().getName()).HasAccess(event.getPlayer()))
|
||||||
{
|
{
|
||||||
try
|
ArrayList<String> text = new ArrayList<String>();
|
||||||
{
|
|
||||||
File file = new File(event.getPlayer().getWorld().getName() + "/" + "sign_log.txt");
|
|
||||||
|
|
||||||
if (!file.exists())
|
text.add("Date: " + UtilTime.now());
|
||||||
file.createNewFile();
|
text.add("Player: " + event.getPlayer().getName());
|
||||||
|
text.add("Location: " + UtilWorld.locToStrClean(event.getBlock().getLocation()));
|
||||||
|
for (int i=0 ; i<event.getLines().length ; i++)
|
||||||
|
text.add("Line " + i + ": " + event.getLines()[i]);
|
||||||
|
|
||||||
FileWriter fw = new FileWriter(file.getAbsoluteFile(), true);
|
writeSignLog(text, event.getPlayer().getWorld());
|
||||||
BufferedWriter bw = new BufferedWriter(fw);
|
}
|
||||||
|
}
|
||||||
|
|
||||||
bw.write("\n\n");
|
@EventHandler(priority = EventPriority.LOWEST)
|
||||||
bw.write("\n" + "Date: " + UtilTime.now());
|
public void signCommand(PlayerCommandPreprocessEvent event)
|
||||||
bw.write("\n" + "Player: " + event.getPlayer().getName());
|
{
|
||||||
bw.write("\n" + "Location: " + UtilWorld.locToStrClean(event.getBlock().getLocation()));
|
if (event.getMessage().toLowerCase().contains("set"))
|
||||||
for (int i=0 ; i<event.getLines().length ; i++)
|
{
|
||||||
bw.write("\n" + "Line " + i + ": " + event.getLines()[i]);
|
ArrayList<String> text = new ArrayList<String>();
|
||||||
|
|
||||||
bw.close();
|
text.add("Date: " + UtilTime.now());
|
||||||
}
|
text.add("Player: " + event.getPlayer().getName());
|
||||||
catch (Exception e)
|
text.add("Location: " + UtilWorld.locToStrClean(event.getPlayer().getLocation()));
|
||||||
{
|
text.add("Message: " + event.getMessage());
|
||||||
e.printStackTrace();
|
|
||||||
}
|
writeSignCommandLog(text, event.getPlayer().getWorld());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public void writeSignCommandLog(ArrayList<String> text, World world)
|
||||||
|
{
|
||||||
|
try
|
||||||
|
{
|
||||||
|
File file = new File(world.getName() + "/" + "command_sign_log.txt");
|
||||||
|
|
||||||
|
if (!file.exists())
|
||||||
|
file.createNewFile();
|
||||||
|
|
||||||
|
FileWriter fw = new FileWriter(file.getAbsoluteFile(), true);
|
||||||
|
BufferedWriter bw = new BufferedWriter(fw);
|
||||||
|
|
||||||
|
bw.write("\n\n");
|
||||||
|
for (String line : text)
|
||||||
|
bw.write("\n" + line);
|
||||||
|
|
||||||
|
bw.close();
|
||||||
|
}
|
||||||
|
catch (Exception e)
|
||||||
|
{
|
||||||
|
e.printStackTrace();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public void writeSignLog(ArrayList<String> text, World world)
|
||||||
|
{
|
||||||
|
try
|
||||||
|
{
|
||||||
|
File file = new File(world.getName() + "/" + "sign_log.txt");
|
||||||
|
|
||||||
|
if (!file.exists())
|
||||||
|
file.createNewFile();
|
||||||
|
|
||||||
|
FileWriter fw = new FileWriter(file.getAbsoluteFile(), true);
|
||||||
|
BufferedWriter bw = new BufferedWriter(fw);
|
||||||
|
|
||||||
|
bw.write("\n\n");
|
||||||
|
for (String line : text)
|
||||||
|
bw.write("\n" + line);
|
||||||
|
|
||||||
|
bw.close();
|
||||||
|
}
|
||||||
|
catch (Exception e)
|
||||||
|
{
|
||||||
|
e.printStackTrace();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user