   (let [{:keys [stones]} (files/read-json-file @plugin "stones.json")]
     (reset! memorystones (set (map memstone-from-file stones)))))
 
+(defn write-memory [player-name]
+  (let [memory (get @memorizedstones player-name)]
+    (files/write-json-file
+     @plugin
+     (str "memory-" player-name ".json")
+     {:memory memory})))
+
+(defn read-memory [player-name]
+  (let [{:keys [memory]} (files/read-json-file @plugin (str "memory-" player-name ".json"))]
+    (swap! memorizedstones update-in [player-name] (comp set concat) memory)))
+
 ;; Event Handling
+(defn memorize-stone! [player {:keys [name] :as memstone}]
+  (swap! memorizedstones update-in [player] (comp set conj) name)
+  (write-memory player))
+
+(defn unmemorize-stone! [player {:keys [name] :as memstone}]
+  (swap! memorizedstones update-in [player] (comp set disj) name)
+  (write-memory player))
+
 (defn sign-change [ev]
   (let [[type name] (seq (.getLines ev))]
     (cond

     (do
       (swap! memorystones conj {:block (.getBlock ev) :name name})
       (write-memstones)
       (pl/send-msg ev "You placed a Memory Stone. Well done.")))))

(defn memstone-for-block [block]
  (first (filter #(.equals block (:block %)) @memorystones)))

(defn sign-break [ev]
  (when-let [memstone (memstone-for-block (.getBlock ev))]
    (pl/send-msg ev "You broke a Memory Stone! oh dear.")
    (swap! memorystones disj memstone)
    (write-memstones)))

(defn events
  []
  [(ev/event "block.sign-change" #'sign-change)
   (ev/event "block.block-break" #'sign-break)])

;; Command Handling
(defmethod cmd/convert-type :memorystone [sender type arg]
  (first (filter #(= (.toLowerCase (:name %)) (.toLowerCase arg)) @memorystones)))

(defmethod cmd/param-type-tabcomplete :memorystone [sender type arg]
  (let [lower (.toLowerCase arg)]
    (filter #(.startsWith % lower) (map #(.toLowerCase (:name %)) @memorystones))))

(defn go-command [sender memorystone]
  (when memorystone

  (:require [cljminecraft.bukkit :as bk])
  (:require [cljminecraft.logging :as log]
            [cljminecraft.commands :as cmd]
            [cljminecraft.world :as w]
            [cljminecraft.items :as i])
  (:require [cljminecraft.files :as files]))

(defonce plugin (atom nil))
(defonce memorystones (atom #{}))
(defonce memorizedstones (atom {}))


;; Persistence handling
(defn memstone-to-file [{:keys [block name] :as memstone}]
