Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,17 @@ This command is disabled by default to make you look through the config (it's lo
- This is the only case where the alias matter. You can use any of the warn* aliases for this.
- /note remove [player] [id]: remove a note from a player (permission: simplenotes.removenotes)

## Permissions

- simplenotes.addnotes: add notes/warns
- simplenotes.removenotes: remove notes/warns
- simplenotes.see.self.notes: see your own notes
- simplenotes.see.self.warns: see your own warns
- simplenotes.see.others.notes: see other people's notes
- simplenotes.see.others.warns: see other people's warns

Permissions were tested with PermissionsEx, version 1.14. Notation with simplenotes.* and derivatives should work.

## Compiling

Clone the repository and run `mvn clean package`. The resulting jar should be in the `target` folder.
1 change: 1 addition & 0 deletions changelogs/1.0.1.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Fix "No notes to show" being sent on login and some colouring.
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

<groupId>org.retrohaven.mc.notes</groupId>
<artifactId>SimpleNotes</artifactId>
<version>1.0.0</version>
<version>1.0.1</version>
<description>A note system for moderators and admins, with the objective to be light on the system and on the codebase.</description>

<properties>
Expand Down
3 changes: 0 additions & 3 deletions src/main/java/org/retrohaven/mc/notes/NotePlugin.java
Original file line number Diff line number Diff line change
Expand Up @@ -43,9 +43,6 @@ public void onEnable() {

@Override
public void onDisable() {
// Save configuration
//config.save(); // Save the configuration file to disk. This should only be necessary if the configuration cam be modified during runtime.

log.info("[" + pluginName + "] Plugin unloaded!");
}

Expand Down
12 changes: 6 additions & 6 deletions src/main/java/org/retrohaven/mc/notes/commands/NoteCommand.java
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ public class NoteCommand implements CommandExecutor {
private final NotePlugin plugin;
private final NoteConfig config;
private final String errorColorCode = "§e";
private final String permissionColorCode = "§3";
private final String permissionColorCode = "§4";

public NoteCommand(NotePlugin plugin) {
this.plugin = plugin;
Expand Down Expand Up @@ -410,19 +410,19 @@ public boolean NoteList(CommandSender sender, String[] args, boolean isListener)

if (!RequestSubject.equals(sender.getName()) && (sender.hasPermission("simplenotes.see.others.notes") || sender.isOp()) && Objects.equals(line[1].substring(line[1].length() -4), "NOTE")) {
shownCounter = shownCounter + 1;
sender.sendMessage("§8| " + String.join(" §8|§r ", line));
sender.sendMessage("§8| " + String.join(" §8|§f ", line));
} else if (RequestSubject.equals(sender.getName()) && (sender.hasPermission("simplenotes.see.self.notes") || sender.isOp()) && Objects.equals(line[1].substring(line[1].length() -4), "NOTE") && (!isListener || config.getConfigBoolean("settings.notes.showonlogin.value"))) {
shownCounter = shownCounter + 1;
sender.sendMessage("§8| " + String.join(" §8|§r ", line));
sender.sendMessage("§8| " + String.join(" §8|§f ", line));
} else if (!RequestSubject.equals(sender.getName()) && (sender.hasPermission("simplenotes.see.others.warns") || sender.isOp()) && Objects.equals(line[1].substring(line[1].length() -4), "WARN")) {
shownCounter = shownCounter + 1;
sender.sendMessage("§8| " + String.join(" §8|§r ", line));
sender.sendMessage("§8| " + String.join(" §8|§f ", line));
} else if (RequestSubject.equals(sender.getName()) && (sender.hasPermission("simplenotes.see.self.warns") || sender.isOp()) && Objects.equals(line[1].substring(line[1].length() -4), "WARN") && (!isListener || config.getConfigBoolean("settings.warns.showonlogin.value"))) {
shownCounter = shownCounter + 1;
sender.sendMessage("§8| " + String.join(" §8|§r ", line));
sender.sendMessage("§8| " + String.join(" §8|§f ", line));
}
}
if (shownCounter == 0) {
if (shownCounter == 0 && !isListener) {
sender.sendMessage("No notes or warns to show.");
}
return true;
Expand Down